id, not a display name; the same model can have different IDs at different
providers. When you’ve been asked for a particular model, keep it, and verify its ID rather than
substituting another.
The examples below use curl and jq, with API keys already set in the named environment
variables. They only list model metadata. Use the same credentials and endpoint as the
experiment, since a listing shows what that account can use. An authentication or permission
error does not mean that no models exist.
OpenAI
List models withGET https://api.openai.com/v1/models:
OpenAIResponsesAPI(model_id) for models supporting the Responses API, or
OpenAICompatibleAPI(model_id) for Chat Completions. The listing includes models for other
tasks too; check a model’s supported endpoints and features in the
model catalog before choosing an adapter.
Anthropic
List models withGET https://api.anthropic.com/v1/models:
limit=1000. While has_more is true, request the next page with
after_id set to the returned last_id, and collect its models before advancing again.
Pass a returned id to AnthropicMessagesAPI(model_id); display_name is only for presentation.
OpenRouter
OpenRouter serves models from multiple vendors through an OpenAI-compatible endpoint. Its general catalog API isGET https://openrouter.ai/api/v1/models; the
account-filtered listing
also applies your provider preferences, privacy settings, and guardrails:
/models/user to /models. The
model browser is useful for interactive search. Inspect
architecture, context_length, and supported_parameters in the JSON for candidate models.
Use the full returned id, including its vendor prefix and any suffix, with:
OPENROUTER_API_KEY by itself, so pass it explicitly as above.
Close the adapter with await api.aclose() when finished, as in the
conversation step.