Skip to main content
Model ID

Table of Contents

Claude Haiku 4.5 is Anthropic’s fastest and most cost-effective model, optimized for speed and efficiency. It delivers excellent performance for everyday tasks including quick responses, simple analysis, classification, and high-throughput applications. Designed for maximum speed and cost efficiency, Claude Haiku 4.5 excels at rapid responses, straightforward queries, and tasks where low latency matters. It offers an ideal balance of capability and efficiency for chat interfaces, customer support, content moderation, and high-volume processing where speed is critical.

API Usage

You can interact with the Anthropic Claude Haiku 4.5 model through various programming languages and methods. Below are examples showing how to use the model’s API.

API Examples

Generate a model response using the chat endpoint of Anthropic Claude Haiku 4.5.

Create chat completion

The Chat Completions API endpoint will generate a model response from a list of messages comprising a conversation.

Default

Streaming

Image Input

Functions

Python

Create a message

Anthropic’s native Messages API for generating model responses. Supports text and image inputs, and text outputs. Create stateful interactions with the model, using the output of previous responses as input. Extend the model’s capabilities with built-in tools for computer use, text editing, and more. Allow the model access to external systems and data using function calling. Enable extended thinking for complex reasoning tasks.

Default (Messages)

Streaming (Messages)

Extended Thinking

Functions (Messages)

Image Input (Messages)

PDF Input

Anthropic SDK (Python)

Install the official Anthropic SDK:
Basic Example
Streaming Example

Claude Code

Claude Code is Anthropic’s agentic coding tool that lives in your terminal. To use Claude Code with this API endpoint, set the following environment variables before starting Claude Code:
After setting these environment variables, you can launch Claude Code and it will automatically use the configured API endpoint.