Skip to content

List models ​

List the models this API key may call.

GET/v1/models

API key authentication only — /v1/* routes always require an API key, even when a valid admin JWT is present.

Request
bash
curl http://localhost:8080/v1/models \
  -H "Authorization: Bearer $LLM_PROXY_KEY"
Request — OpenAI SDK
python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8080/v1", api_key="sk-your-proxy-key")
for model in client.models.list():
    print(model.id)
Response
json
{
  "object": "list",
  "data": [
    {"id": "my-model", "provider": "openai-prod", "object": "model"},
    {"id": "auto", "provider": "routing", "object": "model"}
  ]
}

Response ​

  • provider is the highest-priority provider for that model.
  • The list is filtered by the API key's allowlist (null = all, [] = nothing).
  • auto, fast, best appear with "provider": "routing" when smart routing is enabled.
  • No created/owned_by fields and no pagination.
Request
bash
curl http://localhost:8080/v1/models \
  -H "Authorization: Bearer $LLM_PROXY_KEY"
Request — OpenAI SDK
python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8080/v1", api_key="sk-your-proxy-key")
for model in client.models.list():
    print(model.id)
Response
json
{
  "object": "list",
  "data": [
    {"id": "my-model", "provider": "openai-prod", "object": "model"},
    {"id": "auto", "provider": "routing", "object": "model"}
  ]
}

MIT licensed