Documentation

API Reference
GET/POST

List Available Models

/v1/models

Retrieve a list of models available through A4F. The list can be filtered based on user plan and model type, and you can request extended details about each model.

Interactive Example

Request & Response Example

curl "https://api.a4f.co/v1/models?plan=pro&pricing&features" \
-H "Authorization: Bearer YOUR_A4F_API_KEY"

Query Parameters

plan

string
Optional. Filter models by plan availability. Accepts free, basic, or pro. If you are authenticated, your current plan is used by default. This parameter allows you to preview models available on other plans.

type

string
Optional. Filter models by their operational type. Example: ?type=chat/completion or ?type=images/generations.

[extended_key]

boolean
Optional. Include additional details in the response by adding them as boolean query parameters. For example, adding ?pricing to the URL will include the pricing object for each model. Other available keys include context_window, features, description, logo, and more.

Response Body (200 OK)

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', 'images/generations'). Included if `?type` parameter is present.

logo

string
Optional. A URL to the model's or provider's logo. Included if `?logo` parameter is present.

description

string
Optional. A brief description of the model. Included if `?description` parameter is present.

context_window

integer
Optional. The maximum context window size in tokens for the model. Included if `?context_window` parameter is present.

features

array of strings
Optional. A list of features supported by the model (e.g., ['vision', 'tool_calling']). Included if `?features` parameter is present.

pricing

object
Optional. Pricing information for the model. Included if `?pricing` parameter is present.

...

any
Other provider-specific fields may be present if requested.

Was this page helpful?