AIUnlimited
🌳

Fundamentos de IA

🌱
AI Seeds

Comece do zero

🌿
AI Sprouts

Construa bases

🌳
AI Branches

Aplique na prática

🏕️
AI Canopy

Aprofunde-se

🌲
AI Forest

Domine a IA

🔨

Mestria em IA

✏️
AI Sketch

Comece do zero

🪨
AI Chisel

Construa bases

⚒️
AI Craft

Aplique na prática

💎
AI Polish

Aprofunde-se

🏆
AI Masterpiece

Domine a IA

📘

Prática de IA

📖
Entendendo modelos open-source

Fundamentos e recursos para modelos open-source

🎯
Do problema à tarefa do modelo

Convertendo problemas de negócio em tarefas de modelo

⚡
Executando seu primeiro modelo

Veja seus primeiros resultados em 30 minutos

🔧
Fine-tuning e avaliação

Ajuste modelos e avalie o desempenho

🚀
Sistemas de aplicação

Construa aplicações IA do mundo real

🎨
IA generativa

Explore modelos AIGC open-source

🤖
Agentes

Aprenda frameworks Agent e ferramentas MCP

📐
Fundamentos complementares

Fundamentos LLM e avaliação

🎓

Claude Academia

🤖
Claude 101

Learn AI basics with Claude

💻
Claude Code 101

Code with Claude as your pair programmer

🤝
Introduction to Claude Cowork

Collaborate with Claude on complex projects

⚙️
Claude Platform 101

Build apps with the Claude API

Laboratório

7 experimentos carregados
🧬Sandbox de Rede Neural🤖IA ou Humano?🥋Dojo de Prompt Engineering🏁Corrida de Algoritmos🧠Trivia de IA🏗️Tela de design de sistemas
🎯Entrevista simuladaEntrar no Laboratório→
🚀

Desenvolvimento de carreira

🚀
Plataforma de Lançamento de Entrevistas

Comece sua jornada

🌟
Domínio Comportamental

Domine habilidades interpessoais

💻
Entrevistas Técnicas

Passe na rodada de programação

🤖
Entrevistas de IA e ML

Domínio em entrevistas de ML

🏆
Oferta e Além

Conquiste a melhor oferta

Começar
AIUnlimited

Licença MIT

沪ICP备18025655号-11

Aprender

  • Fundamentos de IA
  • Prática de IA
  • Claude Academia
  • Laboratório
  • Desenvolvimento de carreira

Comunidade

  • Sobre
  • Perguntas Frequentes

Suporte

  • Termos de Serviço
  • Política de Privacidade
  • Contato
Acadêmicos de IA e Engenharia›⚙️ Claude Platform 101›Aulas›Choosing the Right Model
🎯
Claude Platform 101 • Intermediário⏱️ 5 min de leitura

Choosing the Right Model

Choosing the right model

You're shipping an app with Claude. Which model do you pick? If you default to the smartest one, your API bill will surprise you. Pick the cheapest one, and the output might not hold up. Each model has different trade-offs, and picking the right one affects both quality and cost.

The model tiers

Anthropic currently offers four model tiers, and you choose between them with the model parameter in your API call.

Note that Claude Fable 5.1 has been generally available since September 1, 2026, but is not reflected in the video above. Learn more about Claude Fable 5.1 and Claude Mythos 5.1 here. The video and terminal screenshot in this lesson were recorded with earlier models (Claude Opus 4.7 and Claude Sonnet 4.6). The code below uses the current model IDs; your latency and token numbers will differ.

  • Claude Fable is our most capable model yet — a new tier that sits above Opus, built for your toughest challenges. It comes at a higher cost than Opus, so reserve it for work where that extra capability is worth paying for. The current Fable model is Claude Fable 5.1 (claude-fable-5-1).
  • Claude Opus is the most capable of the three core model families, but also the slowest and highest cost of the three. Use it for deep reasoning, complex analysis, multi-step coding, and nuanced writing. The current Opus model is Claude Opus 5 (claude-opus-5).
  • Claude Haiku is the fastest and lowest cost, optimized for speed and cost efficiency rather than maximum intelligence. Use it for high-volume, low-complexity work like classification, extraction, and routing. The current Haiku model is Claude Haiku 4.5 (claude-haiku-4-5).
  • Claude Sonnet sits in the sweet spot: a balanced combination of intelligence, speed, and cost that works well for most production work. The current Sonnet model is Claude Sonnet 5 (claude-sonnet-5).
Aula 3 de 130% concluído
←Your First API Call

Discussão

Entrar participar da discussão

Start with a simple evaluation

Before you write production code, set up a simple evaluation: a set of example inputs that you run through each model and score against what good output means for your use case. You don't need anything fancy — 20 or 30 representative examples from your actual workload is enough to start.

Then work your way up the tiers:

  1. Run your examples through Haiku first. If the quality holds, you're done — and you just saved a lot of money.
  2. If it doesn't, step up to Sonnet.
  3. Only reach for Opus when the task needs it.

Comparing the tiers side by side

Let's see the difference between the tiers, not just talk about it. We'll send the same prompt through all three models and watch the latency and token counts:

models = ["claude-haiku-4-5", "claude-sonnet-5", "claude-opus-5"]

for model in models:
    response = client.messages.create(
        model=model,
        max_tokens=300,
        messages=[{"role": "user", "content": prompt}],
    )
    print(model, response.usage)

Two things are going on here:

  • The loop swaps the model field on each request. Same prompt, same max tokens — only the model changes.
  • response.usage gives you the input and output tokens straight back from the API, which is what your bill is calculated on.

Run it and you'll see three models and three sets of numbers. Opus takes the longest and reads the most polished — but for a two-sentence definition, that polish is wasted. Sonnet tightens the writing up a little. And Haiku comes back, often in under a second, with a very competent two-sentence answer. It's honestly perfect for this kind of scenario.

And that's the whole point: the right model is the cheapest one whose output you'd actually ship. For a definition, Haiku is plenty. For drafting a regulatory response, you'd run the same comparison and probably end up on Opus. The eval is the same shape every single time.

Routing different work to different models

In a real app, you'd route different kinds of work to different models inside the same endpoint. Take an operations dashboard with a document processing route:

  • Every incoming file gets classified with Haiku.
  • Client updates get drafted with Sonnet.
  • Only RFP responses reach for Opus.

One queue, three models, picked per task.

Recap

  • Anthropic offers four model tiers: Fable for the highest available capability, Opus for hard problems, Sonnet for daily work, and Haiku for volume.
  • Set up a simple evaluation — 20 or 30 representative examples from your real workload — before writing production code.
  • Run the eval from Haiku upward and stop at the cheapest model whose output you'd actually ship.
  • response.usage reports input and output tokens, which is what your bill is based on.
  • In production, route different tasks to different models inside the same endpoint instead of picking one model for everything.