---
title: "Submit a workflow for execution"
method: POST
path: "/api/prompt"
tags: ["prompt"]
---

# Submit a workflow for execution

`POST /api/prompt`

Submits a workflow for execution. The server validates the graph, assigns a `prompt_id`, and enqueues it. Clients listen on `/ws` for execution progress and output messages.

## Request body

- PromptRequest — A workflow submission. Wraps the prompt graph plus optional client identifier and extra per-request data.
  - `prompt` object, required — The workflow graph to execute. Keys are node IDs (strings); values are objects with class_type and inputs.
  - `number` number — Priority number for the queue (lower numbers have higher priority)
  - `front` boolean — If true, adds the prompt to the front of the queue
  - `extra_data` object — Extra data associated with the prompt (e.g. extra_pnginfo)
  - `client_id` string — WebSocket client ID to receive progress updates
  - `prompt_id` string, uuid — Client-supplied prompt ID. Server generates a UUID if omitted.
  - `partial_execution_targets` string[] — List of node IDs to execute (partial graph execution)

## Response `200`

Prompt accepted

- PromptResponse — Server acknowledgement of a workflow submission. Includes the assigned `prompt_id` and current queue position.
  - `prompt_id` string, uuid — Unique identifier for the prompt execution
  - `number` number — Priority number in the queue
  - `node_errors` object — Validation errors keyed by node ID
  - `error` union — Top-level prompt error (string message or structured error)
    - string
    - PromptError — Structured prompt validation error
      - `type` string
      - `message` string
      - `details` string

## Other responses

- `400` — Validation or node errors

## Changes

- **2026-04-24** `a66055fa384e` — 2 warning, 10 info
  - removed the request property `workflow_id`
  - removed the request property `workflow_version_id`
  - api tag `prompt` added
  - api tag `workflow` removed
  - …8 more

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/prompt/post.md)

---

[API](https://skmtc.dev/comfy-org/apis/comfyui-api.md) · [All operations](https://skmtc.dev/comfy-org/apis/comfyui-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/comfy-org/comfyui-api/revisions/a66055fa384e/schema)
