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

# Models

> List every model the gateway serves, with its providers, regions, capabilities and prices, in the OpenAI model list format.

The answer is an [OpenAI model list](https://platform.openai.com/docs/api-reference/models/list), so `client.models.list()` of any OpenAI client reads it. Each model also lists every provider serving it, and each provider every region it serves the model in, with the field names of the [Vercel AI Gateway model list](https://vercel.com/docs/ai-gateway). Each level is a request field:

| Level | Request field | Example |
| - | - | - |
| `id` | `model` | `claude-sonnet-4-5` |
| `providers[].provider` | `provider` | `bedrock` |
| `providers[].deployments[].region` | `region` | `eu-west-1` |

The provider and the region are fields of their own: do not prefix `model` with `<provider>/`.

No API key is needed. The list holds only the models the gateway has checked it can call, in the regions where it checked them.

## Query parameters

**output\_modalities** `string` (default: text)

Which models to list: `text` for the models that answer [Chat Completions](https://docs.weflayr.com/api/gateway/chat-completions.md) and [Responses](https://docs.weflayr.com/api/gateway/responses.md), `embeddings` for the models that answer [Embeddings](https://docs.weflayr.com/api/gateway/embeddings.md). Any other value returns a 400 `invalid_query_parameter`.

## Response

**object** `string`

Always `list`.

**data** `object[]`

The models, by `id`.

**properties**

**id** `string`

The model name to send as `model`.

**object** `string`

Always `model`.

**created** `integer | null`

The model's release date, in Unix seconds. `null` when unknown.

**owned\_by** `string | null`

Who makes the model, e.g. `anthropic`, whichever provider serves it. `null` when unknown.

**type** `string`

`language` or `embedding`.

**providers** `object[]`

The providers serving the model, by name.

**properties**

**provider** `string`

The provider name to send as `provider`.

**tags** `string[]`

What the provider serves the model with: `vision`, `text`, `image-gen`, `video-gen`, `speech`, `tool-use`, `reasoning`, `web-search`, `implicit-caching`, `explicit-caching`, `structured-output`, `file-input`. A capability that differs per region is listed when one of the provider's regions has it.

**modalities** `object`

What the model reads (`input`: `text`, `image`, `pdf`, `video`, `audio`) and answers with (`output`: `text`, `image`, `video`, `audio`). `pdf` is listed as the tags are, when one of the provider's regions reads PDFs.

**context\_window** `integer | null`

The longest input the model takes, in tokens.

**max\_tokens** `integer | null`

The most tokens the model writes in one answer.

**deployments** `object[]`

The regions the provider serves the model in, `GLOBAL` first, then `US`, then `EU`.

**properties**

**region** `string`

The region name to send as `region`: `GLOBAL`, `US`, `EU`, or the provider's own region (e.g. `eu-west-1` on Bedrock).

**macro\_region** `string`

`GLOBAL`, `US` or `EU`: the region holding `region`.

**pricing** `object | null`

The standard prices, in USD per token, as decimal strings: `input`, `output`, `input_cache_read`, `input_cache_write` (the default cache lifetime) and `input_cache_write_extended_ttl` (the longer lifetime: one hour for Claude, 12 hours on OpenAI). A price is left out when the deployment does not bill that kind of token. A price that depends on the input length also has `<price>_tiers`, one `{cost, min, max}` per range of text input tokens: `min` is the first token count billed at that price, `max` the first one billed at the next (excluded, absent for the last range). A price set only from a longer input on has `<price>_tiers` and no top-level value: below its first range, Weflayr has no price for that kind of token. `service_tiers` holds the same prices for `flex` and `priority`, where the deployment serves them. `null` when Weflayr has no standard price for the deployment yet.

## Errors

An `output_modalities` value other than `text` or `embeddings` returns a 400 `invalid_query_parameter`. A 503 `model_catalog_unavailable` means the gateway could not read its model catalog: retry later. The errors are in OpenAI's format, see [Errors](https://docs.weflayr.com/api/introduction.md#errors).

```python Python theme={null}
from openai import OpenAI

client = OpenAI(base_url="https://gateway.weflayr.com/v1", api_key="<WEFLAYR_API_KEY>")

for model in client.models.list():
    print(model.id, [provider["provider"] for provider in model.providers])
```

```js Node.js theme={null}
const OpenAI = require('openai');

const client = new OpenAI({ baseURL: 'https://gateway.weflayr.com/v1', apiKey: '<WEFLAYR_API_KEY>' });

for await (const model of client.models.list()) {
  console.log(model.id, model.providers.map((provider) => provider.provider));
}
```

```bash cURL theme={null}
curl "https://gateway.weflayr.com/v1/models?output_modalities=text"
```

```json 200 theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "claude-sonnet-4-5",
      "object": "model",
      "created": 1759104000,
      "owned_by": "anthropic",
      "type": "language",
      "providers": [
        {
          "provider": "bedrock",
          "tags": ["vision", "text", "tool-use", "reasoning", "explicit-caching", "file-input"],
          "modalities": {"input": ["text", "image", "pdf"], "output": ["text"]},
          "context_window": 200000,
          "max_tokens": 64000,
          "deployments": [
            {
              "region": "eu-west-1",
              "macro_region": "EU",
              "pricing": {
                "input": "0.0000033",
                "input_tiers": [
                  {"cost": "0.0000033", "min": 0, "max": 200001},
                  {"cost": "0.0000066", "min": 200001}
                ],
                "output": "0.0000165",
                "output_tiers": [
                  {"cost": "0.0000165", "min": 0, "max": 200001},
                  {"cost": "0.00002475", "min": 200001}
                ],
                "input_cache_read": "0.00000033",
                "input_cache_write": "0.000004125",
                "input_cache_write_extended_ttl": "0.0000066",
                "service_tiers": {
                  "flex": {"input": "0.00000165", "output": "0.00000825"}
                }
              }
            }
          ]
        }
      ]
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.