Skip to main content

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

string
Your Portkey API key (alternative to Authorization header)
string
Bearer token authentication
string
Optional provider to list models from (e.g., openai, anthropic)
string
Optional virtual key to use for authentication

Query Parameters

Query parameters are passed through to the provider or control plane.

Response

string
The object type, always “list”
array
Array of model objects

Example

Response Example

Behavior

The endpoint behavior depends on configuration:

With Provider Header

When you specify x-portkey-provider, the request is forwarded to that provider’s models endpoint:
This returns models available from OpenAI.

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

Query available models to dynamically select the best model for your use case based on capabilities, pricing, or performance.
List models from a specific provider to understand what’s available before making requests.
Check if a specific model ID is available before attempting to use it.

Chat Completions

Use a model for chat completions

Completions

Use a model for completions

Embeddings

Use a model for embeddings