Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions openapi-cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,10 @@ paths:
tags:
- job
summary: Get execution history (v2)
deprecated: true
description: |
**Deprecated.** Use [`/api/jobs`](#tag/job/GET/api/jobs) instead. This endpoint is maintained for ComfyUI compatibility but will be removed in a future release; no removal date set.

Retrieve execution history for the authenticated user with pagination support.
Returns a lightweight history format with filtered prompt data (workflow removed from extra_pnginfo).
operationId: getHistory
Expand Down Expand Up @@ -494,7 +497,10 @@ paths:
tags:
- job
summary: Get history for specific prompt
deprecated: true
description: |
**Deprecated.** Use [`/api/jobs/{job_id}`](#tag/job/GET/api/jobs/{job_id}) instead — the `prompt_id` returned by `/api/prompt` is the same value as `job_id`. This endpoint is maintained for ComfyUI compatibility but will be removed in a future release; no removal date set.

Retrieve detailed execution history for a specific prompt ID.
Returns full history data including complete prompt information.
operationId: getHistoryForPrompt
Expand Down
18 changes: 9 additions & 9 deletions snippets/cloud/complete-example.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ async function main() {
await new Promise((resolve) => setTimeout(resolve, 2000));
}

// 4. Get outputs via history endpoint
const historyRes = await fetch(`${BASE_URL}/api/history_v2/${prompt_id}`, {
// 4. Get outputs via job detail endpoint
const jobRes = await fetch(`${BASE_URL}/api/jobs/${prompt_id}`, {
headers: { "X-API-Key": API_KEY },
});
const history = await historyRes.json();
const outputs = history.outputs;
const job = await jobRes.json();
const outputs = job.outputs;

// 5. Download output files
for (const nodeOutputs of Object.values(outputs)) {
Expand Down Expand Up @@ -104,13 +104,13 @@ def main():
raise RuntimeError(f"Job {status}")
time.sleep(2)

# 4. Get outputs via history endpoint
history_res = requests.get(
f"{BASE_URL}/api/history_v2/{prompt_id}",
# 4. Get outputs via job detail endpoint
job_res = requests.get(
f"{BASE_URL}/api/jobs/{prompt_id}",
headers={"X-API-Key": API_KEY}
)
history = history_res.json()
outputs = history["outputs"]
job = job_res.json()
outputs = job["outputs"]

# 5. Download output files
for node_outputs in outputs.values():
Expand Down
18 changes: 9 additions & 9 deletions snippets/zh/cloud/complete-example.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ async function main() {
await new Promise((resolve) => setTimeout(resolve, 2000));
}

// 4. 通过历史端点获取输出
const historyRes = await fetch(`${BASE_URL}/api/history_v2/${prompt_id}`, {
// 4. 通过任务详情端点获取输出
const jobRes = await fetch(`${BASE_URL}/api/jobs/${prompt_id}`, {
headers: { "X-API-Key": API_KEY },
});
const history = await historyRes.json();
const outputs = history.outputs;
const job = await jobRes.json();
const outputs = job.outputs;

// 5. 下载输出文件
for (const nodeOutputs of Object.values(outputs)) {
Expand Down Expand Up @@ -104,13 +104,13 @@ def main():
raise RuntimeError(f"任务 {status}")
time.sleep(2)

# 4. 通过历史端点获取输出
history_res = requests.get(
f"{BASE_URL}/api/history_v2/{prompt_id}",
# 4. 通过任务详情端点获取输出
job_res = requests.get(
f"{BASE_URL}/api/jobs/{prompt_id}",
headers={"X-API-Key": API_KEY}
)
history = history_res.json()
outputs = history["outputs"]
job = job_res.json()
outputs = job["outputs"]

# 5. 下载输出文件
for node_outputs in outputs.values():
Expand Down
Loading