実行履歴の取得(v2)
curl --request GET \
--url https://cloud.comfy.org/api/history_v2 \
--header 'X-API-Key: <api-key>'import requests
url = "https://cloud.comfy.org/api/history_v2"
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/history_v2', 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/history_v2",
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/history_v2"
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/history_v2")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.comfy.org/api/history_v2")
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{
"history": [
{
"prompt_id": "<string>",
"create_time": 123,
"workflow_id": "<string>",
"prompt": {
"priority": 123,
"prompt_id": "<string>",
"extra_data": {}
},
"outputs": {},
"status": {},
"meta": {}
}
]
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}job
実行履歴の取得(v2)
deprecated
非推奨。 代わりに/api/jobsを使用してください。このエンドポイントはComfyUI互換性のために維持されていますが、将来のリリースで削除される予定です。削除日は未定です。
認証されたユーザーの実行履歴をページネーションサポート付きで取得します。 フィルタリングされたプロンプトデータを含む軽量な履歴形式を返します(extra_pnginfoからワークフローが除去されています)。
GET
/
api
/
history_v2
実行履歴の取得(v2)
curl --request GET \
--url https://cloud.comfy.org/api/history_v2 \
--header 'X-API-Key: <api-key>'import requests
url = "https://cloud.comfy.org/api/history_v2"
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/history_v2', 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/history_v2",
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/history_v2"
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/history_v2")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.comfy.org/api/history_v2")
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{
"history": [
{
"prompt_id": "<string>",
"create_time": 123,
"workflow_id": "<string>",
"prompt": {
"priority": 123,
"prompt_id": "<string>",
"extra_data": {}
},
"outputs": {},
"status": {},
"meta": {}
}
]
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}承認
APIキー認証。アカウント設定からAPIキーを生成します (https://platform.comfy.org/profile/api-keys)。X-API-Keyヘッダーでキーを渡します。
レスポンス
成功:実行履歴を取得しました
履歴配列を含む実行履歴レスポンス。 "history"キーを持つオブジェクトを返し、その値は履歴エントリの配列です。 各エントリには、実行データとともにプロパティとしてprompt_idが含まれます。
作成時間順(最新が最初)に並べられた履歴エントリの配列
Show child attributes
Show child attributes
⌘I