Skip to content

Claude Haiku 4.5

anthropic/claude-haiku-4-5 — a llm model by Anthropic. Call it through the gateway’s standard OpenAI-compatible door using the catalog slug; the full parameter schema is reproduced in full below.

Catalog sluganthropic/claude-haiku-4-5
Kindllm
VendorAnthropic
Context window200,000 tokens
Native model idclaude-haiku-4-5

Through the Sociaro SDK / OpenAI-compatible door

Section titled “Through the Sociaro SDK / OpenAI-compatible door”

This is an Anthropic model. When you call chat.completions.create, the SDK automatically translates the request to the Anthropic Messages format and sends it to POST /v1/messages. Calling the gateway directly (without the SDK) must use POST /v1/messagesPOST /v1/chat/completions returns 400 for Anthropic models (that door serves OpenAI-format models only).

from sociaro_ai import Sociaro
client = Sociaro(api_key="gw_live_...") # base_url defaults to https://api.sociaro.com
resp = client.chat.completions.create(
model="anthropic/claude-haiku-4-5", # always the catalog slug
messages=[{"role": "user", "content": "Hello"}],
# any parameter from the schema below is passed through unchanged
)
print(resp.choices[0].message.content)

TypeScript: client.chat.completions.create({ model: "anthropic/claude-haiku-4-5", messages: [...] }) — see the TypeScript SDK.

Through Anthropic’s native API (advanced)

Section titled “Through Anthropic’s native API (advanced)”

Optional: send Anthropic’s native request to the /anthropic prefix, using the native model id claude-haiku-4-5. The gateway injects the upstream Anthropic credential and forwards the body unchanged (catalog, pricing and entitlements still apply).

Terminal window
curl https://api.sociaro.com/anthropic/v1/messages \
-H "x-api-key: $SOCIARO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "claude-haiku-4-5", ... }'

The exact path, request body and response shape are documented in full in the schema below.

The complete, one-to-one API schema for this model, transcribed from the official source. Nothing omitted. Examples in the schema may use a representative model of the family — for this model use the slug anthropic/claude-haiku-4-5 (or the native id claude-haiku-4-5 for the native API) as shown in How to call above.

The model field is an enum, and free-string dated aliases are also accepted.

Model idTagline
claude-fable-5Next generation of intelligence for the hardest knowledge work and coding problems
claude-mythos-5Most capable model for cybersecurity and biology research
claude-mythos-previewNew class of intelligence, strongest in coding and cybersecurity
claude-opus-4-8Frontier intelligence for long-running agents and coding
claude-opus-4-7Frontier intelligence for long-running agents and coding
claude-opus-4-6Frontier intelligence for long-running agents and coding
claude-opus-4-5, claude-opus-4-5-20251101Premium model combining maximum intelligence with practical performance
claude-opus-4-1, claude-opus-4-1-20250805Exceptional model for specialized complex tasks
claude-opus-4-0, claude-opus-4-20250514Powerful model for complex tasks
claude-sonnet-4-6Best combination of speed and intelligence
claude-sonnet-4-5, claude-sonnet-4-5-20250929High-performance model for agents and coding
claude-sonnet-4-0, claude-sonnet-4-20250514High-performance model with extended thinking
claude-haiku-4-5, claude-haiku-4-5-20251001Fastest model with near-frontier intelligence

