# Claude API **Provider:** Anthropic **Category:** ai **Base URL:** `https://api.anthropic.com/v1` **Auth:** api-key — `x-api-key: sk-ant-api03-... anthropic-version: 2023-06-01` **Rate Limit:** 2,000 RPM · 160,000 TPM (default) **Free Tier:** No **Pricing:** Pay per use (pay-as-you-go) **Docs:** https://docs.anthropic.com ## Description Anthropic's Claude API provides access to the Claude 4.x family of models. Claude Sonnet 4.6 is ideal for most tasks; Claude Opus 4.6 handles the most complex reasoning; Claude Haiku 4.5 is fastest and most affordable. All models support extended context windows, vision inputs, tool use, and computer use. Batch API (50% off) and prompt caching (90% off cached inputs) are available. ## Endpoints | Method | Endpoint | Description | |--------|----------|-------------| | POST | `https://api.anthropic.com/v1/messages` | Send a message and receive a response | | POST | `https://api.anthropic.com/v1/messages (streaming)` | Stream response tokens as SSE | | GET | `https://api.anthropic.com/v1/models` | List available Claude models | ## Authentication Pass your Anthropic API key in the x-api-key header. Also include the anthropic-version header. ``` x-api-key: sk-ant-api03-... anthropic-version: 2023-06-01 ``` ## Sample Request ```bash curl https://api.anthropic.com/v1/messages \ -H "Content-Type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -d '{ "model": "claude-3-5-sonnet-20241022", "max_tokens": 1024, "messages": [ {"role": "user", "content": "What is the capital of France?"} ] }' ``` ## Sample Response ```json { "id": "msg_01XFDUDYJgAACzvnptvVoYEL", "type": "message", "role": "assistant", "content": [{ "type": "text", "text": "The capital of France is Paris." }], "model": "claude-3-5-sonnet-20241022", "stop_reason": "end_turn", "usage": { "input_tokens": 14, "output_tokens": 10 } } ``` ## Pricing Details Claude Haiku 4.5: $1/M input, $5/M output. Claude Sonnet 4.6: $3/M in, $15/M out. Claude Opus 4.6: $5/M in, $25/M out. Batch API: 50% off. Prompt caching: 90% off cached inputs. --- *Source: [API Map](https://apimap.dev/apis/anthropic/) — CC BY 4.0*