GET /v1/models
Returns a list of models available through the gateway. This endpoint can return models from the control plane or pass through to the configured provider.Authentication
Requires API key authentication:Request
Headers
Your Portkey API key (alternative to Authorization header)
Bearer token authentication
Optional provider to list models from (e.g.,
openai, anthropic)Optional virtual key to use for authentication
Query Parameters
Query parameters are passed through to the provider or control plane.Response
The object type, always “list”
Array of model objects
Example
Response Example
Behavior
The endpoint behavior depends on configuration:With Provider Header
When you specifyx-portkey-provider, the request is forwarded to that provider’s models endpoint:
Without Provider Header
When no provider is specified and a control plane URL is configured, the gateway returns models from the Portkey control plane, which aggregates models across all configured providers.Use Cases
Model Discovery
Model Discovery
Query available models to dynamically select the best model for your use case based on capabilities, pricing, or performance.
Provider-Specific Models
Provider-Specific Models
List models from a specific provider to understand what’s available before making requests.
Model Validation
Model Validation
Check if a specific model ID is available before attempting to use it.
Related Endpoints
Chat Completions
Use a model for chat completions
Completions
Use a model for completions
Embeddings
Use a model for embeddings