Models

models

Methods

List Models -> { data, first_id, has_more, 1 more... }
get/v1/models

List available models.

The Models API response can be used to determine which models are available for use in the API. More recently released models are listed first.

query Parameters
after_id: string
Optional

ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.

before_id: string
Optional

ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.

limit: number
Optional
(maximum: 1000, minimum: 1, default: 20)

Number of items to return per page.

Defaults to 20. Ranges from 1 to 1000.

header Parameters
anthropic-version: string
Optional

The version of the Anthropic API you want to use.

Read more about versioning and our version history here.

x-api-key: string
Optional

Your unique API key for authentication.

This key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the Console. Each key is scoped to a Workspace.

Response fields
data: Array<{ id, created_at, display_name, 1 more... }>
first_id: string
Nullable

First ID in the data list. Can be used as the before_id for the previous page.

has_more: boolean

Indicates if there are more results in the requested page direction.

last_id: string
Nullable

Last ID in the data list. Can be used as the after_id for the next page.

Request example
200Example
Get A Model -> { id, created_at, display_name, 1 more... }
get/v1/models/{model_id}

Get a specific model.

The Models API response can be used to determine information about a specific model or resolve a model alias to a model ID.

Get A Model -> { id, created_at, display_name, 1 more... }
get/v1/models/{model_id}?beta=true

Get a specific model.

The Models API response can be used to determine information about a specific model or resolve a model alias to a model ID.