> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfycontrol.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Workflow

> Retrieve detailed information about a specific workflow

## Overview

Retrieve complete details about a specific workflow by its ID, including execution status, parameters, and error information if applicable.

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier (UUID) of the workflow to retrieve.
</ParamField>

## Response

<ResponseField name="id" type="string" required>
  Unique identifier (UUID) for the workflow.
</ResponseField>

<ResponseField name="user_id" type="string" required>
  UUID of the user who owns this workflow.
</ResponseField>

<ResponseField name="name" type="string" required>
  The workflow's name.
</ResponseField>

<ResponseField name="status" type="string" required>
  Current status of the workflow.

  Possible values: `accepted`, `uploaded`, `queued`, `running`, `completed`, `cancelled`, `invalid`, `failed`
</ResponseField>

<ResponseField name="user_runner_id" type="string">
  UUID of the user-owned runner executing this workflow (null if using managed runner).
</ResponseField>

<ResponseField name="managed_runner_id" type="string">
  UUID of the managed runner executing this workflow (null if using user-owned runner).
</ResponseField>

<ResponseField name="tags" type="string[]" required>
  Array of tags associated with the workflow.
</ResponseField>

<ResponseField name="workflow_json" type="object" required>
  The ComfyUI workflow definition as a JSON object.
</ResponseField>

<ResponseField name="workflow_params" type="array" required>
  Array of parameter tuples `[parameter_name, parameter_value]` used in this workflow execution.
</ResponseField>

<ResponseField name="prompt_id" type="string">
  ComfyUI prompt ID assigned when the workflow is queued (null if not yet queued).
</ResponseField>

<ResponseField name="queue_number" type="integer">
  Position in the runner's execution queue (null if not yet queued).
</ResponseField>

<ResponseField name="error_node" type="string">
  The ComfyUI node that caused the failure (only present if status is `failed`).
</ResponseField>

<ResponseField name="exception_type" type="string">
  Type of exception that occurred (only present if status is `failed`).
</ResponseField>

<ResponseField name="exception_message" type="string">
  Detailed error message (only present if status is `failed`).
</ResponseField>

<ResponseField name="created_at" type="string" required>
  ISO 8601 timestamp when the workflow was created.
</ResponseField>

<ResponseField name="updated_at" type="string" required>
  ISO 8601 timestamp when the workflow was last updated.
</ResponseField>

<ResponseField name="started_at" type="string">
  ISO 8601 timestamp when execution started (null if not yet started).
</ResponseField>

<ResponseField name="completed_at" type="string">
  ISO 8601 timestamp when execution completed (null if not yet completed).
</ResponseField>

## Example Response (Completed)

```json theme={null}
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "user_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "name": "Text to Image Generation",
  "status": "completed",
  "user_runner_id": "550e8400-e29b-41d4-a716-446655440000",
  "managed_runner_id": null,
  "tags": ["production", "text2img"],
  "workflow_json": {
    "nodes": [...],
    "links": [...],
    "config": {...}
  },
  "workflow_params": [
    ["$text(prompt)", "A beautiful sunset over mountains"],
    ["#choice(sampler)", "euler_ancestral"]
  ],
  "prompt_id": "8f3a9c2b-1234-5678-9abc-def012345678",
  "queue_number": 1,
  "error_node": null,
  "exception_type": null,
  "exception_message": null,
  "created_at": "2024-01-15T14:30:00Z",
  "updated_at": "2024-01-15T14:32:15Z",
  "started_at": "2024-01-15T14:30:05Z",
  "completed_at": "2024-01-15T14:32:15Z"
}
```

## Example Response (Failed)

```json theme={null}
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "user_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "name": "Image Upscaling",
  "status": "failed",
  "user_runner_id": null,
  "managed_runner_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "tags": ["upscale"],
  "workflow_json": {...},
  "workflow_params": [
    ["$file(input_image)", "inputs/b2c3d4e5-f6a7-8901/image.png"]
  ],
  "prompt_id": "9g4b0d3c-2345-6789-0bcd-ef123456789a",
  "queue_number": 2,
  "error_node": "UpscaleModelLoader",
  "exception_type": "FileNotFoundError",
  "exception_message": "Model file 'RealESRGAN_x4.pth' not found",
  "created_at": "2024-01-15T14:20:00Z",
  "updated_at": "2024-01-15T14:21:30Z",
  "started_at": "2024-01-15T14:20:10Z",
  "completed_at": "2024-01-15T14:21:30Z"
}
```

## Error Responses

<ResponseField name="401" type="error">
  Unauthorized - invalid or missing authentication token.
</ResponseField>

<ResponseField name="404" type="error">
  Not Found - workflow with the specified ID does not exist or does not belong to your account.
</ResponseField>

## Notes

* Use this endpoint to get complete workflow details including execution parameters
* Error information is only present when status is `failed`
* Either `user_runner_id` or `managed_runner_id` will be set, never both
* The `workflow_json` contains the full ComfyUI workflow definition
* Parameter values in `workflow_params` show the actual values used, including file paths for uploaded files
* Use the subscribe endpoint for real-time status updates instead of polling this endpoint
* Queue position updates as other workflows complete
