# Claude Opus 5.5

> Anthropic's smartest Claude model: deep analysis, code, long and lively texts. You can attach pictures.

Claude Opus 5.5 is the Anthropic flagship. Strong at programming, long-document analysis, careful reasoning and lively writing. You pay for the actual tokens. Up to 10 pictures can be attached.


### A question or task as text — the model answers with text. Pictures in `input_urls` are optional.

ID: `claude-opus-5.5` · $2.72 / 1M input · $13.6 / 1M output · ~10 s on average

**Parameters** (field `input`)

| Parameter | Required | Description | Values (default in bold) |
|---|---|---|---|
| `prompt` | yes | Your question or task | text, up to 30000 chars |
| `input_urls` | no | Pictures to analyse (https links), up to 10; each is 560 input tokens | `["https://…"]` |
| `reasoning` | no | Reasoning level (default `medium`): `none`/`off` answers at once, `low` fast, `medium` balanced, `high` deeper and slower, `xhigh` maximum (where offered). Same per-token price; reasoning tokens are part of the output and are billed | `off` `low` **`medium`** `high` |
| `system_prompt` | no | Instruction for the model (role, style, rules), up to 10,000 characters |  |
| `messages` | no | Conversation history: `[{"role":"user","content":"…"},{"role":"assistant","content":"…"}]` — alternating, starting with `user`, ending with `assistant`; the new question goes to `prompt`. Up to 40 messages, 60,000 characters, billed as input tokens | `[{role, content}]` |
| `response_format` | no | `json` — the answer is one valid JSON object | **`text`** `json` |

**Example**

```bash
curl -X POST https://mixmedia.tech/api/v1/jobs/createTask \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-opus-5.5","input":{"prompt":"Explain in simple words why the sky is blue","reasoning":"medium","response_format":"text"}}'
```

```python
import os, requests

r = requests.post(
    "https://mixmedia.tech/api/v1/jobs/createTask",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    json={
      "model": "claude-opus-5.5",
      "input": {
        "prompt": "Explain in simple words why the sky is blue",
        "reasoning": "medium",
        "response_format": "text"
      }
    },
)
print(r.json())  # {"code": 200, "data": {"taskId": "..."}}
```

```javascript
const r = await fetch("https://mixmedia.tech/api/v1/jobs/createTask", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "model": "claude-opus-5.5",
    "input": {
      "prompt": "Explain in simple words why the sky is blue",
      "reasoning": "medium",
      "response_format": "text"
    }
  }),
});
console.log(await r.json()); // { code: 200, data: { taskId: "..." } }
```

## Price: per token

| Input, per 1M tokens | Output, per 1M tokens (incl. thinking) |
|---|---|
| $2.72 | $13.6 |


**An average request costs ~$0.0056 (a short question, a one-page answer or a question with a photo). The price depends on length: fewer words and photos cost less.**

- **Tokens are actual**: counted by the model itself. Input = prompt, instruction and pictures; output = the answer including the model's reasoning.
- Cost = input × input price / 1M + output × output price / 1M, rounded up to $0.0001.
- On create, a reserve for your question and up to 16384 output tokens is held (an answer never costs more than that). When the answer is ready the actual amount is charged and the rest is returned at once. A failed task returns the whole reserve.
- `recordInfo` and the callback return `usage`: `input_tokens`, `output_tokens`, `total_tokens`, `cost` (USD), `estimated: false`.

Example: a 400-character question (100 tokens) and a 4,000-character answer (1,000 tokens) = 100 × $2.72/1M + 1 000 × $13.6/1M = $0.0139.

## Result

Same as any task: call [recordInfo](https://docs.mixmedia.tech/en/endpoints/record-info) or receive a [callback](https://docs.mixmedia.tech/en/callbacks). The answer is in `resultJson.text`, token usage and the charge are in `usage` (`input_tokens`, `output_tokens`, `cost`).



Upload your photos via [files/upload](https://docs.mixmedia.tech/en/endpoints/upload) or pass any public https links.

## Error handling

API responses are JSON `{"code", "msg", "data"}`; errors also have a string `error` field (type). **On `/api/v1/*` the HTTP status matches body `code`.**

### Example response bodies

**400**

```json
{
  "code": 400,
  "msg": "input.duration: must be between 4 and 30, or \"auto\" / -1",
  "data": null,
  "error": "invalid_request_error"
}
```

**401**

```json
{
  "code": 401,
  "msg": "Authentication failed. Please check your API key",
  "data": null,
  "error": "authentication_error"
}
```

**402**

```json
{
  "code": 402,
  "msg": "Insufficient balance. Please top up and try again. Available: $0.01, required: $0.015. Top up at https://mixmedia.tech/cabinet/billing",
  "data": {
    "balance": "0.0100",
    "required": "0.0150",
    "currency": "USD",
    "topUpUrl": "https://mixmedia.tech/cabinet/billing"
  },
  "error": "payment_required"
}
```

**429**

```json
{
  "code": 429,
  "msg": "Rate limit exceeded: 10 createTask/upload requests per 10 s per key. Retry after 8s",
  "data": null,
  "error": "rate_limit_error"
}
```

**500**

```json
{
  "code": 500,
  "msg": "Internal server error",
  "data": null,
  "error": "server_error"
}
```

### Codes on createTask / upload

| code | error | Meaning | What to do |
|---|---|---|---|
| 400 | `invalid_request_error` | Invalid parameter or body | See `msg` |
| 400 | `unsupported_model` | Unknown model | [Model list](https://docs.mixmedia.tech/en/models) |
| 401 | `authentication_error` | Missing or invalid key | Check the key |
| 402 | `payment_required` | Not enough balance | Top up |
| 403 | `permission_error` | No access | Contact support |
| 429 | `rate_limit_error` | Too many requests | Wait for `Retry-After` |
| 505 | `model_disabled` | Model temporarily disabled | Pick another |
| 500 | `server_error` | Our failure | Retry later |

Example `msg` values: `Authentication failed. Please check your API key` (401); `Insufficient balance. Please top up and try again…` (402).

### Task errors (recordInfo)

If the task was created and then failed: `state: "fail"` (alias `status: "failed"`), `failCode` / `failMsg`, and `error: { code, message, type }`. Money is refunded (`refunded: true`).

| failCode | error.type | Meaning |
|---|---|---|
| 400 | `nsfw_content_detected` / `invalid_request_error` | Moderation — `failMsg` is upstream text verbatim |
| 422 | `invalid_request_error` | The model rejected the parameters (e.g. a photo could not be downloaded) |
| 501 | `server_error` | The model could not generate (`failMsg`) |
| 504 | `timeout_error` | Timed out — retry |
| 500 / 503 | `server_error` | Service temporarily unavailable |

### Rate limits

| What | Limit |
|---|---|
| createTask and upload | 20 per 10 s per key |
| recordInfo / list / balance | 100 per 10 s per key |

Over the limit — HTTP 429 and `Retry-After`.
