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

# Submit a workflow for execution

`POST /api/prompt`

Submit a workflow to be executed by the backend.
The workflow is a JSON object describing the nodes and their connections.

## Request body

- PromptRequest — Request body for submitting a ComfyUI workflow prompt for execution.
  - `extra_data` object — Extra data to be associated with the prompt
  - `front` boolean — If true, adds the prompt to the front of the queue
  - `number` number — Priority number for the queue (lower numbers have higher priority)
  - `partial_execution_targets` string[] — List of node names to execute
  - `prompt` object, required — The workflow graph to execute
  - `workflow_id` string — UUID identifying the cloud workflow entity to associate with this job
  - `workflow_version_id` string — UUID identifying the workflow version to associate with this job

## Response `200`

Success - Prompt accepted

- PromptResponse — Response returned after successfully queuing a workflow prompt.
  - `node_errors` object — Any errors in the nodes of the prompt
  - `number` number — Priority number in the queue
  - `prompt_id` string, uuid — Unique identifier for the prompt execution

## Other responses

- `400` — Invalid prompt
- `402` — Payment required - Insufficient credits
- `413` — Workflow JSON too large
- `429` — Payment required - User has not paid
- `500` — Internal server error
- `503` — Service unavailable

---

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