# Claude Sonnet 5.5 API (reAPI)

## Overview

- What it does: Use Claude Sonnet 5.5 with native Messages, streaming, structured JSON, tool calls, document citations, and prompt caching on reAPI.
- Vendor: Anthropic
- Category: chat
- Wire model id: `claude-sonnet-5-5`
- Endpoint: `POST https://api.reapi.ai/v1/messages` (Anthropic Messages; synchronous JSON or native SSE, no task polling)
- Landing page: https://reapi.ai/models/claude-sonnet-5-5
- API key: create one at https://reapi.ai/settings/apikeys and send it as `x-api-key: YOUR_REAPI_API_KEY`. reAPI supplies the protocol version automatically.

## Group pricing: claude-sonnet-5-5

Current reAPI group prices from the same snapshot as the model page, in USD per 1 million tokens.
Default group: claude.

| Group | Model ID | Token type | USD per 1M tokens |
| --- | --- | --- | ---: |
| claude | claude-sonnet-5-5 | input | $1.4 |
| claude | claude-sonnet-5-5 | output | $7 |
| claude | claude-sonnet-5-5 | cacheRead | $0.07 |
| claude | claude-sonnet-5-5 | cacheWrite | $1.75 |
| claude-0.5 | claude-sonnet-5-5:claude-0.5 | input | $1 |
| claude-0.5 | claude-sonnet-5-5:claude-0.5 | output | $5 |
| claude-0.5 | claude-sonnet-5-5:claude-0.5 | cacheRead | $0.05 |
| claude-0.5 | claude-sonnet-5-5:claude-0.5 | cacheWrite | $1.25 |


## Pricing

The summary prices below use each model’s default group listed above.

Current reAPI prices from the same quote as the model page, in USD. 1 credit = $0.001. Successful delivered requests are settled from actual usage/cost; no per-request whole-credit rounding is applied to token prices. No task polling or automatic retry is required.
- reAPI price quote fetched at: 2026-11-23T18:08:15.257Z (UTC).
- Price refresh interval: 300 seconds. Fetch this URL again after the cache expires to obtain updated prices and discounts.

### Official price comparison

