Skip to content

Models

GET /v1/models lists the models the key’s tenant can call at this moment. Tools built on the OpenAI SDK call it first to fill a model picker, so it answers in the OpenAI shape.

curl -s https://<your-gateway-host>/v1/models \
-H "Authorization: Bearer $OLYMPUS_API_KEY"
from openai import OpenAI
import os
client = OpenAI(base_url="https://<your-gateway-host>/v1", api_key=os.environ["OLYMPUS_API_KEY"])
for model in client.models.list():
print(model.id)
{
"object": "list",
"data": [
{
"id": "<model-name>",
"object": "model",
"created": 0,
"owned_by": "olympus",
"context_window": 32768,
"supports_tools": true
}
]
}
Field Meaning
id The name to send as model.
object, owned_by Always model and olympus.
context_window The most tokens the model takes, prompt and answer together.
supports_tools Whether the model returns tool calls.

Clients that do not know the last two fields ignore them.

A model is listed when all of these hold for the key’s tenant:

  • the tenant is granted it;
  • a deployment of it is ready, or a cloud provider serves it;
  • the gateway has a route for it.

A model that is granted and not yet serving is not listed, because choosing it would fail. An empty list is a valid answer: the tenant has nothing serving yet.

The list is the tenant’s, not the key’s: a key limited to some models still sees every model its tenant can call, and is refused 403 model_not_allowed for the others.