Plan a relaxed Saturday using these options: a park open 9am-6pm, a museum open 10am-5pm, and a cafe open 8am-8pm. Start at 10am, include a lunch break, and allow 30 minutes between stops. Return a timetable without inventing prices or opening hours.
Claude Haiku 4 5 API: Online text generation, tutorials and integration guide
Connect to Claude Haiku 4 5 in one click on RequestBeam. One API key connects AI and multiple data services, so you can focus on your business and explore new ideas.
Claude Haiku 4 5 API pricing and billing
0-200K input tokens
Official price
- Input
-
$1.0000/M - Output
-
$5.0000/M - Cache input
-
$0.1000/M - Cache write (5m)
-
$1.2500/M - Cache write (1h)
-
$2.0000/M
Our price Save 45%
- Input
- $0.5500 /M
- Output
- $2.7500 /M
- Cache input
- $0.0550 /M
- Cache write (5m)
- $0.6875 /M
- Cache write (1h)
- $1.1000 /M
Claude Haiku 4 5 online chat tool
Model settings
It includes completed, reusable turns from this conversation in your next request, so you can ask follow-up questions without repeating the context.
What happens when it is off?Only your new message and any system prompt are sent. Existing messages stay visible; turning memory back on includes eligible earlier turns again.
Is this long-term memory?No. This is conversation context, not memory across separate conversations. Failed, stopped, truncated, or non-reusable replies are excluded. More history can use more input tokens and increase cost.
Advanced parameters
Conversation

