Skip to Content
ProvidersAnthropic

Anthropic

Use Anthropic’s Message Batches API directly.

Prerequisites

  • Anthropic API key

Configuration

# .env ANTHROPIC_API_KEY=sk-ant-api03-...

Supported Models

ModelIdentifier
Claude 3.5 Sonnetclaude-sonnet-4-5
Claude 3.5 Haikuclaude-3-5-haiku-20241022
Claude 3 Opusclaude-3-opus-20240229
Claude 3 Sonnetclaude-3-sonnet-20240229
Claude 3 Haikuclaude-3-haiku-20240307

Example Request

curl -X POST http://localhost:8000/cargo/load \ -H "Content-Type: application/json" \ -d '{ "params": { "model": "claude-sonnet-4-5", "max_tokens": 100, "messages": [{"role": "user", "content": "Hello"}] }, "callback_url": "https://example.com/callback" }'

How It Works

  1. Convoy collects requests
  2. Submits batch via Anthropic Message Batches API
  3. Polls batch status until complete
  4. Retrieves results from API
  5. Delivers results via callbacks

API Limits

Anthropic batch API has these limits:

LimitValue
Max requests per batch10,000
Max concurrent batchesVaries by tier
Batch expiration24 hours

Convoy’s default batch size (100) is well within these limits.

Pricing

Batch API pricing is typically 50% cheaper than real-time API. Check Anthropic’s pricing page  for current rates.

Last updated on