Key capabilities
- OpenAI-compatible — Works as a drop-in replacement with the OpenAI SDK
- Ultra-fast — Optimized for low-latency responses
- Cost-effective — Significantly lower cost per token compared to larger models
- Streaming — Supports real-time token streaming via SSE
- Capable — Strong performance on coding, writing, and analysis tasks
Quick example
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Must be claude-haiku-4-5 |
messages | array | Yes | List of { role, content } objects |
max_tokens | integer | No | Maximum tokens to generate |
temperature | float | No | 0–2. Controls randomness. Default: 1 |
stream | boolean | No | Enable SSE streaming. Default: false |
top_p | float | No | Nucleus sampling threshold. Default: 1 |
stop | string / array | No | Sequences that stop generation |
API Reference
View the interactive API playground for Claude Haiku 4.5.