# List models

List the LLM models available to your organization.





Returns the LLM catalog. The `id` of each entry is a model slug (for example `opus-4.5`, `sonnet-4.6`, `claude-opus-4-7`) — pass it as `entity_id` when assigning an `llm_model` via [`POST /agents/{agent_id}/resources`](/api/agent-resources/assign).

```http
GET /api/public/v1/models
```

## Query parameters [#query-parameters]

| Parameter  | Type   | Description                                                                                                                                                    |
| ---------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider` | string | Filter the catalog to a single provider (e.g. `anthropic`, `opencode`, `codex`). When omitted, returns all models the calling organization is entitled to use. |

## Example [#example]

<Tabs items="[&#x22;bash&#x22;, &#x22;TypeScript&#x22;, &#x22;Ruby&#x22;, &#x22;Python&#x22;, &#x22;Go&#x22;]">
  <Tab value="bash">
    ```bash
    curl -X GET "https://api.nairi.ai/api/public/v1/models?provider=anthropic" \
      -H "Authorization: Bearer $NAIRI_API_KEY"
    ```
  </Tab>

  <Tab value="TypeScript">
    ```ts
    const url = new URL("https://api.nairi.ai/api/public/v1/models");
    url.searchParams.set("provider", "anthropic");

    const res = await fetch(url, {
      headers: { Authorization: `Bearer ${process.env.NAIRI_API_KEY}` },
    });
    const models = (await res.json()) as Array<{
      id: string;
      display_name: string;
      input_price: number | null;
      output_price: number | null;
      is_free: boolean;
    }>;
    ```
  </Tab>

  <Tab value="Ruby">
    ```ruby
    require "net/http"
    require "json"
    require "uri"

    uri = URI("https://api.nairi.ai/api/public/v1/models")
    uri.query = URI.encode_www_form(provider: "anthropic")
    req = Net::HTTP::Get.new(uri)
    req["Authorization"] = "Bearer #{ENV['NAIRI_API_KEY']}"

    res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
    models = JSON.parse(res.body)
    ```
  </Tab>

  <Tab value="Python">
    ```python
    import os
    import requests

    res = requests.get(
        "https://api.nairi.ai/api/public/v1/models",
        headers={"Authorization": f"Bearer {os.environ['NAIRI_API_KEY']}"},
        params={"provider": "anthropic"},
    )
    models = res.json()
    ```
  </Tab>

  <Tab value="Go">
    ```go
    package main

    import (
    	"encoding/json"
    	"fmt"
    	"io"
    	"net/http"
    	"net/url"
    	"os"
    )

    func main() {
    	params := url.Values{}
    	params.Set("provider", "anthropic")
    	req, _ := http.NewRequest("GET", "https://api.nairi.ai/api/public/v1/models?"+params.Encode(), nil)
    	req.Header.Set("Authorization", "Bearer "+os.Getenv("NAIRI_API_KEY"))
    	res, _ := http.DefaultClient.Do(req)
    	defer res.Body.Close()
    	raw, _ := io.ReadAll(res.Body)
    	var models []map[string]any
    	json.Unmarshal(raw, &models)
    	fmt.Println(models)
    }
    ```
  </Tab>
</Tabs>

## Response: `200 OK` [#response-200-ok]

```json
[
  {
    "id": "claude-opus-4-7",
    "display_name": "Claude Opus 4.7",
    "input_price": 15.0,
    "output_price": 75.0,
    "is_free": false
  },
  {
    "id": "sonnet-4.6",
    "display_name": "Claude Sonnet 4.6",
    "input_price": 3.0,
    "output_price": 15.0,
    "is_free": false
  }
]
```

## Response fields [#response-fields]

| Field          | Type           | Description                                                    |
| -------------- | -------------- | -------------------------------------------------------------- |
| `id`           | string         | Model slug. Pass as `entity_id` when assigning `llm_model`.    |
| `display_name` | string         | Human-readable model name.                                     |
| `input_price`  | number \| null | Input price per 1M tokens (USD). `null` for free-tier models.  |
| `output_price` | number \| null | Output price per 1M tokens (USD). `null` for free-tier models. |
| `is_free`      | boolean        | `true` for models included in the Nairi free tier.             |
