> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.agentrouter.to/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.agentrouter.to/_mcp/server.

# List All Models

Returns the current OpenRouter-backed model catalog. Listing models costs **0 credits**.

```http
POST /domains/models/capabilities/list/execute
```

Use a returned `models[].id` as the `model` value in [Chat Completion](/domains/models/chat-completion).

## Request

The catalog requires no capability input. The SDK pins the free direct route automatically.

#### TypeScript SDK

```ts
import { AgentRouterClient } from "@agentrouter/agentrouter";

const client = new AgentRouterClient({
  apiKey: process.env.AGENTIC_API_KEY,
});

const catalog = await client.models.catalog.list();

console.log(catalog.modelCount);
console.table(catalog.models.slice(0, 10));
```

#### cURL

```bash
curl -X POST \
  "https://api.agentrouter.to/api/agentic-api/domains/models/capabilities/list/execute" \
  -H "Authorization: Bearer $AGENTIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "routeKey": "models.list.openrouter",
    "allowFallback": false
  }'
```

### Routing fields

| Field                     | Type      | Required | Description                                                          |
| ------------------------- | --------- | -------- | -------------------------------------------------------------------- |
| `routeKey`                | string    | no       | Pin `models.list.openrouter`. The SDK helper sets this for you.      |
| `provider`                | string    | no       | Provider hint. The direct catalog route uses `openrouter`.           |
| `allowFallback`           | boolean   | no       | Allow another compatible catalog route. The SDK helper sets `false`. |
| `optimizationPreferences` | string\[] | no       | Route preferences: `cost`, `speed`, `reliability`, or `quality`.     |

## Response

```json
{
  "success": true,
  "routeKey": "models.list.openrouter",
  "provider": "openrouter",
  "networkKey": "direct",
  "creditsCharged": 0,
  "modelCount": 459,
  "pricingUnit": "credits_per_million_tokens",
  "creditsPerUsd": 1000,
  "pricingNote": "Catalog prices are estimates; paid execution returns the final charge.",
  "models": [
    {
      "id": "openai/gpt-4.1-nano",
      "name": "OpenAI: GPT-4.1 Nano",
      "contextLength": 1047576,
      "supported_parameters": [
        "max_tokens",
        "temperature",
        "top_p"
      ],
      "agentRouterPricing": {
        "inputCreditsPerMillionTokens": 100,
        "outputCreditsPerMillionTokens": 400,
        "creditsPerUsd": 1000,
        "estimateOnly": true
      }
    }
  ]
}
```

Catalog size and model availability change over time. The values above show the response shape, not a permanent model list.

### Top-level response fields

| Field            | Type      | Description                               |
| ---------------- | --------- | ----------------------------------------- |
| `modelCount`     | number    | Number of models returned now.            |
| `models`         | object\[] | Live catalog entries.                     |
| `pricingUnit`    | string    | `credits_per_million_tokens`.             |
| `creditsPerUsd`  | number    | Credit conversion. Currently `1000`.      |
| `creditsCharged` | number    | Always `0` for this direct catalog route. |
| `routeKey`       | string    | Route that produced the catalog.          |

### Model fields

| Field                  | Type      | Description                                                                              |
| ---------------------- | --------- | ---------------------------------------------------------------------------------------- |
| `id`                   | string    | Exact ID to pass to Chat Completion's `model` field.                                     |
| `name`                 | string    | Human-readable model name.                                                               |
| `description`          | string    | Provider description when available.                                                     |
| `contextLength`        | number    | Maximum combined context advertised by the catalog. It is not the maximum output length. |
| `inputModalities`      | string\[] | Accepted modalities when published.                                                      |
| `outputModalities`     | string\[] | Returned modalities when published.                                                      |
| `supported_parameters` | string\[] | Parameters advertised for this model. Check before sending optional fields.              |
| `agentRouterPricing`   | object    | Estimated input and output prices in credits per one million tokens.                     |

## Select a model safely

```ts
const catalog = await client.models.catalog.list();
const model = catalog.models.find(
  (candidate) => candidate.id === "openai/gpt-4.1-nano",
);

if (!model) throw new Error("Model is unavailable");

const supportsTemperature =
  model.supported_parameters?.includes("temperature") ?? false;
```

## Errors

| Status | Meaning                                                    | Fix                                                                    |
| ------ | ---------------------------------------------------------- | ---------------------------------------------------------------------- |
| `401`  | Missing or invalid AgentRouter API key                     | Send `Authorization: Bearer aak_...`.                                  |
| `404`  | Capability or route key is wrong                           | Use `models`, `list`, and `models.list.openrouter`.                    |
| `5xx`  | Catalog provider or AgentRouter is temporarily unavailable | Retry with backoff; do not replace the last known catalog immediately. |

## Next step

Take `models[0].id` or another selected ID and pass it to [Chat Completion](/domains/models/chat-completion).