Skip to content
Good MorningDocs
Dashboard

List models

GET
/models
curl --request GET \
--url 'https://api.saygm.com/v1/models?api_shape=messages'

Returns the live model catalog: every model id the gateway will resolve, together with its confidentiality tier, upstream gateway provider, supported API shapes, and per-token pricing. This is the authoritative source for model ids and prices — the documentation deliberately does not copy them into prose. Authentication is optional: the endpoint answers unauthenticated requests, but a request that carries an invalid Authorization header is rejected with 401 rather than being treated as anonymous.

api_shape

A request format the gateway can accept for a model. chat.completions and responses are the OpenAI shapes, messages is the Anthropic Messages shape, and generateContent / streamGenerateContent are the Gemini shapes.

string
Allowed values: chat.completions responses messages generateContent streamGenerateContent

Return only models that support this API shape. An unrecognised value is not a client error: the gateway answers 200 with an empty data array, which is indistinguishable from an outage unless you check the spelling. The same is true of an empty value (?api_shape=). Omit the parameter to list every model.

Examples

Models reachable through the Anthropic Messages API

messages

The model catalog. An unrecognised api_shape also returns 200, with data empty.

Media typeapplication/json

A page of the model catalog. The catalog is returned in full; there is no pagination.

object
object
required
string
Allowed value: list
data
required

Every catalog entry matching the request. Empty when api_shape did not match a known shape.

Array<object>

One entry in the gateway model catalog.

object
id
required

The value to send as the model field of a request. May contain a slash, for example Qwen/Qwen3-32B-TEE.

string
object
required
string
Allowed value: model
created
required

Unix timestamp in seconds, present for OpenAI client compatibility. The gateway reports a fixed value rather than a per-model creation date; do not use it to order or age models.

integer
owned_by
required

The organisation that trained or publishes the model.

string
tier
required

The confidentiality guarantee the gateway can make for the model. confidential models run inside an Intel TDX TEE that gm attests. frontier and open models are served by an upstream provider under that provider’s own terms.

string
Allowed values: frontier confidential open
gateway_provider
required

The upstream the gateway routes this model to. Distinct from owned_by: an open-weight model is often served by a different operator than the one that published it.

string
api_shapes
required

Every request format this model accepts. A model is only reachable on the endpoints matching one of these shapes.

Array<string>
Allowed values: chat.completions responses messages generateContent streamGenerateContent
pricing
required

Per-token prices for the model.

object
unit
required

The unit every dimensions rate is expressed in: integer nanodollars (1e-9 of currency) per million tokens. A rate of 150000000 is therefore $0.15 per million tokens.

string
Allowed value: ndollars_per_mtok
currency
required

ISO 4217 currency code for the rates.

string
dimensions
required

Rates in the unit named by pricing.unit. A field is null when the model does not bill that dimension — treat null as “not offered”, not as “free”.

object
input_per_mtok_ndollars

Uncached input tokens.

integer | null
output_per_mtok_ndollars

Generated output tokens, including reasoning tokens where the model emits them.

integer | null
cache_read_per_mtok_ndollars

Input tokens served from a prompt cache.

integer | null
cache_write_5m_per_mtok_ndollars

Input tokens written to a prompt cache with a five-minute lifetime.

integer | null
cache_write_1h_per_mtok_ndollars

Input tokens written to a prompt cache with a one-hour lifetime.

integer | null
cache_storage_per_mtok_hour_ndollars

Standing charge for holding cached tokens, per million tokens per hour.

integer | null
audio_input_per_mtok_ndollars

Audio input tokens.

integer | null
audio_output_per_mtok_ndollars

Audio output tokens.

integer | null
long_context_threshold_tokens

Prompt size, in tokens, above which the long-context rates replace the standard input and output rates. null means the model has no long-context tier and the paired long-context rates are null too.

integer | null
long_context_input_per_mtok_ndollars

Input rate applied once the prompt exceeds long_context_threshold_tokens.

integer | null
long_context_output_per_mtok_ndollars

Output rate applied once the prompt exceeds long_context_threshold_tokens.

integer | null
surcharges
required

Charges that are not per-token, keyed by an opaque surcharge name. Empty for most models.

object
key
additional properties

A charge billed per event or per unit of wall-clock time rather than per token. Which rate field is present depends on kind.

object
kind
required

How the surcharge is metered.

string
Allowed values: per_event per_hour
unit_ndollars

Nanodollars charged per event. Present when kind is per_event.

integer
per_hour_ndollars

Nanodollars charged per hour. Present when kind is per_hour.

integer
available
required

Whether the gateway is currently accepting inference requests for this model. Listed-but-unavailable models stay in the catalog so that their ids and prices remain resolvable.

boolean
Example
{
"object": "list",
"data": [
{
"id": "claude-fable-5",
"object": "model",
"owned_by": "anthropic",
"tier": "frontier",
"gateway_provider": "anthropic",
"api_shapes": [
"chat.completions"
],
"pricing": {
"unit": "ndollars_per_mtok",
"currency": "USD",
"surcharges": {
"additionalProperty": {
"kind": "per_event"
}
}
}
}
]
}

An Authorization header was supplied but the gm API key is invalid. Omit the header entirely to read the catalog anonymously.

Media typeapplication/json
object
error
object
message
string
type
string
code
string | null
Examplegenerated
{
"error": {
"message": "example",
"type": "example",
"code": "example"
}
}