Anthropic Claude Message Batches API

Submit and manage asynchronous Message Batches.

Operations 5

GET /v1/messages/batches List Message Batches #
POST /v1/messages/batches Create a Message Batch #
GET /v1/messages/batches/{message_batch_id} Retrieve a Message Batch #
POST /v1/messages/batches/{message_batch_id}/cancel Cancel a Message Batch #
GET /v1/messages/batches/{message_batch_id}/results Retrieve Message Batch results #

Work with this as data

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-claude-message-batches-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 Specification

anthropic-claude-message-batches-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Anthropic Claude Messages Message Batches API
  version: '2023-06-01'
  description: 'REST API for sending messages to Claude models with support for streaming,

    tool use, vision, system prompts, prompt caching, and extended thinking.

    Authentication uses an x-api-key header along with an anthropic-version header.

    '
  contact:
    name: Anthropic Support
    url: https://support.anthropic.com
  license:
    name: Anthropic Commercial Terms of Service
    url: https://www.anthropic.com/legal/commercial-terms
servers:
- url: https://api.anthropic.com
  description: Anthropic API production
security:
- ApiKeyAuth: []
tags:
- name: Message Batches
  description: Submit and manage asynchronous Message Batches.
paths:
  /v1/messages/batches:
    get:
      tags:
      - Message Batches
      summary: List Message Batches
      description: List Message Batches in the workspace.
      operationId: listMessageBatches
      parameters:
      - $ref: '#/components/parameters/AnthropicVersion'
      - name: before_id
        in: query
        schema:
          type: string
      - name: after_id
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
      responses:
        '200':
          description: A page of Message Batch objects.
    post:
      tags:
      - Message Batches
      summary: Create a Message Batch
      description: Submit a batch of Messages requests for asynchronous processing.
      operationId: createMessageBatch
      parameters:
      - $ref: '#/components/parameters/AnthropicVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - requests
              properties:
                requests:
                  type: array
                  items:
                    type: object
                    required:
                    - custom_id
                    - params
                    properties:
                      custom_id:
                        type: string
                      params:
                        $ref: '#/components/schemas/CreateMessageRequest'
      responses:
        '200':
          description: The created Message Batch object.
  /v1/messages/batches/{message_batch_id}:
    get:
      tags:
      - Message Batches
      summary: Retrieve a Message Batch
      operationId: getMessageBatch
      parameters:
      - $ref: '#/components/parameters/AnthropicVersion'
      - name: message_batch_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A Message Batch object.
  /v1/messages/batches/{message_batch_id}/cancel:
    post:
      tags:
      - Message Batches
      summary: Cancel a Message Batch
      operationId: cancelMessageBatch
      parameters:
      - $ref: '#/components/parameters/AnthropicVersion'
      - name: message_batch_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The Message Batch object with updated status.
  /v1/messages/batches/{message_batch_id}/results:
    get:
      tags:
      - Message Batches
      summary: Retrieve Message Batch results
      description: Stream the JSONL results of an ended Message Batch.
      operationId: getMessageBatchResults
      parameters:
      - $ref: '#/components/parameters/AnthropicVersion'
      - name: message_batch_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A stream of JSONL results, one per batched request.
          content:
            application/x-jsonlines:
              schema:
                type: string
components:
  schemas:
    CreateMessageRequest:
      type: object
      required:
      - model
      - max_tokens
      - messages
      properties:
        model:
          type: string
          description: Model identifier, e.g. `claude-opus-4-5`, `claude-sonnet-4-5`, `claude-haiku-4-5`.
        max_tokens:
          type: integer
          minimum: 1
          description: Maximum number of tokens to generate before stopping.
        messages:
          type: array
          items:
            $ref: '#/components/schemas/InputMessage'
        system:
          oneOf:
          - type: string
          - type: array
            items:
              type: object
        temperature:
          type: number
          minimum: 0
          maximum: 1
        top_p:
          type: number
        top_k:
          type: integer
        stop_sequences:
          type: array
          items:
            type: string
        stream:
          type: boolean
          default: false
        tools:
          type: array
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          type: object
        thinking:
          type: object
          properties:
            type:
              type: string
              enum:
              - enabled
              - disabled
            budget_tokens:
              type: integer
        service_tier:
          type: string
          enum:
          - auto
          - standard_only
        metadata:
          type: object
          properties:
            user_id:
              type: string
    InputMessage:
      type: object
      required:
      - role
      - content
      properties:
        role:
          type: string
          enum:
          - user
          - assistant
        content:
          oneOf:
          - type: string
          - type: array
            items:
              type: object
    Tool:
      type: object
      required:
      - name
      - input_schema
      properties:
        name:
          type: string
        description:
          type: string
        input_schema:
          type: object
  parameters:
    AnthropicVersion:
      name: anthropic-version
      in: header
      required: true
      description: API version, e.g. `2023-06-01`.
      schema:
        type: string
        default: '2023-06-01'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Anthropic API key. Send as the `x-api-key` header on every request.