Models API
Get the list of available models and details about each one. codexkey has two endpoints for this.
List models
Returns the list of available models in the OpenAI format.
http
GET https://api.codexkey.online/v1/modelsResponse schema
| Field | Type | Description |
|---|---|---|
object | string | Always "list". |
data | array | Array of model objects. |
data[].id | string | Model identifier (e.g. claude-sonnet-5). |
data[].object | string | Always "model". |
data[].created | integer | Unix timestamp of model availability. |
data[].owned_by | string | Model provider (e.g. "anthropic"). |
Example response
json
{
"object": "list",
"data": [
{
"id": "claude-sonnet-5",
"object": "model",
"created": 1715644800,
"owned_by": "anthropic"
},
{
"id": "gpt-5.6-luna",
"object": "model",
"created": 1729555200,
"owned_by": "anthropic"
}
]
}Model info
By default the public endpoint returns Premium customer prices in USD per million tokens. For Cheap, call /api/public/models-info?channel=cheap. Input, output, cache read and cache write are priced separately; null in place of a cache price means it is unavailable. Metadata can be incomplete and does not confirm request capacity. If access to a channel is rejected, that channel stays unavailable and prices from the other channel are not substituted. The numbers below only show the shape of the response.
http
GET https://codexkey.online/api/public/models-infoResponse schema
| Field | Type | Description |
|---|---|---|
data[].id | string | Model identifier. |
data[].display_name | string | Human-readable model name. |
data[].supports_streaming | boolean | Whether streaming is supported. |
data[].max_input_tokens | integer | Maximum output tokens supported. |
data[].input_price_per_1m | number | Price per 1M input tokens (USD). |
data[].output_price_per_1m | number | Price per 1M output tokens (USD). |
data[].cache_read_price_per_1m | number | null | Cache read price per 1M tokens (USD); null if the price is unavailable. |
data[].cache_write_price_per_1m | number | null | Cache write price per 1M tokens (USD); null if the price is unavailable. |
Example response
json
{
"data": [
{
"id": "claude-sonnet-5",
"display_name": "Claude Sonnet 5",
"supports_streaming": true,
"max_input_tokens": 200000,
"input_price_per_1m": 3.0,
"output_price_per_1m": 15.0,
"cache_read_price_per_1m": 0.3,
"cache_write_price_per_1m": 3.75
},
{
"id": "gpt-5.6-luna",
"display_name": "GPT-5.6 Luna",
"supports_streaming": true,
"max_input_tokens": 200000,
"input_price_per_1m": 0.8,
"output_price_per_1m": 4.0,
"cache_read_price_per_1m": null,
"cache_write_price_per_1m": null
}
]
}Example request
bash
curl https://api.codexkey.online/v1/models \
-H "x-api-key: sk_cdx_YOUR_KEY"
curl https://codexkey.online/api/public/models-info