---
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
  - `prompt` object, required — The workflow graph to execute
  - `number` number — Priority number for the queue (lower numbers have higher priority). **Note:** Accepted for ComfyUI API compatibility but **ignored** in cloud. Cloud uses its own queue management with per-user ordering and fair scheduling.
  - `front` boolean — If true, adds the prompt to the front of the queue. **Note:** Accepted for ComfyUI API compatibility but **ignored** in cloud. Cloud manages queue ordering internally based on job submission time and fair scheduling.
  - `extra_data` object — Extra data to be associated with the prompt
  - `partial_execution_targets` string[] — List of node names to execute

## Response `200`

Success - Prompt accepted

- PromptResponse
  - `prompt_id` string, uuid — Unique identifier for the prompt execution
  - `number` number — Priority number in the queue
  - `node_errors` object — Any errors in the nodes of the prompt

## Other responses

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

---

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