Additional dated/legacy aliases (e.g. claude-3-haiku-20240307) are accepted as free strings. For gateway slugs anthropic/claude-* the native prefix is transparent: these parameters pass through to /v1/messages one-to-one.

  1. Sampling params are deprecated. temperature, top_p, top_k are marked Deprecated. Models released after Claude Opus 4.6 do not support setting them:

    • temperature: only 1.0 is accepted (backwards compatibility); any other value returns HTTP 400.
    • top_p: only >= 0.99 is accepted (backwards compatibility); any other value returns HTTP 400.
    • top_k: any value is rejected with HTTP 400.
  2. Extended thinking mode varies by model (source: extended-thinking guide):

    • claude-fable-5, claude-mythos-5: extended thinking is always on and cannot be disabled. Manual thinking:{type:"enabled", budget_tokens:N} is not supported (HTTP 400), and thinking:{type:"disabled"} returns an error. Use adaptive thinking and control depth with output_config.effort.
    • claude-opus-4-8, claude-opus-4-7: manual thinking:{type:"enabled"} is not supported (HTTP 400). Use thinking:{type:"adaptive"} with output_config.effort; the model decides whether and how much to think.
    • claude-mythos-preview: adaptive is the default; type:"enabled" is also accepted; type:"disabled" is not supported. display defaults to "omitted" here (not "summarized") — pass display:"summarized" to receive summaries.
    • claude-opus-4-6, claude-sonnet-4-6: adaptive thinking is recommended; manual type:"enabled" (including interleaved) is deprecated but still functional.
    • Other current models (haiku-4-5, sonnet-4-5/4-0, opus-4-5/4-1/4-0): manual extended thinking (type:"enabled", budget_tokens:N) is supported. In summary, manual thinking is supported on all current models except Fable 5, Mythos 5, Opus 4.8, and Opus 4.7, where it returns HTTP 400.
  3. output_config.effort controls reasoning depth for adaptive-thinking models (Opus 4.8/4.7, Fable 5, Mythos 5, Mythos Preview); pairs with thinking:{type:"adaptive"}.

  4. Priority Tier (service_tier) is supported on all models except claude-mythos-preview and claude-mythos-5.

  5. max_tokens maximum differs per model (see the Models overview). 0 is legal (warms the prompt cache without generating).


  • Create: POST https://api.anthropic.com/v1/messages
  • Token-counting twin: POST https://api.anthropic.com/v1/messages/count_tokens — same body params (no sampling/output-generation effect); returns { "input_tokens": N }.
  • Send a structured list of input messages (text and/or image/document content); the model generates the next message. Usable for single queries or stateless multi-turn conversations.
HeaderRequiredValue / notes
x-api-keyyesYour Anthropic API key.
anthropic-versionyesAPI version, e.g. 2023-06-01. Send it on every request.
content-typeyesapplication/json.
anthropic-betanoComma-separated beta feature flags (fine-grained tool streaming, extended cache TTL, etc.).

When service_tier="auto" and a model has a Priority Tier commitment, the response also returns rate headers: anthropic-priority-input-tokens-limit/-remaining/-reset and anthropic-priority-output-tokens-limit/-remaining/-reset.


NameTypeRequiredDefaultAllowed / rangeDescription
modelModel (string enum or free-string alias)yesSee coverage map enumThe model that will complete your prompt.
messagesarray of MessageParam {content, role}yesInput messages. Models operate on alternating user/assistant turns; consecutive same-role turns are merged. A trailing assistant turn is continued (prefill).
max_tokensintegeryesminimum 0 (model-specific maximum)Max tokens to generate before stopping. The model may stop earlier. 0 warms the prompt cache without generating a response. Different models have different maximums.
systemstring OR array of TextBlockParam {text, type, cache_control, citations}noSystem prompt (context/instructions/role). There is no "system" role in messages; use this top-level field.
stop_sequencesarray of stringnoCustom text sequences that stop generation. On match, response stop_reason = "stop_sequence" and stop_sequence = the matched string.
streambooleannofalsetrue/falseIncrementally stream the response via server-sent events.
temperaturenumberno1.00.01.0Deprecated. Amount of randomness. Models released after Opus 4.6 do not support setting it — only 1.0 is accepted for backwards compatibility; other values return HTTP 400. Even 0.0 is not fully deterministic.
top_pnumberno0.01.0Deprecated. Nucleus sampling. Models released after Opus 4.6 reject it — only >= 0.99 is accepted for backwards compatibility; other values return HTTP 400. Advanced use only.
top_knumbernominimum 0Deprecated. Sample only from top-K tokens. Models released after Opus 4.6 reject any value with HTTP 400. Advanced use only.
toolsarray of ToolUnionnoTool definitions the model may call (tool_use blocks). Includes custom client tools and server tools. See shapes below.
tool_choiceToolChoice (union)noauto (when tools present){type:"auto"|"any"|"tool"|"none"}How the model uses tools. auto = model decides; any = must use some tool; tool (+name) = must use the named tool; none = no tools. auto/any/tool accept optional disable_parallel_tool_use (boolean, default false).
thinkingThinkingConfigParam (union)noenabled / disabled / adaptive (see below)Configuration for extended thinking. See the per-model matrix above and the dedicated section below.
metadataMetadata {user_id}nouser_id maxLength 512Metadata about the request. user_id: opaque external user id (uuid/hash) for abuse detection — must not contain name/email/phone.
service_tierstring (enum)no"auto""auto", "standard_only"Whether to use priority capacity (if available) or standard. auto may use priority then fall back; standard_only forces standard.
output_configOutputConfig {effort?, format?}nosee belowOutput options: reasoning effort and/or structured-output JSON schema.
containerstringnoContainer identifier for reuse across requests (code execution tool).
inference_geostringnoworkspace default_inference_geoGeographic region for inference processing.

