# Claude Sonnet 5.5

> Claude Sonnet 5.5 API on PoYo. Use Chat Completions or Claude Messages at $1.6 input and $8 output per million tokens, 20% below official standard rates.

## Overview

- Endpoint: `https://api.poyo.ai/v1/messages`
- Page: https://poyo.ai/models/claude-sonnet-5-5
- Model page ID: `claude-sonnet-5-5`
- API model ID: `claude-sonnet-5-5`
- Category: Chat
- Auth: `x-api-key: $POYO_API_KEY`
- Create a key at https://poyo.ai/dashboard/api-key

This model uses a synchronous chat API. POST the JSON body below. There is no `task_id` and no status polling.

## Pricing

- Input: 320 credits ($1.60) per 1M tokens
- Output: 1600 credits ($8.00) per 1M tokens
- Cache Read: 32 credits ($0.160) per 1M tokens
- Cache Write (5m): 400 credits ($2.00) per 1M tokens
- Cache Write (1h): 640 credits ($3.20) per 1M tokens

For more details, see https://poyo.ai/models/claude-sonnet-5-5.

## API Information

POST the JSON body below. Fields are top-level unless noted.

### Request body

- `model` (`string`, required):
  Model name. Example: `claude-sonnet-4-5-20250929`.
  - Examples: "claude-sonnet-4-5-20250929"
- `messages` (`list`, required):
  List of conversation messages in order. Each message contains a `role` and `content`. Use `user` for user input and `assistant` for previous model output in multi-turn conversations. Example: [{"role": "user", "content": "Summarize the purpose of feature canary releases in two sentences."}].
  - Array of ClaudeMessage
- `max_tokens` (`integer`, optional):
  Maximum number of tokens to generate.
  - Range: `1` to `+∞`
  - Examples: `1024`
- `system` (`string | array`, optional):
  System prompt for the assistant. Supports a string or structured text blocks.
  - One of: string | array
- `cache_control` (`object`, optional):
  Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.
- `stream` (`boolean`, optional):
  Whether to use streaming output.
  - Examples: `false`
- `stop_sequences` (`list`, optional):
  Stop sequences. The model stops when it encounters any of these strings.
  - Array of string
- `metadata` (`object`, optional):
  Additional metadata such as `user_id`.
- `output_config` (`object`, optional):
  Configuration options for the model's output, such as output format and effort level.
- `thinking` (`ClaudeThinkingEnabled | ClaudeThinkingAdaptive | ClaudeThinkingDisabled`, optional):
  Configuration for Claude extended thinking. Supported on Claude models with extended thinking. Thinking tokens count toward `max_tokens`.
  - One of: ClaudeThinkingEnabled | ClaudeThinkingAdaptive | ClaudeThinkingDisabled
- `tools` (`list`, optional):
  Tool definitions available to the model.
  - Array of ClaudeTool
- `tool_choice` (`string | object`, optional):
  Controls tool usage behavior. Examples: `auto`, or an object such as {"type": "tool", "name": "get_weather"}.
  - One of: string | object

Required Parameters Example:

```json
{
  "model": "claude-sonnet-5-5",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Rewrite the following product announcement to be more gentle and user-friendly: We will have maintenance for 2 hours this weekend, services will be unavailable during this time."
    }
  ]
}
```

Full Example:

```json
{
  "model": "claude-sonnet-5-5",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Rewrite the following product announcement to be more gentle and user-friendly: We will have maintenance for 2 hours this weekend, services will be unavailable during this time."
    }
  ]
}
```

### Output Schema

The response is returned from the same request. There is no separate status endpoint.

Example Response:

```json
{
  "id": "msg_013zva2CMHNLnXJNN3QKQ2EF",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "Hello! I'm Claude. Nice to meet you."
    }
  ],
  "model": "claude-sonnet-5-5",
  "stop_reason": "end_turn",
  "stop_sequence": null,
  "usage": {
    "input_tokens": 10,
    "output_tokens": 13
  }
}
```

## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://api.poyo.ai/v1/messages \
  --header "x-api-key: $POYO_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"model":"claude-sonnet-5-5","max_tokens":1024,"messages":[{"role":"user","content":"Rewrite the following product announcement to be more gentle and user-friendly: We will have maintenance for 2 hours this weekend, services will be unavailable during this time."}]}'
```

### Python

```python
import json
import os
import requests

headers = {
    "x-api-key": os.environ["POYO_API_KEY"],
    "Content-Type": "application/json",
}
payload = json.loads("{\n  \"model\": \"claude-sonnet-5-5\",\n  \"max_tokens\": 1024,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Rewrite the following product announcement to be more gentle and user-friendly: We will have maintenance for 2 hours this weekend, services will be unavailable during this time.\"\n    }\n  ]\n}")

response = requests.post("https://api.poyo.ai/v1/messages", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const headers = {
  "x-api-key": process.env.POYO_API_KEY,
  "Content-Type": "application/json",
};

const response = await fetch("https://api.poyo.ai/v1/messages", {
  method: "POST",
  headers,
  body: JSON.stringify({
  "model": "claude-sonnet-5-5",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Rewrite the following product announcement to be more gentle and user-friendly: We will have maintenance for 2 hours this weekend, services will be unavailable during this time."
    }
  ]
}),
});

console.log(await response.json());
```

## Additional Resources

### Documentation

- [Model Playground](https://poyo.ai/models/claude-sonnet-5-5)
- [API Documentation](https://docs.poyo.ai/api-manual/chat-series/claude-messages)
- [API Documentation (Markdown)](https://docs.poyo.ai/api-manual/chat-series/claude-messages.md)

### Other agent-readable surfaces

- [Platform overview](https://poyo.ai/llms.txt)
- [Documentation index](https://docs.poyo.ai/llms.txt)
- [Full documentation text](https://docs.poyo.ai/llms-full.txt)
- Any other model: `https://poyo.ai/models/<model-id>/llms.txt`
