Modelsanthropicclaude-haiku-4-5
provideranthropic /

claude-haiku-4-5

350 DZD in 1750 DZD out/ 1M tokens

Claude Haiku 4.5 is the fastest model in the Claude family and the first Haiku to support extended thinking. It reaches near-frontier quality at a fraction of the latency, which is what makes it the right engine for work measured in volume rather than difficulty — classification, extraction, routing, and the mechanical steps inside a larger agent. Its reasoning control is manual rather than automatic: you set an explicit token budget for thinking, on the requests that warrant one, and leave it off everywhere else. It reads text and images across a 200,000-token context window, tracks its own token consumption as that window fills, and returns up to 64,000 tokens per response.

PublicJSON
claude-haiku-4-5
Capabilities
ToolsVisionReasoningStructured output
ArchitectureProprietary
Context Window200K

Claude Haiku 4.5

The fastest model in the Claude family. Text and images in, text out.


Thinking Works Differently Here

The first thing to know, because a configuration carried over from another Claude model will not apply.

Opus and Sonnet models in the current generation use adaptive thinking with an effort parameter: the model decides when and how much to reason, and you set the depth.

Haiku 4.5 uses manual extended thinking. You enable it explicitly and give it a token budget:

JSON
{ "thinking": { "type": "enabled", "budget_tokens": 4096 } }

There is no effort parameter on this model, and no adaptive mode. Reasoning is off until you turn it on, and when you do, you decide how much it gets.

That is the right shape for this tier. On work that runs thousands of times, a model choosing its own reasoning depth is a variable cost you cannot predict. An explicit budget is one you can.

Anthropic's own guidance: for meaningful gains on coding and reasoning tasks, enable it. For everything else — classification, extraction, routing, formatting — leave it off. Most of what this tier is good at does not benefit from deliberation.


Temperature and Top-P Are Mutually Exclusive

A second difference that returns an error rather than a degraded result.

Setting both temperature and top_p in the same request returns a 400. Use one or the other.

This catches shared request builders in particular: a helper that attaches both by default works against models that tolerate it and fails here. Strip one before routing traffic to this model.


It Watches Its Own Context

An unusual property worth building around.

This model has context awareness — it tracks its own token consumption as the window fills. The stated purpose is to prevent the failure where a model running a long task starts cutting corners as context runs short, producing progressively lazier output without saying why.

For agent work that matters more than it sounds. A sub-agent that degrades silently near the end of its budget is worse than one that stops and says so, because the degradation looks like a result.


Specifications

Model IDanthropic/claude-haiku-4-5
Pinned snapshotclaude-haiku-4-5-20251001
Context window200,000 tokens
Max output64,000 tokens
ThinkingExtended — manual, with budget_tokens
Adaptive thinkingNot supported
Effort parameterNot supported
Input → outputText and images → text
Reliable knowledge cutoffFebruary 2025
Training data cutoffJuly 2025
Comparative latencyFastest in the family

The short model ID is a convenience alias resolving to the pinned snapshot. Pin the dated form where reproducibility matters.

Anthropic publishes no parameter counts, architecture, or weights for Claude models.


Capabilities

CapabilityValue
input_typestext, image
output_typestext
audio_inputNot supported
video_inputNot supported
context_window200000
max_output_tokens64000
reasoningManual extended thinking
thinking_budgetRequired when thinking is enabled
effort_levelsNot applicable
temperature_and_top_pMutually exclusive
streamingSupported
tool_callingSupported
structured_outputSupported
requires_promptYes — text prompt required, image optional

Knowledge Reaches February 2025

The oldest cutoff among current Claude models, and the constraint most likely to produce a confident wrong answer rather than an error.

Library versions, API changes, events, standards, people in roles — anything after that date sits outside what the model knows, and it will not announce the gap.

Ground it rather than trusting recall. Retrieval, tool calls, or documents in the prompt move the model from remembering to reading, and reading is where a small model performs closest to a large one.

Permit it to decline. A system prompt that accepts "the source does not say" as a complete answer does more work here than on a model with recent knowledge.

For anything where currency is the point and grounding is not possible, this is the wrong tier.


