> ## 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.

# Public Workflows

> Access and trigger public or unlisted workflows by organization nickname.

## Get Public Workflow Version

```
GET https://api.eachlabs.ai/v1/public/@{nickname}/workflows/{slug}/versions/{versionID}
```

Retrieve a public or unlisted workflow version. **No authentication required** for reading — send no `Authorization` header.

### Path Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `nickname` | string | Yes | Organization nickname (without `@` prefix) |
| `slug` | string | Yes | Workflow slug |
| `versionID` | string | Yes | Version identifier (e.g., `v1`) |

### Example

<CodeGroup>
  ```bash cURL theme={"dark"}
  curl https://api.eachlabs.ai/v1/public/@acme-corp/workflows/my-generator/versions/v1
  ```

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

  response = requests.get(
      "https://api.eachlabs.ai/v1/public/@acme-corp/workflows/my-generator/versions/v1"
  )
  version = response.json()
  print(f"Version: {version['version_id']}")
  ```
</CodeGroup>

### Response

```json theme={"dark"}
{
  "workflow_id": "50741f40-8621-4d46-8a91-dff4d873be98",
  "version_id": "v1",
  "slug": "my-generator",
  "name": "My Generator",
  "description": "Generates images from text prompts",
  "thumbnail": "https://storage.googleapis.com/uploads/thumb.png",
  "categories": ["image-generation"],
  "definition": { ... },
  "status": "active",
  "example_output": "https://storage.googleapis.com/uploads/example.png",
  "created_at": "2025-12-01T10:00:00Z",
  "updated_at": "2025-12-05T14:20:00Z"
}
```

<Note>
  `thumbnail`, `categories`, `definition`, and `example_output` are omitted from the response entirely when unset — they are never returned as `null` or `[]`.
</Note>

***

## Trigger Public Workflow Version

```
POST https://api.eachlabs.ai/v1/public/@{nickname}/workflows/{slug}/versions/{versionID}/trigger
```

Trigger a public or unlisted workflow. **Authentication required** via `api_key` in the request body — this route does not read `Authorization: Bearer`. An `X-API-Key` header is accepted as a fallback when `api_key` is absent from the body.

The organization that owns the key is billed for the run, not the organization that published the workflow. The version comes from the path.

### Path Parameters

Same as Get Public Workflow Version above.

### Request Body

| Field | Type | Required | Description |
| - | - | - | - |
| `api_key` | string | Yes | Your API key — this endpoint authenticates via the request body |
| `inputs` | object | No | Input parameters matching the workflow's input schema |
| `webhook_url` | string | No | URL to receive completion notification |
| `webhook_secret` | string | No | Shared secret used to sign webhook deliveries. When set, each delivery carries `X-Webhook-Signature` and `X-Webhook-Timestamp` — see [Verifying Webhook Signatures](/api/webhooks/verifying-signatures) |

### Example

```bash cURL theme={"dark"}
curl -X POST "https://api.eachlabs.ai/v1/public/@acme-corp/workflows/my-generator/versions/v1/trigger" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_API_KEY",
    "inputs": {"prompt": "A mountain landscape"}
  }'
```

### Response

**Status: `202 Accepted`**

```json theme={"dark"}
{
  "execution_id": "e2dba2bb-bc1d-4651-b6bf-fbbbebdee104",
  "status": "queued"
}
```

## Error Responses

Reading a version:

| Status | Body | Description |
| - | - | - |
| `404` | `{"error": "workflow version not found"}` | Invalid nickname, slug, or version — or the version isn't shared |

Triggering a version:

| Status | Body | Description |
| - | - | - |
| `401` | `{"error": "Invalid or missing API key"}` | Auth required for triggering |
| `402` | `{"error": "payment required"}` | Insufficient balance on the calling organization |
| `403` | `{"error": "forbidden"}` | The key is not allowed to trigger this workflow |
| `404` | `{"error": "workflow version not found or not publicly available"}` | Invalid nickname, slug, or version — or the version isn't shared |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.