Chuyển đến nội dung chính
Logo Anthropic

Claude Haiku 4.5 API

Anthropic

Claude Haiku 4.5 thuộc dòng mô hình ClaudeXem tất cả mô hình Claude

Mô hình nhỏ, nhanh của Anthropic cho trò chuyện khối lượng lớn, định tuyến và các bước tác nhân độ trễ thấp.

anthropic/claude-haiku-4-5

Tài liệu

Cuộc trò chuyện

Bắt đầu cuộc trò chuyện

Mô hình nhỏ, nhanh của Anthropic cho trò chuyện khối lượng lớn, định tuyến và các bước tác nhân độ trễ thấp.

Enter để gửi · Shift+Enter để xuống dòng

UnificAlly không lưu trữ prompt và câu trả lời LLM của bạn. Chúng tôi chỉ lưu thông tin số token sử dụng để tính phí.

Sử dụng POST /v1/chat/completions với khóa API UnificAlly của bạn. Hỗ trợ system prompt, user prompt, tools, streaming và chế độ suy nghĩ khi khả dụng.

Cập nhật

What is the Claude Haiku 4.5 API?

The Claude Haiku 4.5 API is live on UnificAlly as anthropic/claude-haiku-4-5, at $0.15/1M tokens for input and $0.75/1M tokens for output. Claude Haiku 4.5 is Anthropic's October 15, 2025 small model, built for speed and volume: near-frontier coding and agent results at the lowest price point in the Claude line. It accepts text and image input, and outputs text. Anthropic's own framing is blunt: it matches Claude Sonnet 4, the frontier model five months before it, on coding, at one-third the cost and more than twice the speed. It is also the first Haiku with extended thinking. Use it where latency and per-call cost decide the design.

Claude Haiku 4.5 API specs

Model IDanthropic/claude-haiku-4-5
EndpointPOST https://direct-api.unifically.com/v1/chat/completions
Other formatsPOST /v1/responses, POST /v1/messages
Request typesChat completion, streaming, tool calls
ResponseSynchronous JSON, or server-sent events with "stream": true
Input rate$0.15/1M tokens
Output rate$0.75/1M tokens
Cache read rate$0.015/1M tokens
Cache creation rate$0.1875/1M tokens

Billing is per token, with no subscription. The Claude API pricing guide covers the rates across the Claude line.

How to use the Claude Haiku 4.5 API

The Claude Haiku 4.5 API uses /v1/chat/completions, the OpenAI-compatible endpoint shared by every language model on UnificAlly.

  1. Create an API key on the API keys page.
  2. Send a POST request to https://direct-api.unifically.com/v1/chat/completions with the model ID and a messages array.
  3. Read the reply from choices[0].message.content in the same response.
curl -X POST https://direct-api.unifically.com/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{
    "model": "anthropic/claude-haiku-4-5",
    "messages": [
      { "role": "user", "content": "Classify this support ticket and draft a first reply." }
    ]
  }'

The response comes back synchronously with the completion:

{
  "id": "3f8e2a1c-7b4d-4e9a-9c2f-5d1e8b7a6c40",
  "object": "chat.completion",
  "created": 1710000000,
  "model": "anthropic/claude-haiku-4-5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Category: billing. Draft reply: ..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 28,
    "completion_tokens": 64,
    "total_tokens": 92,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    }
  }
}

The usage object holds the token counts the request is billed on. Set "stream": true to receive tokens as they generate. The stream ends with data: [DONE].

Claude Haiku 4.5 API parameters

ParameterTypeDefaultWhat it does
modelstringrequiredModel identifier. Use anthropic/claude-haiku-4-5
messagesarrayrequiredNon-empty array of message objects with role and content. Roles: system, developer, user, assistant, tool, function
streambooleanfalseStreams the response as server-sent events
stream_optionsobjectnoneSet { "include_usage": true } to get a final chunk with token usage. Only used when stream is true
temperaturenumbernoneSampling temperature between 0 and 2. Higher values produce more random output
max_tokensintegernoneMaximum number of tokens to generate
max_completion_tokensintegernoneAccepted as an alias for max_tokens
top_pnumbernoneNucleus sampling. An alternative to temperature
stopstring or arraynoneUp to four sequences where the model stops generating
toolsarraynoneTools the model may call. Each needs a type and a function definition
tool_choicestring or objectnonenone, auto, required, or a specific tool
response_formatobjectnoneSet { "type": "json_object" } for JSON mode

The Claude Haiku 4.5 API documentation lists every supported endpoint and request format for this model.

Messages format request

The same model ID also works on /v1/messages, the Anthropic request format. On /v1/chat/completions Claude models return only the final answer, so use this format when you need the thinking text.

curl -X POST https://direct-api.unifically.com/v1/messages   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -H "anthropic-version: 2023-06-01"   -d '{
    "model": "anthropic/claude-haiku-4-5",
    "max_tokens": 1024,
    "messages": [
      {"role": "user", "content": "Summarize this paragraph in one sentence."}
    ]
  }'

Key features of Claude Haiku 4.5

73.3% SWE-bench Verified

Near-frontier agentic coding from a small model. It lands within four points of Sonnet 4.5 and ahead of Sonnet 4, GPT-5, and Gemini 2.5 Pro.