Using Claude Haiku 4.5 on DEVUP AI

Base URL: https://api.devupai.com/v1 · Model ID: anthropic/claude-haiku-4-5

Classification — cURL

The configuration this tier exists for.

BASH
curl https://api.devupai.com/v1/chat/completions \
  -H "Authorization: Bearer $DEVUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-haiku-4-5",
    "messages": [
      {
        "role": "system",
        "content": "Classify this ticket. Answer with one word: billing, delivery, technical, or other."
      },
      { "role": "user", "content": "My package says delivered but nothing arrived." }
    ],
    "max_tokens": 8
  }'

No thinking, an eight-token ceiling, one word out. Every element of that request is doing throughput work.

Extended thinking with a budget — Python

For the minority of requests that need it.

PYTHON
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["DEVUP_API_KEY"],
    base_url="https://api.devupai.com/v1",
)

reply = client.chat.completions.create(
    model="anthropic/claude-haiku-4-5",
    messages=[{"role": "user", "content": coding_question}],
    max_tokens=16384,  # must exceed the thinking budget plus the answer
    extra_body={"thinking": {"type": "enabled", "budget_tokens": 4096}},
)

message = reply.choices[0].message

trace = getattr(message, "reasoning_content", None)
if trace:
    logger.debug("reasoning: %d characters", len(trace))

print(message.content)

max_tokens must exceed budget_tokens. The budget is what the model may spend on reasoning; the ceiling covers reasoning and answer together. Setting them equal leaves nothing for the response.

Choosing when to think — Python

The decision this model hands you explicitly.

PYTHON
def ask(prompt: str, *, thinking_budget: int = 0, max_tokens: int = 4096) -> str:
    """Send a request, enabling manual thinking only where it changes the answer."""
    payload = {
        "model": "anthropic/claude-haiku-4-5",
        "messages": [{"role": "user", "content": prompt}],
        "max_tokens": max_tokens,
    }

    if thinking_budget:
        if thinking_budget >= max_tokens:
            raise ValueError("max_tokens must exceed the thinking budget")
        payload["extra_body"] = {"thinking": {"type": "enabled", "budget_tokens": thinking_budget}}

    return client.chat.completions.create(**payload).choices[0].message.content


# Mechanical — no thinking, tight ceiling.
ask(f"Extract the order number from this message:\n\n{text}", max_tokens=32)

# Reasoning — explicit budget, room for both.
ask("Why does this recursive function overflow on lists longer than 900 items?", thinking_budget=4096, max_tokens=16384)

The guard on the second line catches the mistake this API makes easy: a budget that consumes the entire ceiling produces reasoning and no answer.

Structured extraction — Python

PYTHON
import json

SCHEMA = {
    "type": "json_schema",
    "json_schema": {
        "name": "order_issue",
        "strict": True,
        "schema": {
            "type": "object",
            "properties": {
                "order_id": {"type": ["string", "null"]},
                "problem": {
                    "type": "string",
                    "enum": ["not_delivered", "damaged", "wrong_item", "late", "other"],
                },
                "contact": {"type": ["string", "null"]},
            },
            "required": ["order_id", "problem", "contact"],
            "additionalProperties": False,
        },
    },
}


def extract(message: str) -> dict:
    """Pull typed fields from a customer message."""
    reply = client.chat.completions.create(
        model="anthropic/claude-haiku-4-5",
        messages=[
            {
                "role": "system",
                "content": "Extract only what the message states. Use null for anything absent — never infer.",
            },
            {"role": "user", "content": message},
        ],
        response_format=SCHEMA,
        max_tokens=512,
    )
    return json.loads(reply.choices[0].message.content)

Every field nullable, and an explicit instruction against inference. A schema that forbids null on a fast model invites it to produce a value the source never contained — and on a pipeline running at volume, that error stays invisible until someone acts on it.

As a sub-agent — Python

Where this tier saves most inside a larger system.

