Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/anthropic-messages-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Anthropic Messages API
servers:
- url: https://api.anthropic.com
tags:
- name: Messages
paths:
/v1/messages:
post:
summary: Create a Message
description: 'Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.
The Messages API can be used for either single queries or stateless multi-turn conversations.
Learn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started)'
operationId: messages_post
parameters:
- name: anthropic-version
in: header
required: false
schema:
type: string
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
title: Anthropic-Version
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
- name: anthropic-user-profile-id
in: header
required: false
schema:
type: string
description: The user profile ID to attribute this request to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header.
title: Anthropic-User-Profile-Id
x-stainless-param: user_profile_id
description: The user profile ID to attribute this request to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header.
responses:
'200':
description: Message object.
content:
application/json:
schema:
$ref: '#/components/schemas/Message'
4XX:
description: 'Error response.
See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateMessageParams'
required: true
tags:
- Messages
/v1/messages/batches:
post:
summary: Create a Message Batch
description: 'Send a batch of Message creation requests.
The Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete.
Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)'
operationId: message_batches_post
parameters:
- name: anthropic-version
in: header
required: false
schema:
type: string
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
title: Anthropic-Version
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
- name: anthropic-user-profile-id
in: header
required: false
schema:
type: string
description: The user profile ID to attribute the requests in this batch to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header. Applies to every request in the batch; an individual request whose `user_profile_id` body field conflicts with this header is errored.
title: Anthropic-User-Profile-Id
x-stainless-param: user_profile_id
description: The user profile ID to attribute the requests in this batch to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header. Applies to every request in the batch; an individual request whose `user_profile_id` body field conflicts with this header is errored.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/MessageBatch'
4XX:
description: 'Error response.
See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateMessageBatchParams'
required: true
tags:
- Messages
get:
summary: List Message Batches
description: 'List all Message Batches within a Workspace. Most recently created batches are returned first.
Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)'
operationId: message_batches_list
parameters:
- name: before_id
in: query
required: false
schema:
type: string
description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
title: Before Id
description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
- name: after_id
in: query
required: false
schema:
type: string
description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
title: After Id
description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
- name: limit
in: query
required: false
schema:
type: integer
maximum: 1000
minimum: 1
description: 'Number of items to return per page.
Defaults to `20`. Ranges from `1` to `1000`.'
default: 20
title: Limit
description: 'Number of items to return per page.
Defaults to `20`. Ranges from `1` to `1000`.'
- name: anthropic-version
in: header
required: false
schema:
type: string
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
title: Anthropic-Version
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
- name: x-api-key
in: header
required: false
schema:
type: string
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
title: X-Api-Key
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ListResponse_MessageBatch_'
4XX:
description: 'Error response.
See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
tags:
- Messages
/v1/messages/batches/{message_batch_id}:
get:
summary: Retrieve a Message Batch
description: 'This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the `results_url` field in the response.
Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)'
operationId: message_batches_retrieve
parameters:
- name: message_batch_id
in: path
required: true
schema:
type: string
description: ID of the Message Batch.
title: Message Batch Id
description: ID of the Message Batch.
- name: anthropic-version
in: header
required: false
schema:
type: string
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
title: Anthropic-Version
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
- name: x-api-key
in: header
required: false
schema:
type: string
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
title: X-Api-Key
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/MessageBatch'
4XX:
description: 'Error response.
See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
tags:
- Messages
delete:
summary: Delete a Message Batch
description: 'Delete a Message Batch.
Message Batches can only be deleted once they''ve finished processing. If you''d like to delete an in-progress batch, you must first cancel it.
Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)'
operationId: message_batches_delete
parameters:
- name: message_batch_id
in: path
required: true
schema:
type: string
description: ID of the Message Batch.
title: Message Batch Id
description: ID of the Message Batch.
- name: anthropic-version
in: header
required: false
schema:
type: string
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
title: Anthropic-Version
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
- name: x-api-key
in: header
required: false
schema:
type: string
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
title: X-Api-Key
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteMessageBatchResponse'
4XX:
description: 'Error response.
See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
tags:
- Messages
/v1/messages/batches/{message_batch_id}/cancel:
post:
summary: Cancel a Message Batch
description: 'Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.
The number of canceled requests is specified in `request_counts`. To determine which requests were canceled, check the individual results within the batch. Note that cancellation may not result in any canceled requests if they were non-interruptible.
Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)'
operationId: message_batches_cancel
parameters:
- name: message_batch_id
in: path
required: true
schema:
type: string
description: ID of the Message Batch.
title: Message Batch Id
description: ID of the Message Batch.
- name: anthropic-version
in: header
required: false
schema:
type: string
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
title: Anthropic-Version
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/MessageBatch'
4XX:
description: 'Error response.
See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
tags:
- Messages
/v1/messages/batches/{message_batch_id}/cancel?beta=true:
post:
summary: Cancel a Message Batch
description: 'Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.
The number of canceled requests is specified in `request_counts`. To determine which requests were canceled, check the individual results within the batch. Note that cancellation may not result in any canceled requests if they were non-interruptible.
Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)'
operationId: beta_message_batches_cancel
parameters:
- name: message_batch_id
in: path
required: true
schema:
type: string
description: ID of the Message Batch.
title: Message Batch Id
description: ID of the Message Batch.
- name: anthropic-beta
in: header
required: false
schema:
type: string
items:
type: string
description: 'Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.'
title: Anthropic-Beta
x-stainless-override-schema:
x-stainless-param: betas
x-stainless-extend-default: true
type: array
description: Optional header to specify the beta version(s) you want to use.
items:
$ref: '#/components/schemas/AnthropicBeta'
description: 'Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.'
- name: anthropic-version
in: header
required: false
schema:
type: string
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
title: Anthropic-Version
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BetaMessageBatch'
4XX:
description: 'Error response.
See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/BetaErrorResponse'
tags:
- Messages
/v1/messages/batches/{message_batch_id}/results:
get:
summary: Retrieve Message Batch results
description: 'Streams the results of a Message Batch as a `.jsonl` file.
Each line in the file is a JSON object containing the result of a single request in the Message Batch. Results are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.
Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)'
operationId: message_batches_results
parameters:
- name: message_batch_id
in: path
required: true
schema:
type: string
description: ID of the Message Batch.
title: Message Batch Id
description: ID of the Message Batch.
- name: anthropic-version
in: header
required: false
schema:
type: string
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
title: Anthropic-Version
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
- name: x-api-key
in: header
required: false
schema:
type: string
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
title: X-Api-Key
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
responses:
'200':
description: Successful Response
content:
application/x-jsonl:
schema:
$ref: '#/components/schemas/MessageBatchIndividualResponse'
4XX:
description: 'Error response.
See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
tags:
- Messages
/v1/messages/batches/{message_batch_id}/results?beta=true:
get:
summary: Retrieve Message Batch results
description: 'Streams the results of a Message Batch as a `.jsonl` file.
Each line in the file is a JSON object containing the result of a single request in the Message Batch. Results are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.
Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)'
operationId: beta_message_batches_results
parameters:
- name: message_batch_id
in: path
required: true
schema:
type: string
description: ID of the Message Batch.
title: Message Batch Id
description: ID of the Message Batch.
- name: anthropic-beta
in: header
required: false
schema:
type: string
items:
type: string
description: 'Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.'
title: Anthropic-Beta
x-stainless-override-schema:
x-stainless-param: betas
x-stainless-extend-default: true
type: array
description: Optional header to specify the beta version(s) you want to use.
items:
$ref: '#/components/schemas/AnthropicBeta'
description: 'Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.'
- name: anthropic-version
in: header
required: false
schema:
type: string
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
title: Anthropic-Version
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
- name: x-api-key
in: header
required: false
schema:
type: string
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
title: X-Api-Key
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
responses:
'200':
description: Successful Response
content:
application/x-jsonl:
schema:
$ref: '#/components/schemas/BetaMessageBatchIndividualResponse'
4XX:
description: 'Error response.
See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/BetaErrorResponse'
tags:
- Messages
/v1/messages/batches/{message_batch_id}?beta=true:
get:
summary: Retrieve a Message Batch
description: 'This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the `results_url` field in the response.
Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)'
operationId: beta_message_batches_retrieve
parameters:
- name: message_batch_id
in: path
required: true
schema:
type: string
description: ID of the Message Batch.
title: Message Batch Id
description: ID of the Message Batch.
- name: anthropic-beta
in: header
required: false
schema:
type: string
items:
type: string
description: 'Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.'
title: Anthropic-Beta
x-stainless-override-schema:
x-stainless-param: betas
x-stainless-extend-default: true
type: array
description: Optional header to specify the beta version(s) you want to use.
items:
$ref: '#/components/schemas/AnthropicBeta'
description: 'Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.'
- name: anthropic-version
in: header
required: false
schema:
type: string
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
title: Anthropic-Version
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
- name: x-api-key
in: header
required: false
schema:
type: string
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
title: X-Api-Key
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BetaMessageBatch'
4XX:
description: 'Error response.
See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/BetaErrorResponse'
tags:
- Messages
delete:
summary: Delete a Message Batch
description: 'Delete a Message Batch.
Message Batches can only be deleted once they''ve finished processing. If you''d like to delete an in-progress batch, you must first cancel it.
Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)'
operationId: beta_message_batches_delete
parameters:
- name: message_batch_id
in: path
required: true
schema:
type: string
description: ID of the Message Batch.
title: Message Batch Id
description: ID of the Message Batch.
- name: anthropic-beta
in: header
required: false
schema:
type: string
items:
type: string
description: 'Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.'
title: Anthropic-Beta
x-stainless-override-schema:
x-stainless-param: betas
x-stainless-extend-default: true
type: array
description: Optional header to specify the beta version(s) you want to use.
items:
$ref: '#/components/schemas/AnthropicBeta'
description: 'Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.'
- name: anthropic-version
in: header
required: false
schema:
type: string
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
title: Anthropic-Version
description: 'The version of the Claude API you want to use.
Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).'
- name: x-api-key
in: header
required: false
schema:
type: string
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
title: X-Api-Key
description: '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](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BetaDeleteMessageBatchResponse'
4XX:
description: 'Error response.
See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/BetaErrorResponse'
tags:
- Messages
/v1/messages/batches?beta=true:
post:
summary: Create a Message Batch
description: 'Send a batch of Message creation requests.
The Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete.
Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-wi
# --- truncated at 32 KB (622 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/anthropic/refs/heads/main/openapi/anthropic-messages-api-openapi.yml