curl --request GET \
--url https://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}', 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://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}",
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://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}"
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://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}")
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{}{
"status_url": "https://api.comfy.org/v2/models/bfl/flux-pro-1.1/requests/6f1a1a6e-6a53-4a5f-9d3a-2b3b0a1f9c21/status",
"response_url": "https://api.comfy.org/v2/models/bfl/flux-pro-1.1/requests/6f1a1a6e-6a53-4a5f-9d3a-2b3b0a1f9c21",
"cancel_url": "https://api.comfy.org/v2/models/bfl/flux-pro-1.1/requests/6f1a1a6e-6a53-4a5f-9d3a-2b3b0a1f9c21/cancel",
"request_id": "6f1a1a6e-6a53-4a5f-9d3a-2b3b0a1f9c21",
"status": "IN_QUEUE",
"queue_position": 3,
"error_type": "invalid_input"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "image_too_small",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}Collect the result of one submitted request.
The collect endpoint. On a request that has finished successfully it returns the partner model’s own native output, byte for byte what the synchronous route’s 200 carries for the same model and the same input - so the two delivery modes produce one result shape and a caller can move between them without a second parser.
curl --request GET \
--url https://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}', 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://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}",
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://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}"
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://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comfy.org/v2/models/{provider}/{model}/requests/{request_id}")
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{}{
"status_url": "https://api.comfy.org/v2/models/bfl/flux-pro-1.1/requests/6f1a1a6e-6a53-4a5f-9d3a-2b3b0a1f9c21/status",
"response_url": "https://api.comfy.org/v2/models/bfl/flux-pro-1.1/requests/6f1a1a6e-6a53-4a5f-9d3a-2b3b0a1f9c21",
"cancel_url": "https://api.comfy.org/v2/models/bfl/flux-pro-1.1/requests/6f1a1a6e-6a53-4a5f-9d3a-2b3b0a1f9c21/cancel",
"request_id": "6f1a1a6e-6a53-4a5f-9d3a-2b3b0a1f9c21",
"status": "IN_QUEUE",
"queue_position": 3,
"error_type": "invalid_input"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "image_too_small",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}{
"detail": "<string>",
"error_type": "invalid_input",
"upstream_detail": "<string>",
"refusal_subject": "<string>"
}授权
Bearer token authentication. Normally a Firebase or Cloud JWT. A 'comfyui-' prefixed API key is also accepted in this header: the prefix classifies the value as an API key and it is validated exactly as if it had been sent in X-API-Key.
路径参数
Lowercase provider segment of the canonical {provider}/{model} model ID - the partner whose model is being run.
Lowercase provider segment of the canonical {provider}/{model} model ID - the partner whose model is being addressed. The invocation route's provider path parameter and a catalog entry's provider field both reference this one schema, which is what keeps the listed IDs and the accepted IDs from drifting apart.
64^[a-z0-9]+([._-][a-z0-9]+)*$"bfl"
Lowercase model segment of the canonical {provider}/{model} model ID - the model to run within that provider.
Lowercase model segment of the canonical {provider}/{model} model ID - the model to run within that provider. Shared by the invocation route's model path parameter and a catalog entry's model field, for the same no-drift reason as RouterProviderSegment.
128^[a-z0-9]+([._-][a-z0-9]+)*$"flux-2-pro"
The queued request to address - the request_id the submission returned in its body. It is not the submission's X-Comfy-Request-Id: that header carries the id of one HTTP call and addresses nothing, as the RouterQueueRequestId schema spells out.
Identifier of one queued Router request - the handle a caller polls, cancels and collects a result by.
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"6f1a1a6e-6a53-4a5f-9d3a-2b3b0a1f9c21"
响应
OK - the result stored for a request that produced one - a request that completed successfully, or a terminal one that carries both a recorded charge and a stored result - returned unchanged under the partner's own media type, exactly as the synchronous route's 200 returns it, and under the same provider-selection contract the submit accepted: without model_provider, or with model_provider and strict_mode=false (the default, translated back into this model's native contract when possible, falling back to the alternate provider's own raw response on a translation failure - logged, never silent), the shape is this model's own native output; with strict_mode=true it is the alternate provider's response returned unchanged. For most models that is JSON (RouterModelOutput); for a model whose partner answers a generation directly as bytes it is those bytes under the partner's own Content-Type. Today no such model can be queued (the submit refuses it), so this branch is declared for the SDK contract ahead of the server serving it. A client must branch on the response Content-Type and must not assume a JSON document; the per-model contract is published at GET /v2/models/{provider}/{model}/openapi.json. This response carries X-Content-Type-Options: nosniff, so a partner media type is taken at its word and never sniffed into something else.
A partner model's native JSON output document, returned to the caller as-is. Its concrete shape is owned by the partner rather than by Comfy, so this is an open object: Router does not narrow, rename, or re-envelope the fields. It is a named component (never an inline anonymous object) because ComfyUI's spec-driven codegen needs a class to generate. For the concrete shape one model returns, read that model's own document at GET /v2/models/{provider}/{model}/openapi.json, whose 200 carries the per-model output schema when Comfy has described it.