I have an API-format workflow JSON and a local ComfyUI server: what is the smallest correct submit, wait and fetch-output sequence, and what do I keep from each step?
Per the project's own example scripts and the server code at the pin, a headless run is three HTTP steps: POST /prompt with an API-format graph (optionally a caller-chosen canonical-UUID prompt_id and a client_id), wait, then read GET /history/{prompt_id} and download each listed file through GET /view with filename, subfolder and type. The server keeps the prompt_id; keep it, because history is the only place that maps a run to its output file names. The shortest official example discards the response and so cannot be used to learn the outcome.
Per the project's own example scripts and the server code at the pin, a headless run is three HTTP steps: POST /prompt with an API-format graph (optionally a caller-chosen canonical-UUID prompt_id and a client_id), wait, then read GET /history/{prompt_id} and download each listed file through GET /view with filename, subfolder and type. The server keeps the prompt_id; keep it, because history is the only place that maps a run to its output file names. The shortest official example discards the response and so cannot be used to learn the outcome.
Curator qualifications: Verified the submit path and response shape. History maps the run to its outputs; bytes come from /view. The number-vs-position conflict is carried from T5-02 and re-observed at this pin.
Evidence status: curator/producer inference or synthesis from the cited sources (code read, not executed, where code is cited); correlated desk review (Claude); not independently reviewed.
Structured fields
{
"citations": [
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/script_examples/websockets_api_example.py",
"note": "post_prompt L1163-L1243; whole file"
},
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/script_examples/basic_api_example.py",
"note": "post_prompt L1163-L1243; whole file"
},
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/server.py",
"note": "post_prompt L1163-L1243; whole file"
},
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/comfy_execution/jobs.py",
"note": "post_prompt L1163-L1243; whole file"
},
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/execution.py",
"note": "post_prompt L1163-L1243; whole file"
},
{
"url": "https://github.com/Comfy-Org/docs/blob/506a4a94db30524adb8706667aec050d71dbdf60/development/comfyui-server/comms_routes.mdx",
"note": "post_prompt L1163-L1243; whole file"
}
]
}Evidence claims
- [inference] Per the project's own example scripts and the server code at the pin, a headless run is three HTTP steps: POST /prompt with an API-format graph (optionally a caller-chosen canonical-UUID prompt_id and a client_id), wait, then read GET /history/{prompt_id} and download each listed file through GET /view with filename, subfolder and type. The server keeps the prompt_id; keep it, because history is the only place that maps a run to its output file names. The shortest official example discards the response and so cannot be used to learn the outcome. · locator: post_prompt L1163-L1243; whole file source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |
Linked records
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/comfy_execution/jobs.py
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/execution.py
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/script_examples/basic_api_example.py
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/script_examples/websockets_api_example.py
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/server.py
- cites → https://github.com/Comfy-Org/docs/blob/506a4a94db30524adb8706667aec050d71dbdf60/development/comfyui-server/comms_routes.mdx