Skip to content

API reference: Models

GET /v1/models lists the tiers your API key may use. Read it when your application starts, and choose tiers by what they can do, not by a fixed list.

GET https://dummydomain/v1/models
Authorization: Bearer YOUR_API_KEY
{
"object": "list",
"data": [
{
"id": "Smart",
"object": "model",
"context_window": 49152,
"max_output_tokens": 16384,
"max_images_per_request": 8,
"capabilities": {
"chat": true,
"streaming": true,
"tools": true,
"parallel_tool_calls": true,
"vision": true,
"response_format": ["text", "json_object", "json_schema"],
"structured_outputs": true
},
"tool_context_window": 49152,
"max_output_tokens_with_tools": 4096,
"tool_choice_modes": ["none", "auto", "required", "named"],
"tool_arguments_validated": true
}
]
}

This example is shortened to one tier. Your server lists each tier it offers. The default context window of each tier, and how far it can be raised, are on Choose a tier.

Field Description
id The tier name. Send it as model
context_window Tokens the tier can handle in one request, prompt and answer together
max_output_tokens The longest answer, in tokens
max_images_per_request Images allowed in one request, on tiers that read images
capabilities.tools true when the tier takes function tools
capabilities.vision true when the tier reads images
capabilities.response_format The response_format and text.format types it accepts
capabilities.structured_outputs true when JSON schema output is checked against your schema
tool_context_window The context window for requests that carry tools
max_output_tokens_with_tools The longest answer when tools are in the request
tool_choice_modes none, auto, required, and named for a forced function
tool_arguments_validated true: function arguments are checked against your schema before you get them

GET /v1/models/{id} returns one entry of the list, the same fields plus created (always 0, because a tier has no release date). The name is matched in any case, so /v1/models/genius finds Genius. This is what the OpenAI libraries call for client.models.retrieve("Genius").

GET https://dummydomain/v1/models/Smart
Authorization: Bearer YOUR_API_KEY

An unknown name gets HTTP 404 with code: "model_not_found" and a message that lists the tiers your key may use:

{"error": {"message": "The model 'gpt-4o' does not exist. Use one of: Instant, Fast, Smart, Genius.",
"type": "invalid_request_error", "param": "model", "code": "model_not_found", "request_id": "b63d..."}}
from openai import OpenAI, NotFoundError
client = OpenAI(base_url="https://dummydomain/v1", api_key="YOUR_API_KEY")
try:
tier = client.models.retrieve("Genius")
print(tier.id, tier.model_extra["capabilities"]["vision"])
except NotFoundError:
print("This server or key does not offer Genius")

Tiers and what they are good for are explained in Choose a tier.

Common questions

How do I know which ZenithAI tier supports tools or images?

Call GET /v1/models. Each tier has a capabilities object; tools and vision are true for the tiers on your server that take function calls and images. Read it at start-up instead of hard-coding tier names.

Does client.models.retrieve work on ZenithAI?

Yes. GET /v1/models/{id} returns one tier by its name, in any case, such as /v1/models/smart. An unknown name gets HTTP 404 with the code model_not_found and the list of tier names.