# Claude Opus 5 (Kiro) — /chat/completions

OpenAI-compatible chat completions backed by Anthropic Claude Opus 5 on the Kiro line, at a quarter of the price of the standard line, with image input, tool calling and streaming. It answers directly without returning a thinking trace, reasoning_effort has no effect, PDF input is not supported, and the gateway converts public image URLs to base64 before sending them. Set model to claude-opus-5-kiro; the same model is served on the native Anthropic Messages API (/anthropic/v1/messages), so Claude Code can connect directly. temperature, top_p and stop have no effect. For a visible thinking trace and reasoning_effort, use claude-opus-5 (the standard line); claude-opus-5-5 is the newer Opus on the same Kiro line.

**Endpoint:** `POST https://nezhagate.com/v1/chat/completions`

## Authentication
```
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## Request body
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `model` | string | Yes | Model ID, here claude-opus-5-kiro. |
| `messages` | array | Yes | Array of messages; each has role (system/user/assistant) and content. content may be a string, or an array of {type:text} and {type:image_url} parts for image understanding (multimodal/vision). |
| `stream` | boolean | No | Stream the response as SSE. Default false. |
| `temperature` | number | No | No effect: this line ignores temperature / top_p (no error) and samples at the model default. |
| `max_tokens` | integer | No | Maximum number of tokens to generate. |
| `web_search` | boolean | No | Set true to enable web search: the gateway augments the prompt with live results (citing sources) before the model answers. Can also be triggered via a tools entry {"type":"web_search"}. |

## Request example
```bash
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "claude-opus-5-kiro", "messages": [{"role": "user", "content": "Hello"}], "stream": false}'
```

## Response
```json
{
  "id": "chatcmpl_xxx",
  "object": "chat.completion",
  "model": "claude-opus-5-kiro",
  "choices": [
    {"index": 0, "message": {"role": "assistant", "content": "Hello!"}, "finish_reason": "stop"}
  ],
  "usage": {"prompt_tokens": 11, "completion_tokens": 7, "total_tokens": 18}
}
```

## Image input (Vision)
Put an image in the message content array and the model will analyze it (visual Q&A, reading text / OCR, …). image_url accepts a public image link or an inline base64 data URL (data:image/png;base64,...). Available on multimodal models (gpt-5.5, gemini series, …).

```bash
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "claude-opus-5-kiro", "messages": [{"role": "user", "content": [{"type": "text", "text": "What is in this image?"}, {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}]}]}'
```