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

# Prompts

> Read prompt versions for a project

## List active prompts

```http theme={null}
GET /api/prompts
```

Returns the active version of every prompt in a project. There is one prompt per pipeline step, and exactly one version of each prompt is active at a time.

### Query parameters

<ParamField query="projectSlug" type="string">
  The project slug. Required if `projectId` is not provided.
</ParamField>

<ParamField query="projectId" type="string">
  The project UUID. Required if `projectSlug` is not provided.
</ParamField>

### Response

```json theme={null}
{
  "prompts": [
    {
      "id": "uuid",
      "stepId": "classify",
      "content": "You are a helpful classifier...",
      "outputSchema": { "type": "object", "properties": { ... } },
      "createdAt": "2026-04-01T12:00:00.000Z",
      "updatedAt": "2026-04-08T09:30:00.000Z"
    }
  ]
}
```

### Example

<CodeGroup>
  ```bash curl theme={null}
  curl "https://app.artanis.ai/api/prompts?projectSlug=my-project" \
    -H "x-api-key: $ARTANIS_API_KEY" \
    -H "x-org-slug: my-org"
  ```

  ```python Python theme={null}
  import os, requests

  r = requests.get(
      "https://app.artanis.ai/api/prompts",
      params={"projectSlug": "my-project"},
      headers={
          "x-api-key": os.environ["ARTANIS_API_KEY"],
          "x-org-slug": "my-org",
      },
  )
  prompts = r.json()["prompts"]
  ```

  ```typescript TypeScript theme={null}
  const res = await fetch("https://app.artanis.ai/api/prompts?projectSlug=my-project", {
    headers: {
      "x-api-key": process.env.ARTANIS_API_KEY!,
      "x-org-slug": "my-org",
    },
  });
  const { prompts } = await res.json();
  ```
</CodeGroup>

## Get a prompt with version history

```http theme={null}
GET /api/prompts/{promptId}
```

Returns a single prompt and every version of it (active and inactive), oldest first.

### Path parameters

<ParamField path="promptId" type="string" required>
  The prompt UUID.
</ParamField>

### Response

```json theme={null}
{
  "id": "uuid",
  "stepId": "classify",
  "outputSchema": { ... },
  "versions": [
    {
      "id": "uuid",
      "content": "...",
      "isActive": false,
      "createdAt": "2026-03-01T00:00:00.000Z"
    },
    {
      "id": "uuid",
      "content": "...",
      "isActive": true,
      "createdAt": "2026-04-01T00:00:00.000Z"
    }
  ]
}
```

<Tip>
  Use the list endpoint to discover prompt IDs, then call the detail endpoint for full version history when you need to
  diff versions.
</Tip>
