DEVSAIO

Discover available models with GET /v1/models

Use the models endpoint to list what's available, build a model picker, and avoid hard-coding model names.

DEVSAIO team · 1 min read
Share on X

The /v1/models endpoint returns every model your key can use.

bash
curl https://devsaio.lol/v1/models -H "Authorization: Bearer $DEVSAIO_API_KEY"
json
{
  "object": "list",
  "data": [
    { "id": "claude-sonnet-4-6", "object": "model", "owned_by": "..." },
    { "id": "gpt-5.6-luna", "object": "model", "owned_by": "..." }
  ]
}

In Python

python
models = [m.id for m in client.models.list().data]
print(len(models), "models")
print([m for m in models if "claude" in m])

Why use it

  • Build a model picker in your app that's always up to date.
  • Validate configuration at startup: fail fast if a configured model id doesn't exist.
  • Avoid typos. Model ids are exact strings; claude-sonnet isn't the same as the full id.

Choosing from the list

The endpoint tells you what exists, not what it costs or what it's good at. For prices, context sizes and capabilities, use the model explorer and the pricing page, or read how to choose a model for your task.

Try it with one API key

Claude, GPT, Gemini, DeepSeek, image and video models through one OpenAI- and Anthropic-compatible endpoint. Prepaid, pay only for what you use.

Keep reading