MCP is not configured through a top-level request field on this endpoint; there is no mcp_servers parameter in the request body.

thinkingThinkingConfigParam (discriminated union)

Section titled “thinking — ThinkingConfigParam (discriminated union)”

type discriminates three variants. display is present only on enabled and adaptive; it is absent on disabled (ThinkingConfigDisabled properties = {type} only).

VariantShapeFields
ThinkingConfigEnabled{type:"enabled", budget_tokens, display?}type="enabled". budget_tokens (number, minimum 1024, must be < max_tokens; counts toward max_tokens). display: "summarized" (default) or "omitted".
ThinkingConfigDisabled{type:"disabled"}type="disabled" only. No display field.
ThinkingConfigAdaptive{type:"adaptive", display?}type="adaptive". display: "summarized" (default) or "omitted". Model picks its own budget.

display semantics: "summarized" → thinking returned normally; "omitted" → thinking content redacted but a signature is returned for multi-turn continuity. Defaults to "summarized" (except claude-mythos-preview, where it defaults to "omitted").

FieldTypeRequiredAllowedNotes
effortstring enumno"low", "medium", "high", "xhigh", "max"Reasoning effort level (adaptive-thinking models).
formatJSONOutputFormat {schema, type}notype="json_schema"; schema=JSON SchemaStructured-outputs JSON schema for Claude’s output format.
VariantShape
ToolChoiceAuto{type:"auto", disable_parallel_tool_use?} — model decides; disable_parallel_tool_use default false, if true outputs at most one tool use.
ToolChoiceAny{type:"any", disable_parallel_tool_use?} — must use some tool; if disable_parallel_tool_use=true, outputs exactly one tool use.
ToolChoiceTool{name, type:"tool", disable_parallel_tool_use?}name (string) = the tool to use; if disable_parallel_tool_use=true, exactly one tool use.
ToolChoiceNone{type:"none"} — model not allowed to use tools.

Applied per-block (text/image/document/tool/tool_result/system blocks) to set a prompt-cache breakpoint.

FieldTypeRequiredAllowedDefault
typestringyes"ephemeral"
ttlstringno"5m" (5 minutes), "1h" (1 hour)"5m"

messages[].content — block types (request side, ContentBlockParam)

Section titled “messages[].content — block types (request side, ContentBlockParam)”

content is a string (shorthand for one text block) OR an array of typed blocks. Each input message: { "role": "user"|"assistant", "content": ... }. Block type values:

Block typeKey fieldsNotes
texttext (string); optional cache_control, citations (array of TextCitationParam)Plain text.
imagesource: base64 {data, media_type} (image/jpeg/png/gif/webp), or url, or fileVision input.
documentsource: base64 PDF {data, media_type:"application/pdf"}, url, file, text, or content; optional citations {enabled}, title, context, cache_controlPDF / document input.
tool_useid, name, inputModel-generated tool call (assistant turns).
tool_resulttool_use_id, content (string or blocks), is_error?, cache_control?Result returned to the model.
thinking / redacted_thinkingthinking/data, signatureExtended-thinking blocks — echo back for multi-turn continuity.
search_resultcontent, source, title; optional citations {enabled}, cache_controlSearch-result content.
server_tool_use, web_search_tool_result, web_fetch_tool_result, code_execution_tool_result, bash_code_execution_tool_result, text_editor_code_execution_tool_result, container_uploadvariesServer-tool / container blocks.

Most blocks accept optional cache_control: {type:"ephemeral", ttl:"5m"|"1h"}.


tools[] item shape — custom client tool (Tool)

