curl --request GET \
--url https://platformapi.comfy.org/deploy/v1/deploy-estimate \
--header 'Authorization: Bearer <token>'import requests
url = "https://platformapi.comfy.org/deploy/v1/deploy-estimate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platformapi.comfy.org/deploy/v1/deploy-estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platformapi.comfy.org/deploy/v1/deploy-estimate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platformapi.comfy.org/deploy/v1/deploy-estimate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platformapi.comfy.org/deploy/v1/deploy-estimate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platformapi.comfy.org/deploy/v1/deploy-estimate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"enabled": true,
"bytesTotal": 123,
"bytesHeld": 123,
"bytesToFetch": 123,
"measured": true,
"unsizedModelCount": 123,
"atLeast": true,
"stagingSecondsLow": 123,
"stagingSecondsHigh": 123,
"startupSecondsLow": 123,
"startupSecondsHigh": 123,
"etaSecondsLow": 123,
"etaSecondsHigh": 123
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}How long a deployment of a release would take to come up
Answers, before anything is created, how many bytes of models a deployment of this release on this GPU and location would have to put on its disk, how many of them are already held, and a range of seconds until it reads ready. The same pair a create sends picks the provider, so the rates are those of the provider the create would run on.
A range, not a promise: the long end is meant to be rarely beaten. It covers model staging (stagingSecondsLow/High) and starting the endpoint (startupSecondsLow/High), and nothing after ready: a first request can still wait for a worker to start, and running a workflow is not counted. atLeast is true when some models had no size to add, or the release was never measured, so the bytes and the time are a floor.
bytesHeld is the release’s whole total where this workspace already ran the release to ready on the same provider and that provider keeps what it staged, and 0 otherwise.
The estimate can be switched off per workspace. Switched off, this is still a 200, with enabled false and no other field: a client shows no estimate and says nothing about it, exactly as for a service too old to have this route.
curl --request GET \
--url https://platformapi.comfy.org/deploy/v1/deploy-estimate \
--header 'Authorization: Bearer <token>'import requests
url = "https://platformapi.comfy.org/deploy/v1/deploy-estimate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platformapi.comfy.org/deploy/v1/deploy-estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platformapi.comfy.org/deploy/v1/deploy-estimate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platformapi.comfy.org/deploy/v1/deploy-estimate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platformapi.comfy.org/deploy/v1/deploy-estimate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platformapi.comfy.org/deploy/v1/deploy-estimate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"enabled": true,
"bytesTotal": 123,
"bytesHeld": 123,
"bytesToFetch": 123,
"measured": true,
"unsizedModelCount": 123,
"atLeast": true,
"stagingSecondsLow": 123,
"stagingSecondsHigh": 123,
"startupSecondsLow": 123,
"startupSecondsHigh": 123,
"etaSecondsLow": 123,
"etaSecondsHigh": 123
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}查询参数
响应
OK
How long a deployment of a release would take to read ready. Every time is a range of whole seconds, the short end first; etaSecondsLow/High is staging and startup added. With enabled false the estimate is switched off and every other field is absent; with enabled true every field but unsizedModelCount is present.