The Models API is the current public source for model IDs, base USD price ranges, capabilities, and limits. Model names on this page are examples only.
https://api.tokensmarket.ai/v1GET /modelsThe endpoint remains fixed. Use the parameter documentation on this page to replace the model ID and request data.
${base_url}/models${base_url}/models/{model}The same public model catalog is compatible with OpenAI, Claude, and Gemini protocol shapes.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Authorization | string | No | — | OpenAI-compatible Bearer API Key. |
x-api-key | string | No | — | Claude-compatible API Key header. |
x-goog-api-key / ?key= | string | No | — | Gemini-compatible API Key header or query parameter. |
object / data | object | array | No | — | OpenAI-compatible list response. |
has_more / first_id / last_id | boolean | string | No | — | Claude-compatible list helper fields. |
models[] | array | No | — | Gemini-compatible list response. |
The detail endpoint returns the current model's public capabilities and ranges; field presence follows the protocol response.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | No | — | Exact model ID. |
price.input_price_range | [number, number] | No | — | Base USD input price range. Options / constraints: Unit: USD/million tokens. |
price.output_price_range | [number, number] | No | — | Base USD output price range. Options / constraints: Unit: USD/million tokens. |
price.group_ratio | number | No | — | Price ratio shared by the current account. Options / constraints: User-visible price range = base price range × group_ratio. This does not change provider price ordering. |
modalities | string[] | No | — | Input and output modalities. |
input_token_limit | integer | No | — | Maximum input token limit. |
output_token_limit | integer | No | — | Maximum output token limit. |
throughput_range | [number, number] | No | — | Public throughput range. Options / constraints: Unit: tokens/s. |
latency_range | [number, number] | No | — | Public latency range. Options / constraints: Unit: seconds. |
The following fields are HTTP response headers, not JSON, SSE event, or binary response body fields. They are not guaranteed when a network failure prevents the request from reaching the gateway.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
X-Client-Request-Id | string | No | — | Echoed when supplied by the caller; the gateway does not generate it automatically when omitted. |
X-Upstream-Request-Id | string | No | — | Usually used for gateway request tracing; it does not represent the provider's original request ID. |
Read the current model ID and capabilities from the list or detail endpoint before calling. The response does not promise a provider list; error shapes follow the selected OpenAI, Claude, or Gemini protocol.
The examples use placeholders. Replace them with a currently available model ID from the model details page, and keep your API Key in a server-side environment variable.
curl https://api.tokensmarket.ai/v1/models \
-H "Authorization: Bearer $TOKEN_MARKET_API_KEY"