---
title: "Queue a generation prompt"
method: POST
path: "/queue_prompt"
tags: ["ComfyUI"]
---

# Queue a generation prompt

`POST /queue_prompt`

Sends a workflow prompt to the ComfyUI backend for processing. The prompt field is a map where keys are node IDs (strings) and values are objects defining the node's class_type and inputs. Example: `{"3": {"class_type": "KSampler", "inputs": {"seed": 123}}}`

## Request body

- ApiQueuePromptRequest
  - `prompt` object, required

## Response `200`

Successfully queued prompt

- ComfyuiPromptResponse
  - `node_errors` object — Use omitempty if it can be absent
  - `number` integer
  - `prompt_id` string

## Other responses

- `400` — Bad Request (e.g., invalid JSON)
- `401` — Unauthorized (Invalid or missing Bearer token)
- `500` — Internal Server Error (e.g., ComfyUI unreachable)

---

[API](https://skmtc.dev/google/apis/comfyui-api-service-via-gin.md) · [All operations](https://skmtc.dev/google/apis/comfyui-api-service-via-gin/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/comfyui-api-service-via-gin/revisions/0ff52c8365aa/schema)
