curl --request GET \
--url http://127.0.0.1:8189/api/v2/jobs/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:8189/api/v2/jobs/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:8189/api/v2/jobs/{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_PORT => "8189",
CURLOPT_URL => "http://127.0.0.1:8189/api/v2/jobs/{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 := "http://127.0.0.1:8189/api/v2/jobs/{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("http://127.0.0.1:8189/api/v2/jobs/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8189/api/v2/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "7f3d2c1b-9a8e-4d6f-b012-3c4d5e6f7a8b",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"queue_position": 123,
"progress": {
"value": 0.42,
"nodes_done": 11,
"nodes_total": 31,
"current_node": "12",
"current_node_class": "KSampler",
"step": 21,
"steps": 50,
"message": "KSampler 21/50"
},
"outputs": [
{
"node_id": "9",
"name": "ComfyUI_00001_.png",
"type": "image",
"content_type": "image/png",
"size_bytes": 1848320,
"id": "9f8a1c0d-2b3e-4f56-...",
"hash": "<string>",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"job_id": "<string>"
}
],
"error": {
"code": "node_execution_error",
"message": "<string>",
"node_id": "<string>",
"class_type": "<string>",
"traceback": "<string>"
},
"urls": {
"self": "<string>",
"events": "<string>",
"cancel": "<string>",
"logs": "<string>"
},
"metrics": {
"queue_ms": 9000,
"execution_ms": 42000
}
}{
"error": {
"code": "invalid_workflow",
"message": "Node 12 (KSampler): required input 'model' is not connected",
"details": {
"node_errors": {
"12": [
{
"field": "model",
"reason": "missing_input"
}
]
}
}
}
}{
"error": {
"code": "invalid_workflow",
"message": "Node 12 (KSampler): required input 'model' is not connected",
"details": {
"node_errors": {
"12": [
{
"field": "model",
"reason": "missing_input"
}
]
}
}
}
}{
"error": {
"code": "invalid_workflow",
"message": "Node 12 (KSampler): required input 'model' is not connected",
"details": {
"node_errors": {
"12": [
{
"field": "model",
"reason": "missing_input"
}
]
}
}
}
}{
"error": {
"code": "invalid_workflow",
"message": "Node 12 (KSampler): required input 'model' is not connected",
"details": {
"node_errors": {
"12": [
{
"field": "model",
"reason": "missing_input"
}
]
}
}
}
}{
"error": {
"code": "invalid_workflow",
"message": "Node 12 (KSampler): required input 'model' is not connected",
"details": {
"node_errors": {
"12": [
{
"field": "model",
"reason": "missing_input"
}
]
}
}
}
}Job status (the polling workhorse)
Returns the full job object: current status, the latest progress
snapshot, and every output committed so far (outputs populates
incrementally while the job runs). This is the authoritative,
resumable view of a job; everything on the SSE stream is derived
from it.
curl --request GET \
--url http://127.0.0.1:8189/api/v2/jobs/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:8189/api/v2/jobs/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:8189/api/v2/jobs/{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_PORT => "8189",
CURLOPT_URL => "http://127.0.0.1:8189/api/v2/jobs/{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 := "http://127.0.0.1:8189/api/v2/jobs/{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("http://127.0.0.1:8189/api/v2/jobs/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8189/api/v2/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "7f3d2c1b-9a8e-4d6f-b012-3c4d5e6f7a8b",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"queue_position": 123,
"progress": {
"value": 0.42,
"nodes_done": 11,
"nodes_total": 31,
"current_node": "12",
"current_node_class": "KSampler",
"step": 21,
"steps": 50,
"message": "KSampler 21/50"
},
"outputs": [
{
"node_id": "9",
"name": "ComfyUI_00001_.png",
"type": "image",
"content_type": "image/png",
"size_bytes": 1848320,
"id": "9f8a1c0d-2b3e-4f56-...",
"hash": "<string>",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"job_id": "<string>"
}
],
"error": {
"code": "node_execution_error",
"message": "<string>",
"node_id": "<string>",
"class_type": "<string>",
"traceback": "<string>"
},
"urls": {
"self": "<string>",
"events": "<string>",
"cancel": "<string>",
"logs": "<string>"
},
"metrics": {
"queue_ms": 9000,
"execution_ms": 42000
}
}{
"error": {
"code": "invalid_workflow",
"message": "Node 12 (KSampler): required input 'model' is not connected",
"details": {
"node_errors": {
"12": [
{
"field": "model",
"reason": "missing_input"
}
]
}
}
}
}{
"error": {
"code": "invalid_workflow",
"message": "Node 12 (KSampler): required input 'model' is not connected",
"details": {
"node_errors": {
"12": [
{
"field": "model",
"reason": "missing_input"
}
]
}
}
}
}{
"error": {
"code": "invalid_workflow",
"message": "Node 12 (KSampler): required input 'model' is not connected",
"details": {
"node_errors": {
"12": [
{
"field": "model",
"reason": "missing_input"
}
]
}
}
}
}{
"error": {
"code": "invalid_workflow",
"message": "Node 12 (KSampler): required input 'model' is not connected",
"details": {
"node_errors": {
"12": [
{
"field": "model",
"reason": "missing_input"
}
]
}
}
}
}{
"error": {
"code": "invalid_workflow",
"message": "Node 12 (KSampler): required input 'model' is not connected",
"details": {
"node_errors": {
"12": [
{
"field": "model",
"reason": "missing_input"
}
]
}
}
}
}承認
Authorization: Bearer <api-key> — account-scoped API keys on Cloud and serverless. Self-hosted accepts unauthenticated requests by default and can be configured with a static bearer token.
パスパラメータ
レスポンス
The job.
One execution of a workflow. Durable from creation until expires_at; outputs populates incrementally during execution.
"7f3d2c1b-9a8e-4d6f-b012-3c4d5e6f7a8b"
Lifecycle: queued → running → succeeded | failed | expired; a cancel request, or the deletion of the deployment the job is running on, moves running → canceling → canceled. Terminal states: succeeded, canceled, failed, expired.
queued, running, succeeded, canceling, canceled, failed, expired Retention deadline — a platform property, not an API constant.
The latest progress snapshot; same data the SSE stream pushes.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Execution failure detail, carried in job.error (not an HTTP error).
Show child attributes
Show child attributes
Embedded follow-up links — follow these, don't build URLs. A link is either an absolute URL or a host-relative reference (leading /) that already includes any prefix the serving surface is mounted under (e.g. a serverless gateway's /deployment/{deployment_id}/api/v2). Clients MUST resolve a host-relative link against the request origin (scheme + authority), never against a configured base URL — joining it to a base URL that carries the same mount prefix duplicates the prefix.
Show child attributes
Show child attributes
Values are nullable (a metric not yet available — e.g. execution_ms before a job starts running — is null, not omitted); the example below is deliberately all-non-null purely to work around a Spectral/nimma lint-tooling crash on a literal null inside a schema example combined with additionalProperties.nullable: true — the schema itself is unchanged and still allows null values at runtime.
Show child attributes
Show child attributes
{ "queue_ms": 9000, "execution_ms": 42000 }