Official reference: [Anthropic pricing](https://platform.claude.com/docs/en/about-claude/pricing), checked 2026-10-09. Standard input and output tokens, USD per 1 million tokens; not Batch, Priority, cache, or long-context pricing.

| Token type | Official price / 1M | Current reAPI price / 1M | Discount vs official |
| --- | ---: | ---: | ---: |
| Input | $2 | $1.4 | 30% |
| Output | $10 | $7 | 30% |

Claude Sonnet 5.5 is currently 30% off official pricing for standard input and output tokens. Formula: (1 - current reAPI rate / official rate) × 100. This discount is already included in the reAPI prices; do not apply it again.

Cache reads, cache writes and any long-context tiers have their own published rates below. Do not assume the input/output discount applies to them. Official reference prices have a separate verification date; current reAPI prices refresh at the interval above.

- tokens / input: $1.4 per 1M tokens
- tokens / output: $7 per 1M tokens
- tokens / cacheRead: $0.07 per 1M tokens
- tokens / cacheWrite: $1.75 per 1M tokens

## Calling this model

Use Anthropic Messages for native content, signed thinking, tools and SSE events. Existing OpenAI Chat Completions clients retain their endpoint and response format. Both use your reAPI key and balance; no group lookup is needed. No automatic retries are performed.

- Anthropic SDK base URL: `https://api.reapi.ai`; OpenAI SDK base URL: `https://api.reapi.ai/v1`.
- OpenAI-compatible endpoint: `POST https://api.reapi.ai/v1/chat/completions`; authenticate with `Authorization: Bearer YOUR_REAPI_API_KEY`.
- Native responses use Message content blocks; stream=true returns message_start/content_block_*/message_delta/message_stop SSE events. Compatible JSON includes message.anthropic_content and compatible streaming preserves anthropic_event. Keep signed thinking and tool blocks for subsequent turns.
- Native Messages parameters, including unknown extensions and beta options, pass through unchanged. The upstream determines acceptance and behavior; HTTP 200 alone does not prove that a parameter took effect. See the API documentation for model-specific effort/tool guidance.

## Input schema

Messages parameters, including unknown extensions and beta settings, pass through unchanged. Admission checks required fields, body size and output ceiling; the upstream determines parameter behavior. All media inputs require public HTTP(S) URLs; base64 and data URIs are rejected.

- `model` (string, required)
- `messages` (object[], required) — Native Anthropic user/assistant message array with content blocks
- `max_tokens` (integer, required, range 0–128000; zero is forwarded for cache warmup; behavior is determined upstream) — Upper bound on generated tokens
- `system` (string | object[], optional)
- `stream` (boolean, optional) — Stream the response as server-sent events
- `output_config` (object, optional)
- `thinking` (object, optional)
- `tools` (object[], optional)
- `tool_choice` (object, optional)
- `stop_sequences` (string[], optional)
- `cache_control` (object | null, optional)
- `temperature` (number, optional)
- `top_p` (number, optional)
- `top_k` (integer, optional)
- `metadata` (object, optional)
- `container` (string | object | null, optional)
- `diagnostics` (object | null, optional)
- `service_tier` (enum, optional)
- `inference_geo` (string | null, optional)
- `context_management` (object | null, optional)
- `mcp_servers` (object[], optional)
- `speed` (enum | null, optional)
- `fallbacks` (string | object[] | null, optional)
- `fallback_credit_token` (string | object | null, optional)
- `compaction` (object | null, optional)
- `output_format` (object | null, optional) — File format of the output

## Example request

```json
{
  "model": "claude-sonnet-5-5",
  "messages": [
    {
      "role": "user",
      "content": "Explain this design clearly."
    }
  ],
  "max_tokens": 4096,
  "output_config": {
    "effort": "high"
  },
  "stream": true
}
```

## Usage examples

### cURL

```bash
curl --no-buffer --request POST \
  --url https://api.reapi.ai/v1/messages \
  --header "x-api-key: YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "claude-sonnet-5-5",
  "messages": [
    {
      "role": "user",
      "content": "Explain this design clearly."
    }
  ],
  "max_tokens": 4096,
  "output_config": {
    "effort": "high"
  },
  "stream": true
}'
```

### Python (Anthropic SDK)

```python
import anthropic
client = anthropic.Anthropic(base_url="https://api.reapi.ai", api_key="YOUR_REAPI_API_KEY", max_retries=0)
with client.messages.stream(
    model="claude-sonnet-5-5",
    max_tokens=4096,
    messages=[{"role": "user", "content": "Hello!"}],
) as stream:
    for text in stream.text_stream:
        print(text, end="", flush=True)
```

### Python (OpenAI SDK)

```python
from openai import OpenAI

client = OpenAI(base_url="https://api.reapi.ai/v1", api_key="YOUR_API_KEY")
response = client.chat.completions.create(
    model="claude-sonnet-5-5",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
```

### JavaScript (OpenAI SDK)

```javascript
import OpenAI from 'openai';

const client = new OpenAI({ baseURL: 'https://api.reapi.ai/v1', apiKey: 'YOUR_API_KEY' });
const response = await client.chat.completions.create({
  model: 'claude-sonnet-5-5',
  messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(response.choices[0].message.content);
```

## Other agent-readable surfaces

This file covers one model. To find anything else:

- Full API reference (markdown, incl. task-type constraints and error semantics): https://reapi.ai/docs/claude-sonnet-5-5.md
- Platform index: https://reapi.ai/llms.txt
- Machine-readable API spec (OpenAPI): https://api.reapi.ai/openapi.json · agent skills index: https://reapi.ai/.well-known/agent-skills/index.json
- Authentication guide: https://reapi.ai/auth.md
- Full documentation and blog as one file: https://reapi.ai/llms-full.txt
- Any other model: `https://reapi.ai/models/<slug>/llms.txt` — every model page serves this same agent-readable form.
