Anthropic

Create an Anthropic Message Batch

Changed on

Submit 1–100,000 native Claude requests directly to Anthropic at batch token rates. All requests must use the same supported Claude model and include max_tokens. NanoGPT reserves account balance at creation and settles actual billable usage. Subscription included tokens do not apply. Input and stored normalized input must each fit within 200 MiB. Native custom tools, thinking, prompt caching, images and documents are supported where the model supports them. Streaming generation, provider-hosted tools, MCP servers, containers, provider-managed files and video blocks are rejected. Keys or teams requiring Zero Data Retention cannot create batches. See https://docs.nano-gpt.com/api-reference/endpoint/batches#anthropic-message-batches.

post/v1/messages/batches

Request

  • Base URL
    https://api.nano-gpt.com/api
  • URL
    https://api.nano-gpt.com/api/v1/messages/batches
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Headers

Idempotency-Keystring

Choose a new value for each batch and reuse it with the same body on retries. A different payload returns 409. Stored creation failures can be replayed.

anthropic-betastring

Comma-separated Anthropic beta flags, forwarded alongside flags required by the request. Does not bypass batch validation.

Request body

Example request

{
  "requests": [
    {
      "params": {
        "model": "anthropic/claude-sonnet-5.5"
      }
    }
  ]
}

Response

Created Message Batch

idstring required
type'message_batch' required
processing_status'in_progress' | 'canceling' | 'ended' required
created_atstring date-time required
expires_atstring date-time required
ended_atstring nullable required
archived_atstring nullable required
cancel_initiated_atstring nullable required
results_urlstring uri nullable required

Changes