작업 상태 가져오기
curl --request GET \
--url https://cloud.comfy.org/api/job/{job_id}/status \
--header 'X-API-Key: <api-key>'import requests
url = "https://cloud.comfy.org/api/job/{job_id}/status"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://cloud.comfy.org/api/job/{job_id}/status', 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://cloud.comfy.org/api/job/{job_id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://cloud.comfy.org/api/job/{job_id}/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cloud.comfy.org/api/job/{job_id}/status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.comfy.org/api/job/{job_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_state_update": "2023-11-07T05:31:56Z",
"assigned_inference": "<string>",
"error_message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}job
작업 상태 가져오기
특정 작업의 현재 상태를 ID로 반환합니다.
GET
/
api
/
job
/
{job_id}
/
status
작업 상태 가져오기
curl --request GET \
--url https://cloud.comfy.org/api/job/{job_id}/status \
--header 'X-API-Key: <api-key>'import requests
url = "https://cloud.comfy.org/api/job/{job_id}/status"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://cloud.comfy.org/api/job/{job_id}/status', 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://cloud.comfy.org/api/job/{job_id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://cloud.comfy.org/api/job/{job_id}/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cloud.comfy.org/api/job/{job_id}/status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.comfy.org/api/job/{job_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_state_update": "2023-11-07T05:31:56Z",
"assigned_inference": "<string>",
"error_message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}인증
API 키 인증. 계정 설정에서 API 키를 생성하세요. https://platform.comfy.org/profile/api-keys 에서 생성할 수 있습니다. X-API-Key 헤더에 키를 전달하세요.
경로 매개변수
작업의 고유 ID
응답
성공: 작업 상태가 반환되었습니다.
작업 상태 정보
작업 ID
현재 작업 상태
사용 가능한 옵션:
waiting_to_dispatch, pending, in_progress, completed, error, cancelled 작업이 생성된 시간
작업이 마지막으로 업데이트된 시간
작업 상태가 마지막으로 변경된 시간
이 작업에 할당된 추론 인스턴스(있는 경우)
작업 실패 시 오류 메시지
⌘I