Documentation
API Reference
GET
List Available Models
/v1/models
Retrieve a list of models available through A4F. This endpoint directly queries our backend for the most up-to-date model information.
Authentication Not Required (Typically)
This endpoint is often public or requires a general-purpose API key rather than a user-specific one, as it provides a catalog. However, if A4F's backend `/v1/models` is protected, you would need to include your A4F API key in the Authorization header. The examples assume it's public or uses a general key.
Interactive Example
Request & Response Example
Query Parameters
plan
stringOptional. Filter models by plan availability. Accepts
free
or pro
. If omitted, usually defaults to all models or models accessible by a general key.context_window
booleanOptional. If present (e.g., ?context_window), includes context window size in the response for each model.
type
booleanOptional. If present (e.g., ?type), includes model type (e.g., 'chat/completion') in the response.
logo
booleanOptional. If present (e.g., ?logo), includes logo URL for the model/provider.
description
booleanOptional. If present (e.g., ?description), includes a short description of the model.
features
booleanOptional. If present (e.g., ?features), includes a list of special features supported by the model (e.g., 'vision', 'tool_calling').
Response Body (200 OK)
object
stringThe object type, typically 'list'.
data
array of objectsAn array of model objects.
id
stringThe unique identifier for the model, including the A4F provider prefix (e.g., 'provider-1/chatgpt-4o-latest'). This is the ID you use in API requests.
base_model
stringThe base name of the model (e.g., 'gpt-4o').
owned_by
stringThe display name of the underlying provider (e.g., 'OpenAI', 'Anthropic').
type
stringOptional. The type of the model (e.g., 'chat/completion', 'image/generation').
logo
stringOptional. A URL to the model's or provider's logo. May be relative to the backend URL.
description
stringOptional. A brief description of the model.
context_window
integerOptional. The maximum context window size in tokens for the model.
features
array of stringsOptional. A list of features supported by the model (e.g., ['vision', 'json_mode', 'tool_calling']).
...
anyOther provider-specific fields may be present.
Note on Provider Prefixes
The
id
field returned for each model includes the necessary A4F provider prefix. Use this full ID when making requests to other A4F endpoints like Chat Completions. See Provider Routing.Was this page helpful?