Skip to main content
GET /v2/models is the model catalog with the providers filled in. It returns the same array as GET /v1/models, and each model carries one extra field, providers: every provider that can serve it, each at its own price and with its own capabilities. Full request and response schemas, with an interactive explorer, are in the API Reference tab: List models with their providers and Get a model with its providers. This page is the guide.
/v2/models is a second shape for the catalog, not a new version of the API. /v1/models is not deprecated and keeps working unchanged, every other endpoint stays under /v1, and the X-Mesh-Version header applies to /v2/models exactly as it does everywhere else.

When to use it

Reach for /v2/models when you are building a model picker, a price comparison, or a capability matrix and would otherwise call /providers once per model. If you only need model IDs and headline prices, /v1/models is a much smaller response.

Listing models

The response is a JSON array. There is no envelope and no pagination: one call returns the whole catalog your key may use.
The example is trimmed. A real model object has every field described under Model capabilities, and a real pricing object has a field for every billing dimension, null where the model does not bill for it.

Query parameters

provider does not behave the way it does on /v1/models. There it re-prices each model at that provider’s rate. On /v2/models it only selects models: the top-level pricing stays the price a bare model ID bills at, and the provider’s own rate is its row in providers. If you move a ?provider= query from /v1 to /v2, read the price from the row, not from the top level.
An unknown provider slug is not an error: it returns an empty array.

Getting one model

The model ID goes in the path as it is, slash included. The response is a single object, identical to that model’s entry in the list.

The response

Model fields

Everything outside providers is the /v1/models object, field for field. Code written against /v1/models reads a /v2/models response without changes. See Model capabilities for the full field list. The top-level pricing is the price a request with a bare model ID bills at. It is the same value /v1/models returns, so the two endpoints never disagree on a model’s headline price.

Provider rows

Each entry in providers describes the model as one provider serves it. Three rules hold for every response:
  • Rows are alphabetical by provider. Position carries no meaning.
  • The default provider is not marked. Which provider serves a bare model ID is a routing decision Mesh can change at any time, and requests can fall back to another provider. Do not infer the default from the rows, and do not build on a specific provider serving a request.
  • Only active providers are listed. A provider that is switched off for a model does not appear.

Capabilities can differ by provider

The model-level flags describe the model as a bare model ID is served. A provider row can differ: one provider may offer a longer context window, the flex tier or structured output where another does not. When a capability matters to you, read it from the row.

Prices can differ by provider

Providers set their own rates, so two rows of the same model can carry different prices. The top-level pricing is the rate a bare model ID bills at, which is one provider’s rate; it is not an average or a minimum of the rows.

Discounts

If your account has a discount, it is applied to each row separately, the same way it is applied when a request is billed. A discount scoped to one provider appears on that provider’s row only.
  • pricing.discount_pct is the percentage off, or null when no discount applies to that row.
  • pricing.discounted holds the same rates with the discount applied. It is part of API version 2026-09 and later, on the model’s pricing and on every provider row. A request that resolves to 2026-08 (no header and no version pinned on the key, or an explicit 2026-08) does not receive it. See API versioning.

An empty providers array

A model can come back with "providers": []. It means no provider is listed for the model right now. A newly added provider can take up to a minute to appear, so do not treat an empty array as permanent, and do not drop the model from a cached list on the strength of one response.

Authentication and access

Both routes take an rsk_ API key, the same credential as /v1/models. A key restricted to specific scopes needs models:read. See Authentication. The response is scoped to the caller:
  • Model allow-lists apply. A model your organization, team or key is not permitted to use is left out of the list, and requesting it by ID returns 403. See Model allow-lists.
  • Prices are yours. Discounts on your account are reflected in every row, so two accounts can see different discount_pct values for the same model.

Errors

On a failed catalog read /v2/models answers 503, where /v1/models returns an empty array. A 200 from /v2/models is therefore always a real answer: you will not be handed a partial list. See Errors for the error body format.

Response size and caching

The list carries every provider row of every model, so it is several times the size of /v1/models and runs to megabytes. A few habits keep that cheap:
  • Cache it. Prices and providers change rarely. Fetch the list on a schedule and serve your UI from your own copy instead of calling it per page view.
  • Filter on the server. ?type=text or ?provider=bedrock returns a fraction of the full list.
  • Ask for one model with GET /v2/models/{model_id} when that is all you need.
  • Use /v1/models when you do not need the provider rows.
The catalog is live, but not instant: a change to a model, a price or a provider can take a few minutes to reach the response.

Examples

Cheapest provider for a model

Prices are strings, so convert before comparing. A row whose rate is null does not bill per token: check pricing.pricing_unit before treating it as free. A model can have no token-priced row at all, which is why both examples check before picking.

Which providers support a capability

Python

Models one provider can serve

Each returned model still lists all of its providers. To read Bedrock’s own price, take the row where provider is bedrock.

Moving from /v1/models

Nothing forces a move. Switch when the nested rows save you calls; stay on /v1/models otherwise.
  • Models — model IDs, capabilities, and choosing a model
  • Pricing — how the pricing units work
  • Retry and fallback — how a request moves between providers
  • BYOK — serving a model from your own provider account
  • API versioning — pinning a dated version