Fastest model in the Claude line

More than twice the speed of Sonnet 4 at one-third the cost, and up to 4-5x the speed of Sonnet 4.5. Fast enough for user-facing chat and in-editor loops.

Extended thinking

The first Haiku that can reason before it answers. Set a thinking budget on hard turns; skip it to keep replies instant.

Computer use and tool calling

It scores 50.7% on OSWorld, ahead of Sonnet 4 at 42.2%, and holds 83.2% on τ2-bench retail. Browser and tool-calling agents get cheap to run at volume.

200k context, 64k output

Room for a full working set of files, a long support thread, or a document batch, with a callable max output of 64k tokens.

Vision input

Text and image input in one request. It reads screenshots, documents, and charts, scoring 73.2% on MMMU.

What Claude Haiku 4.5 is best for

  • Real-time chat assistants

    Latency low enough to keep a typed conversation moving.

  • Customer support agents

    Tool calls, ticket context, and fast replies at high volume.

  • Pair programming

    In-editor suggestions and fixes without the wait of a larger model.

  • Subagent fleets

    A Sonnet or Opus orchestrator plans; a team of Haiku workers runs the subtasks in parallel.

  • High-volume pipelines

    Classification, extraction, and summaries where per-call cost adds up fast.

  • Budget computer use

    Browser tasks that click, type, and read screens, at small-model prices.

Claude Haiku 4.5 use cases

Build a coding assistant that lives in the editor: with 73.3% on SWE-bench Verified and low latency, Claude Haiku 4.5 handles the fix-test-commit loop without breaking flow. Use it as the worker model in a multi-agent system, where Sonnet 4.5 breaks a problem into steps and a team of Haiku 4.5 instances completes subtasks in parallel. It also fits support automation that reads a ticket, calls tools, and answers in seconds, and document pipelines that classify, extract, and summarize thousands of items a day. Vision input covers screenshot triage and chart reading in the same call.

Claude Haiku 4.5 limitations

Claude Haiku 4.5 trails the bigger Claude models on deep reasoning. It scores 73.0% on GPQA Diamond versus 83.4% for Sonnet 4.5, and 50.7% on OSWorld versus 61.4%.

The context window is 200k tokens, not the 1M of newer Sonnet and Opus models, and max output is 64k tokens. Whole-repo work at the largest scale belongs on a bigger model.

Its reliable knowledge cutoff is February 2025. Pair it with search or retrieval when recent facts matter.

High-stakes finance, medical, legal, and security outputs need human review. That rule does not relax because the model is fast.

Claude Haiku 4.5 vs Claude Sonnet 4.5

Sonnet 4.5 is the stronger model: 77.2% versus 73.3% on SWE-bench Verified, 61.4% versus 50.7% on OSWorld, and 83.4% versus 73.0% on GPQA Diamond. Haiku 4.5 is the faster, cheaper one, with up to 4-5x the speed at a fraction of the cost. On tool calling the gap nearly closes: 83.2% versus 86.2% on τ2-bench retail. Pick Sonnet 4.5 when one agent must carry a long, hard task alone. Pick Haiku 4.5 when the work splits into many fast calls, or when a user is watching the cursor blink.

When to use Claude Haiku 4.5

Use Claude Haiku 4.5 when speed and per-call cost decide the design: user-facing chat, support automation, in-editor coding help, high-volume pipelines, and subagent workers under a larger orchestrator. Move up to a Sonnet or Opus model when a single agent needs the deepest reasoning or a 1M-token context.

Câu hỏi thường gặp

Câu hỏi thường gặp về Claude Haiku 4.5

anthropic/claude-haiku-4-5, called through the OpenAI-compatible POST /v1/chat/completions endpoint with your UnificAlly API key.

After creating an account, generate a key on the API keys page and send it in the Authorization: Bearer header. Haiku 4.5 calls go to https://direct-api.unifically.com/v1/chat/completions with the ID anthropic/claude-haiku-4-5, billed per input and output token.

The request needs anthropic/claude-haiku-4-5 and a messages array, with optional max_tokens, tools and tool_choice. The answer arrives in the same response in the OpenAI chat completion format, or as server-sent events with "stream": true; use /v1/messages when you need the thinking text, since chat completions returns only the final answer.

200k tokens, with a callable max output of 64k tokens. That fits a working set of source files, a long support thread, or a batch of documents in one request.

Yes for the price. It scores 73.3% on SWE-bench Verified, close to Sonnet 4.5 and ahead of Sonnet 4, with far lower latency and cost per call.

Yes. It is the first Haiku with extended thinking, so you can set a thinking budget on hard turns and keep instant replies on easy ones.

Text and image input with text output. It reads screenshots, documents, and charts in the same request as code or chat.

It is the fastest model in the Claude line. Anthropic measured more than twice the speed of Sonnet 4 at one-third the cost, and up to 4-5x the speed of Sonnet 4.5.

Deep reasoning trails the bigger Claude models, the reliable knowledge cutoff is February 2025, and high-stakes finance, legal, medical, and security outputs need human review.

Hướng dẫn và so sánh Claude Haiku 4.5

Xem bảng giá, giới hạn và kết quả thử nghiệm thực tế trước khi chạy mô hình này.