Claude Haiku 4.5 API
anthropic/claude-haiku-4.5Claude Haiku 4.5 Chat turns text and image messages into concise answers, code suggestions, and extracted information for repeated tasks. Its 200K-token context allows relevant instructions and source material to travel together, making it useful for responsive workflows.
Claude Haiku 4.5
Anthropic · chat-completions
Quick start
Send a POST request to /v1/chat/completions with anthropic/claude-haiku-4.5. Choose JSON or SSE with stream, and receive generated content and usage.
- Endpoint
- POST /v1/chat/completions
- Model ID
- anthropic/claude-haiku-4.5
- Protocol
- Chat Completions
Request fields
| Field | Requirement | Description |
|---|---|---|
| model | Required | anthropic/claude-haiku-4.5 |
| messages | Required | A non-empty ordered array; each message contains role and content. |
| max_tokens | Optional | A positive integer setting the response output limit; the playground offers 1–65,536. |
| temperature | Optional | Sampling temperature; the playground offers 0–2 and defaults to 1. |
| top_p | Optional | Nucleus sampling probability; the playground offers 0–1 and defaults to 1. |
| stream | Optional | Set true for SSE events; complete JSON is returned by default. |
Response and usage
Successful responses include generated content and usage. Billing settles from actual input, output, and cache tokens.
Streaming
Set stream: true to read SSE. Finalize usage accounting from the terminal usage event.
curl --request POST \
--url https://api.vidgo.ai/v1/chat/completions \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "anthropic/claude-haiku-4.5",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Explain why deterministic retries matter in distributed systems."
}
],
"max_tokens": 4096,
"temperature": 1,
"top_p": 1,
"stream": false
}'Keep API keys on the server. Never expose them in browser code or public repositories.
Continue with
Related Models
Claude Haiku 4.5 API frequently asked questions
What is the Claude Haiku 4.5 API?
Claude Haiku 4.5 turns conversation text and image context into useful answers. Its 200K-token context supports connected work. Use anthropic/claude-haiku-4.5 through Chat Completions or Claude Messages, or try the Playground above.
What tasks fit Claude Haiku 4.5?
Claude Haiku 4.5 fits repeated extraction, short explanations, focused code suggestions, and image questions. Supply the specific material and requested result for each task.
What context and output sizes does Claude Haiku 4.5 have?
Claude Haiku 4.5 has a 200K-token context window and a 64K-token model output limit. In the Playground, max_tokens ranges from 1 to 65,536.
How does Claude Haiku 4.5 read images?
Put an image block in messages.content and add a text question about it. The model returns its answer as text.
What does Claude Haiku 4.5 cost on Vidgo AI?
Claude Haiku 4.5 is $0.80 and 1000 credits per 1M input tokens, and $4.00 and 5000 credits per 1M output tokens. The Pricing section shows both rates.
Which API endpoints can I use for Claude Haiku 4.5?
Use anthropic/claude-haiku-4.5 with /v1/chat/completions or /v1/messages. Choose Chat Completions for system-role messages or Messages for a separate system field.