> ## 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.

# Get Model Pricing

> Retrieve authoritative model pricing from /v1/models/pricing

Use this route when you need pricing, not just catalog visibility.

`/v1/models/pricing` returns a single authoritative pricing object for a model;
it does not list prices from every provider. When a model can route across
multiple providers, PipeLLM only returns a price if they resolve to one
authoritative price. Otherwise, you can select a provider with `provider`.

## Endpoint

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

## Query Parameters

| Parameter  | Required | Description                       |
| ---------- | -------- | --------------------------------- |
| `model`    | yes      | Model name to price               |
| `provider` | no       | Provider name to select a channel |

## Notes

* This route only supports `GET`.
* `model` is required.
* If there is only one visible provider, the route returns that provider's price.
* If all visible providers produce the same effective price, the route returns one authoritative price.
* If visible providers produce different effective prices, the route returns `409 Conflict`; use `provider` to select a provider.

## Example Requests

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

  <Tab title="cURL (disambiguated)">
    ```bash theme={null}
    curl "https://api.pipellm.ai/v1/models/pricing?model=gpt-5&provider=openai" \
      -H "Authorization: Bearer $PIPELLM_API_KEY"
    ```
  </Tab>
</Tabs>

## Response Format

```json theme={null}
{
  "object": "pricing",
  "data": {
    "id": "gpt-5",
    "display_name": "Gpt 5",
    "type_target": "openai",
    "provider": "openai",
    "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"
          }
        }
      }
    }
  }
}
```

## Response Fields

| Field               | Type   | Description                                                                          |
| ------------------- | ------ | ------------------------------------------------------------------------------------ |
| `object`            | string | Always `"pricing"`                                                                   |
| `data.id`           | string | Model name used in API requests                                                      |
| `data.display_name` | string | Human-readable label generated from the model name                                   |
| `data.type_target`  | string | Target protocol family for routing                                                   |
| `data.provider`     | string | Resolved provider when the request identifies one provider or explicitly selects one |
| `data.pricing`      | object | Authoritative pricing object                                                         |

## Ambiguous Pricing

PipeLLM returns `409 Conflict` when:

* the same `model` matches multiple visible mappings
* those mappings have different prices
* and you did not select a provider with `provider`

That behavior is intentional. The API does not fabricate a representative price
when the routing layer can legitimately choose different-priced mappings.
