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.

Interactive Example

Request & Response Example

curl https://api.a4f.co/v1/models \
-H "Authorization: Bearer YOUR_A4F_API_KEY"

Query Parameters

plan

string
Optional. 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

boolean
Optional. If present (e.g., ?context_window), includes context window size in the response for each model.

type

boolean
Optional. If present (e.g., ?type), includes model type (e.g., 'chat/completion') in the response.

logo

boolean
Optional. If present (e.g., ?logo), includes logo URL for the model/provider.

description

boolean
Optional. If present (e.g., ?description), includes a short description of the model.

features

boolean
Optional. 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

string
The object type, typically 'list'.

data

array of objects
An array of model objects.

id

string
The 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

string
The base name of the model (e.g., 'gpt-4o').

owned_by

string
The display name of the underlying provider (e.g., 'OpenAI', 'Anthropic').

type

string
Optional. The type of the model (e.g., 'chat/completion', 'image/generation').

logo

string
Optional. A URL to the model's or provider's logo. May be relative to the backend URL.

description

string
Optional. A brief description of the model.

context_window

integer
Optional. The maximum context window size in tokens for the model.

features

array of strings
Optional. A list of features supported by the model (e.g., ['vision', 'json_mode', 'tool_calling']).

...

any
Other provider-specific fields may be present.

Was this page helpful?