⚠️

Model No Longer Available

This model has been delisted from the API. This page is preserved for reference purposes only.

View Alternatives
A

claude-3-haiku-20240307

200k ContextTextPopular

Anthropic's claude-3-haiku-20240307 with extremely cost-effective pricing. thoughtful AI with strong ethics.

Pricing / 1M
USD
Input$0.2
Output$1
Context Window
200ktokens
Avg Latency
450ms

Capability Radar

Compare with Claude 3

About claude-3-haiku-20240307

"Exceptional reasoning and safety"

claude-3-haiku-20240307 is Anthropic's extremely cost-effective model featuring focused context window (200K). Exceptional reasoning and safety, this model delivers best-in-class for complex analysis.

Key Strengths

  • Exceptional reasoning and safety
  • Exceptional cost-effectiveness for high-volume use
  • OpenAI SDK compatible
  • Production-ready reliability

🎯 Best Use Cases

  • Content generation and copywriting
  • Question answering systems
  • Conversational AI applications
  • Full codebase analysis and refactoring
  • Multi-document research and synthesis
  • Long-form content generation

Technical Specifications

Context Window
200K
Max Output
4,096 tokens
Knowledge Domain
Chat, Text
Provider
Anthropic

Quick Start Guide

example.tsTypeScript
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://api.okrouter.com/v1",
  apiKey: "<YOUR_OKROUTER_KEY>",
});

async function main() {
  const completion = await openai.chat.completions.create({
    model: "claude-3-haiku-20240307",
    messages: [
      { role: "user", content: "Hello! What can you do?" }
    ],
  });

  console.log(completion.choices[0].message);
}

main();

Getting started with claude-3-haiku-20240307 is easy. Since OkRouter is fully compatible with the OpenAI SDK, you can use existing libraries to access this model immediately. claude-3-haiku-20240307 is fully compatible with the OpenAI Chat Completions API. distinctive features include Expanded context window and Text support.

Interactive Playground

Parameters Setup

0.7

Controls randomness: Lowering results in less random completions.

Return data chunks as they arrive

request.js
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.okrouter.com/v1",
  apiKey: process.env.OKROUTER_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "claude-3-haiku-20240307",
  messages: [{ role: "user", content: "Hello world!" }],
  temperature: 0.7,
  stream: true,
});

Frequently Asked Questions

?How much does claude-3-haiku-20240307 cost?

claude-3-haiku-20240307 costs $0.20 per 1M input tokens and $1.00 per 1M output tokens via OkRouter. This is 20% cheaper than OpenRouter with the same great performance.

?Is claude-3-haiku-20240307 compatible with OpenAI SDK?

Yes! claude-3-haiku-20240307 works seamlessly with all OpenAI SDKs (Python, JavaScript, Go, etc.). Simply change your base_url to api.okrouter.com and use your OkRouter API key. No code changes needed.

?What can I do with claude-3-haiku-20240307's large context window?

With 200K context, you can process entire codebases, analyze multiple documents simultaneously, generate long-form content, and build sophisticated RAG applications without chunking.