Skip to content
OpenKey

Claude 3 Haiku

AnthropicReleased Mar 13, 2024

Claude 3 Haiku is Anthropic's fastest and most compact model for near-instant responsiveness. Quick and accurate targeted performance. See the launch announcement and benchmark results [here](https://www.anthropic.com/news/claude-3-haiku) #multimodal

Try in playground
Context window
200K tokens
Max output
4K tokens
Input
text, image
Output
text
Tokenizer
Claude
Knowledge cutoff
Aug 31, 2023
Released
Mar 13, 2024

Pricing

Per 1M tokens. The provider price and our flat 3% fee are separate columns — what you pay is their sum.

Per 1M tokensProvider+ 3% feeYou pay
Input$0.250$0.0075$0.258
Output$1.25$0.037$1.29
Cache read$0.030$0.0009$0.031
Cache write$0.300$0.0090$0.309

Supported parameters

  • max_tokens
  • stop
  • temperature
  • tool_choice
  • tools
  • top_k
  • top_p

Call it

OpenAI-compatible: point your SDK at api.openkey.ai/v1 and use model anthropic/claude-3-haiku.

Code sample language
curl https://api.openkey.ai/v1/chat/completions \
  -H "Authorization: Bearer $OPENKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-3-haiku",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.openkey.ai/v1",
    api_key=os.environ["OPENKEY_API_KEY"],
)

completion = client.chat.completions.create(
    model="anthropic/claude-3-haiku",
    messages=[{"role": "user", "content": "Hello"}],
)
print(completion.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.openkey.ai/v1",
  apiKey: process.env.OPENKEY_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "anthropic/claude-3-haiku",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);

Questions

How much does Claude 3 Haiku cost via API?
Through OpenKey, Claude 3 Haiku costs $0.258 per 1M input tokens and $1.29 per 1M output tokens. That is the provider price ($0.250 / $1.25) plus a flat 3% fee — nothing else.
What is Claude 3 Haiku's context window?
Claude 3 Haiku accepts up to 200K tokens of context and returns up to 4K tokens per request.
Is Claude 3 Haiku OpenAI-compatible?
Yes. Send requests to OpenKey's /v1/chat/completions endpoint with model "anthropic/claude-3-haiku" using any OpenAI SDK — only the base URL and API key change.
What inputs does Claude 3 Haiku support?
Claude 3 Haiku accepts text, image input and produces text output. Its knowledge cutoff is Aug 31, 2023.

More from Anthropic

All Anthropic models →