> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://docs.butterix.com/en/llms.txt
> - v0: https://docs.butterix.com/en/v0/llms.txt

> For the MDX source of any page, append .mdx to the page URL.
> For a complete documentation index, see https://docs.butterix.com/en/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.butterix.com/_mcp/server.
> If something on this page is wrong or missing, POST JSON {"page": "<page URL>", "message": "<what is wrong>"} to https://docs.butterix.com/_biti/feedback/agent.

# List available models

`GET /ai/models`

Fetches the model list from the provider (cached for 10 minutes). With `site`, the site's key is used first; otherwise the platform key.
If the list can't be fetched, a built-in list is returned with `live: false` and `error`.

Base URL: https://api.butterix.com/v1

Authentication: bearer token in Authorization header or API key in cookie `biti_session`

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `provider` | enum | no | Allowed: `anthropic`, `deepseek`, `openrouter`. |
| `site` | string | no | Site slug or id |

## Example request

```bash
curl https://api.butterix.com/v1/ai/models \
     -H "Authorization: Bearer <token>"
```

## Responses

### 200

Models (recommended ones first)

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `models` | list of objects | no |  |
| `models[].id` | string | no |  |
| `models[].label` | string | no |  |
| `models[].contextWindow` | integer | no |  |
| `models[].pricing` | object | no | US dollars per million tokens (when the provider reports it) |
| `models[].pricing.input` | number | no |  |
| `models[].pricing.output` | number | no |  |
| `models[].recommended` | boolean | no |  |
| `models[].reasoning` | object | no | Reasoning effort the model supports; missing when it has none |
| `models[].reasoning.efforts` | list of enums | no | Levels from low to high, `none` turns thinking off; empty when the model thinks but has no levels to choose from |
| `models[].reasoning.suggested` | string | no | Level used when none is set |
| `models[].reasoning.default` | string | no | The model's own default level |
| `live` | boolean | no |  |
| `error` | string | no |  |

### Example response (200)

```json
{
  "models": [
    {
      "id": "claude-opus-5-5",
      "label": "Claude Opus 5.5",
      "contextWindow": 1000000,
      "pricing": {
        "input": 4,
        "output": 20
      },
      "recommended": true,
      "reasoning": {
        "efforts": [
          "none"
        ],
        "suggested": "low",
        "default": "high"
      }
    }
  ],
  "live": true,
  "error": "string"
}
```