Section titled “tools[] item shape — custom client tool (Tool)”
FieldTypeRequiredConstraints / valuesNotes
namestringyesminLength 1, maxLength 128How the model calls the tool (also appears in tool_use blocks).
input_schemaobject {type:"object", properties?, required?}yesJSON Schema (draft 2020-12); properties = object map; required = array of stringShape of the tool input.
descriptionstringnoStrongly recommended; more detail → better tool-use quality.
typestringno"custom"Custom tool marker.
cache_controlCacheControlEphemeral {type, ttl?}nottl "5m"/"1h"Cache breakpoint at this tool.
allowed_callersarray of stringno"direct", "code_execution_20250825", "code_execution_20260120"Who may call the tool.
defer_loadingbooleannoIf true, tool loaded lazily via tool-search tool_reference.
eager_input_streamingbooleannoStream tool input incrementally (fine-grained streaming).
input_examplesarraynoExample inputs.
strictbooleannoGuarantee schema validation on tool names/inputs.

Server-tool variants (ToolUnion, discriminated by type with a fixed dated version)

Section titled “Server-tool variants (ToolUnion, discriminated by type with a fixed dated version)”

Each has its own fixed name and config; some support strict, cache_control, allowed_callers, and a user_location {city?, country?, region?, timezone?} (web search/fetch):

  • Bash: bash_20250124
  • Code execution: code_execution_20250522, code_execution_20250825, code_execution_20260120
  • Web search: web_search_20250305, web_search_20260209
  • Web fetch: web_fetch_20250910, web_fetch_20260209, web_fetch_20260309
  • Text editor: text_editor_20250124, text_editor_20250429, text_editor_20250728 (plus the text_editor_code_execution result block family)
  • Memory: memory_20250818
  • Tool search / clear-tool-uses: dated context-management tool variants (tool_search, with tool_reference for deferred-loaded tools)

Response body (HTTP 200) — Message object

Section titled “Response body (HTTP 200) — Message object”

Message {id, container, content, model, role, stop_reason, stop_sequence, stop_details, type, usage}.

FieldTypeNotes
idstringUnique object id (e.g. msg_…). Format/length may change.
containerContainer {id, expires_at} or nullCode-execution container info: id (string), expires_at (string, expiry time).
contentarray of ContentBlockGenerated content (text, tool_use, thinking, server-tool blocks, …). Continues from a trailing assistant prefill if present.
modelstring (Model enum)The model that handled the request.
role"assistant"Always "assistant".
stop_reasonStopReason enum or null"end_turn", "max_tokens", "stop_sequence", "tool_use", "pause_turn", "refusal". Non-null in non-streaming; null only in message_start for streaming.
stop_sequencestring or nullMatched custom stop sequence, if any.
stop_detailsRefusalStopDetails {category, explanation, type} or nullOn refusal. category: "cyber"/"bio"/"reasoning_extraction" or null (when the refusal doesn’t map to a named category). explanation: string (not guaranteed stable; null if unavailable). type: "refusal".
type"message"Always "message".
usageUsage objectBilling / rate-limit token counts (below).
  • "end_turn" — model reached a natural stopping point.
  • "max_tokens" — exceeded requested max_tokens or the model’s maximum.
  • "stop_sequence" — one of your custom stop_sequences was generated.
  • "tool_use" — the model invoked one or more tools.
  • "pause_turn" — a long-running turn was paused; pass the response back as-is in a subsequent request to continue.
  • "refusal" — streaming classifiers intervened for a potential policy violation.

Each has a type. Includes:

  • TextBlock {citations, text, type:"text"}. citations is an array; citation variants depend on cited document type:
    • CitationCharLocation {cited_text, document_index, document_title, end_char_index, file_id, start_char_index, type:"char_location"} (plain text)
    • CitationPageLocation {cited_text, document_index, document_title, end_page_number, file_id, start_page_number, type:"page_location"} (PDF)
    • CitationContentBlockLocation {cited_text, document_index, document_title, end_block_index, file_id, start_block_index, type:"content_block_location"} (content document)
    • CitationsWebSearchResultLocation {cited_text, encrypted_index, title, type:"web_search_result_location", url}
    • CitationsSearchResultLocation {cited_text, end_block_index, search_result_index, source, start_block_index, title, type:"search_result_location"}
  • ToolUseBlock {id, name, input, type:"tool_use"}
  • ThinkingBlock {thinking, signature, type:"thinking"} / RedactedThinkingBlock {data, type:"redacted_thinking"}
  • Server-tool / container result blocks (server_tool_use, web_search_tool_result, web_fetch_tool_result, code_execution_tool_result, container_upload, …).

Total input tokens = input_tokens + cache_creation_input_tokens + cache_read_input_tokens. output_tokens is non-zero even for empty output and is the authoritative billing total.

