Add a short headless API quickstart for /prompt and API-format workflows
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
I was trying to drive ComfyUI from a script since the project is described as a GUI, API, and backend, but I had trouble finding a minimal end-to-end API example from the README/docs.
The main stumbling block was realizing that the workflow JSON exported from the UI is not the same shape that `/prompt` expects. It took me a bit to figure out that the API wants a node-ID-keyed object with `class_type` and `inputs`, roughly like:
```json
{
"prompt": {
"3": {
"class_type": "KSampler",
"inputs": { }
}
}
}
```
It would save a lot of confusion if there were a small quickstart section somewhere prominent covering:
- how to enable the API/dev mode options if needed
- how to export the API-format workflow (`Save (API)`)
- a minimal `curl` or Python example posting to `/prompt`
- how to check execution status via `/history` or `/queue`
Even just a one-paragraph warning that UI workflow JSON is not directly the `/prompt` payload would probably prevent a lot of beginner issues.
Contributor guide
Research direction
Start by reviewing the README/docs entry points and the /prompt, /history, and /queue API workflows described in the issue. Add a prominent quickstart covering API/dev options, Save (API) export, a minimal curl or Python request, status checks, and the distinction between UI workflow JSON and the /prompt payload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100