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

# List Models

> Retrieve the PipeLLM unified model catalog from /v1/models

Use this route to retrieve the model IDs currently visible to your account.
`/v1/models` returns PipeLLM's unified model schema, not the native OpenAI or
Anthropic list-model format.

## Endpoint

```text theme={null}
GET https://api.pipellm.ai/v1/models
```

## Authentication

Use a standard PipeLLM API key header:

| Header          | Example                   |
| --------------- | ------------------------- |
| `Authorization` | `Bearer $PIPELLM_API_KEY` |
| `x-api-key`     | `$PIPELLM_API_KEY`        |

## Notes

* This route only supports `GET`.
* The response is PipeLLM's unified schema.
* Hidden and unlisted models are filtered out before the response is returned.
* Results are sorted by model ID.
* Each model includes a `pricing` object by default. PipeLLM groups pricing by billing shape instead of exposing raw mapping table field names.

## Example Requests

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl https://api.pipellm.ai/v1/models \
      -H "Authorization: Bearer $PIPELLM_API_KEY"
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import os
    import requests

    response = requests.get(
        "https://api.pipellm.ai/v1/models",
        headers={"Authorization": f"Bearer {os.getenv('PIPELLM_API_KEY')}"},
    )

    response.raise_for_status()
    payload = response.json()

    for model in payload["data"]:
        print(model["id"], model["pricing"]["kind"])
    ```
  </Tab>

  <Tab title="Node.js">
    ```javascript theme={null}
    const response = await fetch("https://api.pipellm.ai/v1/models", {
      headers: {
        Authorization: `Bearer ${process.env.PIPELLM_API_KEY}`,
      },
    });

    if (!response.ok) {
      throw new Error(`Request failed: ${response.status}`);
    }

    const payload = await response.json();
    for (const model of payload.data) {
      console.log(model.id, model.pricing.kind);
    }
    ```
  </Tab>
</Tabs>

## Response Format

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "gpt-5",
      "display_name": "Gpt 5",
      "type_target": "openai",
      "created_at": "2025-05-14T00:00:00Z",
      "pricing": {
        "kind": "token",
        "text": {
          "prompt": "0.000003",
          "completion": "0.000015",
          "internal_reasoning": "0.000015"
        },
        "cache": {
          "read": "0.000001",
          "write": "0.00000375",
          "write_1h": "0.0000075"
        },
        "tiers": {
          "over_200k": {
            "text": {
              "prompt": "0.0000055",
              "completion": "0.000022",
              "internal_reasoning": "0.000022"
            },
            "cache": {
              "read": "0.0000009",
              "write": "0.0000033",
              "write_1h": "0.0000066"
            }
          }
        }
      }
    },
    {
      "id": "sora-2",
      "display_name": "Sora 2",
      "type_target": "openai",
      "created_at": "2025-03-01T00:00:00Z",
      "pricing": {
        "kind": "generation",
        "generation": {
          "video": {
            "per_second": "0.1",
            "per_second_with_audio": "0.2"
          }
        }
      }
    }
  ],
  "total": 2
}
```

Token-priced fields are returned as USD per token. Generation-priced fields use their natural billing units, such as USD per image or USD per second.

## Response Fields

| Field                                                   | Type    | Description                                                                                                                                    |
| ------------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `object`                                                | string  | Always `"list"`                                                                                                                                |
| `data`                                                  | array   | Array of model objects                                                                                                                         |
| `data[].id`                                             | string  | Model ID used in API requests                                                                                                                  |
| `data[].display_name`                                   | string  | Human-readable label generated from the model ID                                                                                               |
| `data[].type_target`                                    | string  | Target protocol family for routing, such as `openai`, `anthropic`, or `gemini`                                                                 |
| `data[].created_at`                                     | string  | RFC3339 timestamp chosen from the model metadata                                                                                               |
| `data[].pricing`                                        | object  | Pricing returned with the model by default                                                                                                     |
| `data[].pricing.kind`                                   | string  | Billing shape for the model, currently `token` or `generation`                                                                                 |
| `data[].pricing.text`                                   | object  | Base token pricing for text or multimodal-understanding models                                                                                 |
| `data[].pricing.text.prompt`                            | string  | Input token price in USD per token                                                                                                             |
| `data[].pricing.text.completion`                        | string  | Output token price in USD per token                                                                                                            |
| `data[].pricing.text.internal_reasoning`                | string  | Hidden internal reasoning token price in USD per token for OpenAI thinking models. When present, it follows the billed completion/output rate. |
| `data[].pricing.cache`                                  | object  | Cache pricing for token-based models when available                                                                                            |
| `data[].pricing.cache.read`                             | string  | Cache read price in USD per token                                                                                                              |
| `data[].pricing.cache.write`                            | string  | Cache write price in USD per token                                                                                                             |
| `data[].pricing.cache.write_1h`                         | string  | 1-hour cache write price in USD per token                                                                                                      |
| `data[].pricing.multimodal`                             | object  | Token-based multimodal pricing when available                                                                                                  |
| `data[].pricing.multimodal.input_image`                 | string  | Input image token price in USD per token                                                                                                       |
| `data[].pricing.multimodal.output_image`                | string  | Output image token price in USD per token                                                                                                      |
| `data[].pricing.tiers`                                  | object  | Tiered pricing when the model has alternate rates                                                                                              |
| `data[].pricing.tiers.over_200k`                        | object  | Pricing used above the 200k token tier                                                                                                         |
| `data[].pricing.generation`                             | object  | Output-generation pricing for pure image, audio, or video models                                                                               |
| `data[].pricing.generation.image.per_image`             | string  | Image generation price in USD per image                                                                                                        |
| `data[].pricing.generation.audio.per_second`            | string  | Audio generation price in USD per second                                                                                                       |
| `data[].pricing.generation.video.per_second`            | string  | Video generation price in USD per second                                                                                                       |
| `data[].pricing.generation.video.per_second_with_audio` | string  | Video-with-audio generation price in USD per second                                                                                            |
| `total`                                                 | integer | Total number of returned models                                                                                                                |

## Why This Route Matters

Use `/v1/models` when you need to:

* populate a model picker in your UI
* validate whether a model is visible to the current account
* decide which protocol family a model is exposed under

## Related Docs

<Columns cols={3}>
  <Card title="API Reference Overview" icon="book" href="/api-reference/introduction">
    Public routes, protocol families, and routing rules
  </Card>

  <Card title="Routing & Protocols" icon="route" href="/guides/routing-protocols">
    Understand how model protocol families affect requests
  </Card>

  <Card title="Developer Tools" icon="terminal" href="/integrations/overview">
    Use these model IDs in Claude Code, OpenCode, OpenClaw, and LangChain
  </Card>
</Columns>