How can I help you today?
No response data yet Claude Haiku 4 5 prompt examples
Draft a polite customer email for this situation: an order will arrive two days late, the revised delivery date is October 15, and tracking will be sent tomorrow. Apologize without inventing compensation. Include a subject line and keep the email under 120 words.
Turn these meeting notes into an action list: Maya will revise the proposal by Friday; Leo will confirm the venue next Monday; the budget needs approval, with no owner assigned. Use columns for task, owner, deadline, and open questions. Mark missing details as unknown.
What is Claude Haiku 4 5?
Claude Haiku 4 5 model focus and core capabilities
Claude Haiku 4 5 is Anthropic's smaller, efficiency-focused model for responsive assistance, coding, and agent tasks. It combines text and image understanding with optional extended thinking. Its practical appeal is handling well-scoped work repeatedly, rather than requiring the largest model for every step.
Claude Haiku 4 5 online tools and API on RequestBeam
RequestBeam provides an online text Playground and both unified Chat Completions and Claude Messages interfaces for this model. Test summaries, extraction, or code suggestions here before integrating them into an application. Native image understanding and tool use do not mean this text Playground uploads files, browses the web, or executes actions.
Claude Haiku 4 5 capabilities and domain strengths
Haiku is a candidate for workflows with explicit inputs, short feedback loops, and checkable outputs. Separate routine classification and drafting from decisions that require deeper investigation or human authority.
Responsive assistance and concise writing
Use Haiku to draft a support reply, rewrite a notification, or answer a question from supplied policy text. Specify the audience, approved facts, tone, and length so the answer serves a particular interaction rather than becoming a general essay.
Review promises, dates, and suggested remedies before sending. Efficiency-focused positioning does not guarantee a response time, and a polished reply cannot establish that an account was checked or a refund approved.
Classification, extraction, and source-faithful summaries
Turn customer messages into a category, reported symptom, requested action, and missing information. Define labels and require a supporting passage; distinguish a customer observation from a confirmed technical cause.
For structured extraction, define field types and an unknown value. Test ambiguous and multi-issue messages as well as straightforward examples, and validate that concise summaries preserve names, quantities, and the requested outcome.
Coding assistance and bounded agent subtasks
Haiku can assist with function explanations, small patches, test drafts, and clearly specified development subtasks. Supply the relevant code, expected behavior, and failing case rather than asking it to infer an unseen repository.
A larger workflow can assign independent, bounded tasks to Haiku and review the results before integration. Your application supplies tools, permissions, execution feedback, and conflict handling; this Playground returns text and does not run tests or edit files.
Context analysis, vision, and optional thinking
The model can work with supplied context and supports native image understanding and manual extended thinking. These capabilities can help with document questions or more demanding reasoning when the chosen interface supports the required inputs and configuration.
Here, provide relevant text rather than expecting a linked image or PDF to be read. Confirm actual input limits and optional thinking support on your RequestBeam route; a model capability does not establish a Playground upload feature or an account allowance.
Claude Haiku 4 5 benchmarks and performance
Model benchmarks help identify tasks worth testing, but do not predict RequestBeam latency or business success. Coding and computer-use evaluations include tools and execution feedback that a text conversation does not provide.
Coding and agent evaluation boundaries
The Haiku release evaluates software engineering and tool-driven work, making coding assistance a meaningful test direction rather than assuming the model is only for short prose. Evaluate a repair by whether it fixes the specified behavior and preserves existing cases.
Do not treat an agent benchmark as the success rate of a single code answer. Run proposed patches and tests in your own environment, record regressions, and compare the amount of review needed to accept the result.
Measure classification and summary quality
Build a labelled sample of messages containing clear categories, missing details, overlapping issues, and unusual wording. Grade category accuracy, unsupported labels, retained requests, and invented causes separately; one fluent summary is not enough evidence.
For extraction, compare each field with the original passage and validate the output schema. Track false positives and escalation decisions, not only the share of responses that can be parsed.
Evaluate latency and cost on your workload
Use the same inputs, output requirements, and interface to record time to first text, total duration, usage, and correction effort. Include long-history and concurrent cases if those reflect the application you plan to build.
Longer context, repeated calls, and optional thinking can change both cost and duration. Choose an acceptable quality threshold first, then compare cost per accepted result rather than assuming the smaller model is always the cheapest complete workflow.
Claude Haiku 4 5 compared with Claude and GPT models
Use Haiku as an efficiency-focused candidate and compare alternatives on the same acceptance criteria. The table suggests evaluation directions, not measured rankings or guarantees that one model wins every task.
| Task | Claude Haiku 4 5 candidate role | Alternative to test | Validation method |
|---|---|---|---|
| Ticket classification | Bounded labels and short summaries | Claude Sonnet 4.5 | Label accuracy and unsupported claims |
| Code suggestions | Small patches and test drafts | Claude Sonnet 4.6 | Passing tests and regression review |
| Complex analysis | Clearly separated preliminary steps | GPT-5.6 Terra | Constraint coverage and source checks |
| Routine extraction | Defined fields and unknown handling | Gemini 3.5 Flash-Lite | Schema validity and field correctness |
When to prioritize testing Claude Haiku 4 5
Start with Haiku when tasks have clear category definitions, approved response facts, or small code boundaries. Those conditions make it easier to detect mistakes and decide whether an efficient first pass meets your quality requirements.
Escalate cases with ambiguous policy, conflicting evidence, or difficult code dependencies for further review. A routing rule should depend on observed failures and business risk, not simply the length of the input or the confidence of the answer.
Choose models by task on RequestBeam
Compare Claude Sonnet 4.5 and 4.6 for coding or analysis that needs more iteration. Also test GPT-5.6 Terra and Gemini 3.5 Flash-Lite on the same extraction or writing samples instead of inferring their behavior from family names.
Keep current account prices, response parsing, and supported parameters in view. Shared Chat Completions makes request structure reusable, but Claude Messages content blocks and model-specific options still need their own handling.
Why use Claude Haiku 4 5 through RequestBeam?
Usage-based billing and model cost optimization
Reliable service at prices lower than official rates. Top up on demand and use what you pay for.
Unified AI models and data APIs, with multi-model access in one place
One API key connects multiple AI models and data services, reducing integration costs and letting you switch with one click. Business applications need both AI and data.
Call logs and application access controls, with clarity on every call
Every API call is recorded in your dashboard. Create separate API keys for different applications.
Model capabilities without compromise
We do not water down our models. We cannot offer you the cheapest, but we are committed to offering you the best.
How to use Claude Haiku 4 5 on RequestBeam
After creating an API key in the console, follow the documentation to get started with Claude Haiku 4 5.
Prepare your account and test online
Sign in, confirm your balance, and create an API key.
Try it in the Playground
Explore the model's capabilities in the Playground to find the best way to use it.
Integrate Claude Haiku 4 5 into your business
Follow our developer documentation to integrate Claude Haiku 4 5 into your business.
Future model upgrades
When a new model is released, simply replace the model name with the new one to upgrade.
Claude Haiku 4 5 API FAQ
Is Claude Haiku 4.5 the same API model as Sonnet 4.5?
No. The API model name for Claude Haiku 4.5 is claude-haiku-4-5; the API model name for Claude Sonnet 4.5 is claude-sonnet-4-5. They are different models, so do not mix up their model parameters.
Why is thinking empty or the answer incomplete?
Native Haiku 4.5 has extended thinking off by default, so empty thinking is normal. To enable it, configure thinking and its budget according to the documentation. For an incomplete answer, check the completion state and output allowance, leaving enough room for thinking and final text.
How should I troubleshoot authentication, balance, or access errors?
Follow the API error documentation to diagnose the issue.
Can I use OpenAI Responses for Claude Haiku 4.5?
OpenAI Responses is not supported. Claude has its own Claude Messages format; see the documentation for details.
Can I force a tool call or edit a native Messages conversation?
Native Haiku 4.5 supports tool selection, but forced tool_choice types any or tool are not supported with manual extended thinking enabled. This restriction does not apply to every configuration. Take care when replaying preserved thinking after editing earlier messages. Keep native assistant content blocks and their signatures intact during tool continuations.
Is conversation memory permanent?
No. The API does not automatically retain conversation context for subsequent requests. Manage the history yourself and include the required context in each request. Long-term memory must be implemented by your application.
Related text APIs
Claude Haiku 4 5 API specification and requests
Claude Haiku 4 5 API quickstart
claude-haiku-4-5Chat CompletionsPOST /v1/chat-completions
curl -X POST "https://api.requestbeam.com/v1/chat-completions" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"model":"claude-haiku-4-5","messages":[{"role":"user","content":"Hello, introduce yourself in one sentence."}],"stream":false}'MessagesPOST /anthropic/v1/messages
Messages requires max_tokens. The allowance in this example is editable, not an upstream default or a model limit. Thinking may consume it before any answer text; adjust it for your task and check output costs.
curl -X POST "https://api.requestbeam.com/anthropic/v1/messages" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-H 'anthropic-version: 2023-06-01' \
-d '{"model":"claude-haiku-4-5","max_tokens":4096,"messages":[{"role":"user","content":"Hello, introduce yourself in one sentence."}],"stream":false}'Family and protocol reference
Claude Messages
Full API documentationNative Claude Messages-compatible API. This endpoint uses Anthropic Messages request and response shapes, including tool calls and Anthropic SSE events.
https://api.requestbeam.com/anthropic/v1/messagesNative Claude Messages-compatible API. This endpoint uses Anthropic Messages request and response shapes, including tool calls and Anthropic SSE events.
POST https://api.requestbeam.com/anthropic/v1/messagesAuthentication
All requests require a RequestBeam API Key. Anthropic SDKs, Claude Code, and compatible clients usually use x-api-key; plain HTTP clients may also use Bearer Token authentication.
x-api-key: YOUR_REQUESTBEAM_API_KEY
anthropic-version: 2023-06-01Authorization: Bearer YOUR_REQUESTBEAM_API_KEY
anthropic-version: 2023-06-01Body
modelstringrequiredDefault: claude-sonnet-4-6Supported Claude model IDs.
claude-fable-5claude-fable-5-1claude-haiku-4-5claude-opus-4-5claude-opus-4-6claude-opus-4-7claude-opus-4-8claude-opus-5claude-opus-5-5claude-sonnet-4-5claude-sonnet-4-6claude-sonnet-5
Use GET https://api.requestbeam.com/v1/models for the models currently available to your API Key.
max_tokensintegerrequiredMaximum number of output tokens, as a positive safe integer. This budget includes both thinking and final text output tokens. Missing, zero, negative, fractional, string, or unsafe-integer values return HTTP 400 with invalid_request_error before generation or billing. The model may impose a lower maximum.
For models that produce thinking, a small budget such as 128 may yield only thinking blocks before ending with stop_reason: "max_tokens", without text output. Set an explicit budget for the task and the selected model, allowing room for thinking and the final answer. The values in the examples are editable allowances, not upstream defaults or model limits; larger allowances may increase output usage and cost.
messagesobject[]requiredConversation messages. Each message contains role and content.
role supports user and assistant. content may be a string or an array of content blocks.
systemstring | object[]System prompt. Anthropic Messages uses a top-level system field instead of a system role in messages.
streambooleanDefault: falseWhether to return Anthropic SSE events.
temperaturenumberSampling temperature. Accepted values and effects vary by the selected model.
top_pnumberNucleus sampling parameter. Acceptance does not guarantee that it changes generation behavior.
top_kintegerTop-k sampling parameter. Support depends on the selected model.
stop_sequencesstring[]Stop sequences.
Requests with nonempty stop sequences avoid model services known not to support them; if no compatible service is available, the request returns 400 before generation or billing.
toolsobject[]Anthropic tool definitions. Function tools usually include name, description, and input_schema.
tool_choiceobjectTool selection policy, such as { "type": "auto" } or { "type": "tool", "name": "..." }.
thinkingobjectNative Anthropic thinking configuration, subject to the selected model and provider's support. Claude 4.5 uses { "type": "enabled", "budget_tokens": 1024 }; Claude Sonnet/Opus 4.6 also support adaptive thinking. Do not apply a manual budget to every model version. In tool continuations, return the complete ordered assistant content, including thinking, signature, redacted_thinking and tool_use, unchanged. Keep the thinking configuration and required anthropic-beta headers consistent through the tool round trip. For SSE, concatenate signature_delta.signature fragments for the same content block; an empty thinking summary does not mean its signature can be discarded. A provider account access rejection is an upstream failure, not evidence of an invalid signature. Recognized Bedrock account access rejections return HTTP 502 with api_error; ordinary client validation errors retain HTTP 400. Acceptance still requires an enabled upstream account.
metadataobjectRequest metadata.
Prompt Caching
Add cache_control: { "type": "ephemeral" } to a system or message content block. Cache usage may include cache_creation_input_tokens, cache_read_input_tokens, and supported 5-minute or 1-hour creation buckets. A 1-hour TTL also requires the corresponding anthropic-beta header.
Request Examples
Non-Streaming
{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello, introduce yourself in one sentence."
}
],
"stream": false
}Streaming
{
"model": "claude-haiku-4-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Reply exactly OK."
}
],
"stream": true
}Response
Non-streaming responses keep the Anthropic Message shape.
idstringResponse ID, such as msg_....
typestringObject type, usually message.
rolestringUsually assistant.
modelstringActual Claude model used.
contentobject[]Native output content blocks, including text, tool_use, and thinking when used.
stop_reasonstringStop reason, such as end_turn, max_tokens, stop_sequence, or tool_use.
usageobjectToken usage, including input_tokens and output_tokens. Cache token fields are included when present.
Success Example
{
"id": "msg_01...",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-6",
"content": [
{
"type": "text",
"text": "Hello, I am Claude and can help with writing, coding, and analysis tasks."
}
],
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 18,
"output_tokens": 24
}
}Streaming Response
When stream: true, the endpoint returns Anthropic SSE events. Common events include:
message_startcontent_block_startcontent_block_deltacontent_block_stoppingmessage_deltamessage_stop
Error Response
See Error Codes and Troubleshooting for the full code reference, protocol differences, and diagnostic steps.
Error responses use the Anthropic-style shape:
{
"type": "error",
"error": {
"type": "authentication_error",
"message": "Invalid credentials or API key has expired."
}
}