PYTHON
def condense(raw: str) -> str:
    """Shrink a large tool result before it re-enters an expensive model's context."""
    reply = client.chat.completions.create(
        model="anthropic/claude-haiku-4-5",
        messages=[
            {
                "role": "system",
                "content": (
                    "Condense this tool output to what a downstream agent needs. Preserve every "
                    "identifier, number, and error message exactly. Drop formatting, repetition, "
                    "and anything decorative."
                ),
            },
            {"role": "user", "content": raw},
        ],
        max_tokens=1024,
    )
    return reply.choices[0].message.content

A verbose tool result entering a frontier model's context on every turn of a long loop is among the more expensive habits in agent design. Compressing it here first costs a fraction of what it saves, and mechanical transformation is precisely what this tier handles well.

Reading an image — Python

PYTHON
import base64

with open("receipt.jpg", "rb") as handle:
    encoded = base64.b64encode(handle.read()).decode("utf-8")

reply = client.chat.completions.create(
    model="anthropic/claude-haiku-4-5",
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{encoded}"}},
                {
                    "type": "text",
                    "text": "Read the total and the currency. Answer as JSON with keys total and currency, using null for anything unreadable.",
                },
            ],
        }
    ],
    max_tokens=128,
)

Images cost input tokens on any tier. Keeping the question to two fields rather than a full description is what keeps a visual extraction path affordable at scale.

Node.js — DEVUP AI SDK

BASH
npm install devupai
JAVASCRIPT
import DevupAI from "devupai";

const client = new DevupAI({
  apiKey: process.env.DEVUP_API_KEY,
});

const reply = await client.chat.completions.create({
  model: "anthropic/claude-haiku-4-5",
  messages: [
    {
      role: "system",
      content: "Classify this ticket. Answer with one word: billing, delivery, technical, or other.",
    },
    { role: "user", content: ticket },
  ],
  max_tokens: 8,
});

console.log(reply.choices[0]?.message?.content);

Streaming

PYTHON
stream = client.chat.completions.create(
    model="anthropic/claude-haiku-4-5",
    messages=[{"role": "user", "content": "Summarise this thread in two sentences."}],
    max_tokens=256,
    stream=True,
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

With thinking off, output begins immediately — no deliberation phase to sit through. That is what makes this tier workable in interfaces where a reasoning model feels stalled.


Running It at Volume

The tasks this model suits are the tasks that repeat, so the failures are throughput failures.

Keep max_tokens tight. A one-word answer does not need a four-thousand-token ceiling. The ceiling caps what an unexpected response can cost.

Use one sampling parameter, not both. Temperature or top-p — setting both returns an error.

Prefer schemas to parsing prose. A schema removes a failure mode and a post-processing step at once.

Watch the input side. On short outputs the prompt frequently costs more than the completion. A long system prompt repeated across a million calls is the biggest line in many high-volume pipelines.

Batch where the shape allows. Twenty short items in one request costs far less in overhead than twenty requests.

Debounce anything triggered by typing. A search box firing on every keystroke is the classic way a cheap model produces an expensive bill.

Cap retries. An item retried without a ceiling is a loop.


When to Choose It

Strong fit for classification, extraction, tagging, routing, ranking, and reformatting at volume; for sub-agents executing plans made by larger models; and for interactive paths where consistent low latency is the product.

Enable thinking for coding and reasoning tasks specifically — Anthropic names those as where the gain is significant. Leave it off elsewhere.

Move up a tier when a task needs judgment rather than transformation, or when a specific input has already failed here. If you find yourself raising the thinking budget repeatedly to reach an acceptable answer, a larger model will get there with less total spend.


Limitations

No effort parameter and no adaptive thinking. Configuration carried from Opus or Sonnet models does not apply.

Thinking requires an explicit budget, and max_tokens must exceed it or the answer has no room.

Temperature and top-p cannot both be set. Sending both returns an error.

200,000-token window, a fifth of the current frontier models — the binding limit on repository-scale and multi-document work.

Knowledge stops at February 2025, the oldest cutoff in the current lineup. Ground anything time-sensitive.

Text and images only. No audio, no video, no image generation.

The smallest tier. Built for volume and speed, not for deep analysis or difficult judgment.

Internals are undisclosed — no parameter count, no architecture, no weights.

Fast output is not checked output. Validate any extracted figure before it reaches a system of record.