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

# Get Workflow

> Retrieve detailed information about a workflow including all versions.

## Endpoint

```
GET https://workflows.eachlabs.run/api/v1/workflows/{workflowID}
```

<Warning>
  This public URL uses a deprecated compatibility host outside the api-service host. It remains supported for now, but will soon move under `https://api.eachlabs.ai`. Keep integrations configurable and switch to the api-service URL once it is published.
</Warning>

You can use either the workflow UUID or slug as the `workflowID`.

## Path Parameters

| Parameter    | Type   | Required | Description           |
| ------------ | ------ | -------- | --------------------- |
| `workflowID` | string | Yes      | Workflow UUID or slug |

## Code Examples

<CodeGroup>
  ```bash cURL theme={"dark"}
  curl https://workflows.eachlabs.run/api/v1/workflows/50741f40-8621-4d46-8a91-dff4d873be98 \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```python Python theme={"dark"}
  import requests

  response = requests.get(
      "https://workflows.eachlabs.run/api/v1/workflows/text-to-image-generator",
      headers={"X-API-Key": "YOUR_API_KEY"}
  )
  workflow = response.json()
  print(f"{workflow['name']} | v{workflow['latest_version_id']}")
  ```

  ```javascript JavaScript theme={"dark"}
  const response = await fetch(
    "https://workflows.eachlabs.run/api/v1/workflows/text-to-image-generator",
    { headers: { "X-API-Key": "YOUR_API_KEY" } }
  );
  const workflow = await response.json();
  console.log(`${workflow.name} | v${workflow.latest_version_id}`);
  ```
</CodeGroup>

## Response

```json theme={"dark"}
{
  "workflow_id": "50741f40-8621-4d46-8a91-dff4d873be98",
  "slug": "text-to-image-generator",
  "name": "Text to Image Generator",
  "description": "Generates images from text prompts",
  "categories": ["image-generation"],
  "locked": false,
  "production": false,
  "latest_version_id": "v2",
  "status": "active",
  "trigger_count": 42,
  "created_at": "2025-12-01T10:00:00Z",
  "updated_at": "2025-12-07T15:30:00Z",
  "versions": [
    {
      "version_id": "v1",
      "slug": "text-to-image-generator",
      "locked": true,
      "production": false,
      "trigger_count": 27,
      "status": "active",
      "created_at": "2025-12-01T10:00:00Z",
      "updated_at": "2025-12-05T14:20:00Z"
    },
    {
      "version_id": "v2",
      "slug": "text-to-image-generator",
      "locked": false,
      "production": true,
      "trigger_count": 15,
      "status": "active",
      "created_at": "2025-12-05T14:20:00Z",
      "updated_at": "2025-12-07T15:30:00Z"
    }
  ]
}
```

## Error Responses

| Status | Body                                      | Description                 |
| ------ | ----------------------------------------- | --------------------------- |
| `401`  | `{"error": "Invalid or missing API key"}` | Authentication failure      |
| `404`  | `{"error": "workflow not found"}`         | Invalid workflow ID or slug |
