Models
The model ID is one of the most important parameters when calling RouteAPI. The model in the request must be a model currently available to the account.
Endpoint
Section titled “Endpoint”GET /v1/modelsExample:
curl https://www.routeapi.ai/v1/models \ -H "Authorization: Bearer $ROUTEAPI_KEY"Model ID
Section titled “Model ID”Use the model ID when calling APIs, not the display name in the console.
{ "model": "gpt-4o"}If RouteAPI has model mapping configured, use the ID returned by the console or the model list API.
Recommended model fields
Section titled “Recommended model fields”| Field | Description |
|---|---|
id | Model ID used for calls |
name | Display name |
context_length | Maximum context length |
input_price | Input price |
output_price | Output price |
supports_stream | Whether streaming output is supported |
supports_tools | Whether tool calling is supported |
supports_vision | Whether image input is supported |
supports_json_schema | Whether structured output is supported |
Model unavailable troubleshooting
Section titled “Model unavailable troubleshooting”When a request returns model unavailable, permission denied, or a service-side error, check in this order:
- Whether the model ID is spelled correctly.
- Whether the request parameters include optional parameters unsupported by the current model.
Best practices
Section titled “Best practices”- Fix model IDs in production applications and do not rely on display names.
- Prepare alternative model options for key business flows.
- Confirm model capabilities in advance for scenarios requiring tool calling or structured output.
- Before launch, use the same Token to call the model list and make one real request.