FieldTypeNotes
input_tokensnumberNon-cached input tokens used.
output_tokensnumberOutput tokens used. Inclusive, authoritative billing total.
cache_creation_input_tokensnumberTokens used to create the cache entry.
cache_read_input_tokensnumberTokens read from the cache.
cache_creationCacheCreation {ephemeral_1h_input_tokens, ephemeral_5m_input_tokens}Cached-token breakdown by TTL.
output_tokens_detailsOutputTokensDetails {thinking_tokens}thinking_tokens = output tokens spent on internal reasoning (including thinking-block delimiter tokens); read-only decomposition, ≤ output_tokens. Reflects raw reasoning, not the possibly-shorter summarized text.
server_tool_useServerToolUsage {web_fetch_requests, web_search_requests}Server-tool request counts.
service_tierenum "standard" / "priority" / "batch"The tier actually used.
inference_geostringRegion where inference ran.

Server-sent events; RawMessageStreamEvent is one of: message_start (carries the initial Message with null stop_reason), message_delta ({delta, type, usage} — cumulative usage, top-level stop_reason/stop_sequence deltas), message_stop, content_block_start, content_block_delta, content_block_stop, plus ping and error events.


Terminal window
curl https://api.anthropic.com/v1/messages \
-H "content-type: application/json" \
-H "anthropic-version: 2023-06-01" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, Claude"}
]
}'

Full request example — adaptive thinking + structured output + tools

Section titled “Full request example — adaptive thinking + structured output + tools”
Terminal window
curl https://api.anthropic.com/v1/messages \
-H 'content-type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "x-api-key: $ANTHROPIC_API_KEY" \
--max-time 600 \
-d '{
"model": "claude-opus-4-8",
"max_tokens": 4096,
"system": [{"type": "text", "text": "Today is 2026-06-01."}],
"messages": [
{"role": "user", "content": "What is the weather in SF? Reply as JSON."}
],
"thinking": { "type": "adaptive", "display": "summarized" },
"output_config": {
"effort": "high",
"format": {
"type": "json_schema",
"schema": {
"type": "object",
"properties": {"city": {"type": "string"}, "temp_c": {"type": "number"}},
"required": ["city", "temp_c"]
}
}
},
"tools": [
{
"name": "get_weather",
"description": "Get current weather for a location.",
"input_schema": {
"type": "object",
"properties": {"location": {"type": "string"}, "unit": {"type": "string"}},
"required": ["location"]
}
}
],
"tool_choice": { "type": "auto", "disable_parallel_tool_use": false },
"service_tier": "auto",
"metadata": { "user_id": "9f2b...opaque-hash" }
}'

For opus-4-8, opus-4-7, fable-5, and mythos-5, manual thinking:{type:"enabled", budget_tokens:N} returns HTTP 400 — use type:"adaptive" with output_config.effort as above. For sonnet-4-6 and opus-4-6, manual enabled still works but is deprecated. For haiku-4-5 and the 4-5/4-1/4-0 generations, manual enabled is fully supported. temperature/top_p/top_k are deprecated and rejected on models newer than Opus 4.6 (except the backwards-compatibility values temperature=1.0 and top_p>=0.99).

{
"id": "msg_013Zva2CMHLNnXjNJJKqJ2EF",
"container": { "id": "id", "expires_at": "2019-12-27T18:11:19.117Z" },
"content": [
{
"citations": [
{
"cited_text": "cited_text",
"document_index": 0,
"document_title": "document_title",
"end_char_index": 0,
"file_id": "file_id",
"start_char_index": 0,
"type": "char_location"
}
],
"text": "Hi! My name is Claude.",
"type": "text"
}
],
"model": "claude-opus-4-6",
"role": "assistant",
"stop_details": { "category": "cyber", "explanation": "explanation", "type": "refusal" },
"stop_reason": "end_turn",
"stop_sequence": null,
"type": "message",
"usage": {
"cache_creation": { "ephemeral_1h_input_tokens": 0, "ephemeral_5m_input_tokens": 0 },
"cache_creation_input_tokens": 2051,
"cache_read_input_tokens": 2051,
"inference_geo": "inference_geo",
"input_tokens": 2095,
"output_tokens": 503,
"output_tokens_details": { "thinking_tokens": 0 },
"server_tool_use": { "web_fetch_requests": 2, "web_search_requests": 0 },
"service_tier": "standard"
}
}
{ "input_tokens": 2095 }