AIREITER
DOCS APIPREÇOS
TEMPLATES
AnthropicText Chat

Claude Sonnet 5 AI Chat Playground e API

Experimente o Claude Sonnet 5 online para codificação, análise, redação e assistentes de produção equilibrados. Teste respostas em streaming, inspecione o uso de tokens e integre a API.

EntradaOficial $2.00 por 1 milhao de tokensAIReiter $1.00 por 1 milhao de tokensSaídaOficial $10.00 por 1 milhao de tokensAIReiter $5.00 por 1 milhao de tokensLeitura de cacheOficial $0.20 por 1 milhao de tokensAIReiter $0.10 por 1 milhao de tokensCriação de cacheOficial $2.50 por 1 milhao de tokensAIReiter $1.25 por 1 milhao de tokens
Tipo de modelo
Executar com API
PlaygroundLeia-meAPI

ENTRADA

imagefile[]
Optional input images sent alongside the prompt. Up to 5 files. Images are billed as input tokens.
Let the model reason before answering. The model decides how much thinking each request needs.Default: false
1
2
3
4
5
6
7
8
9
10
11
12
13

Install the official Anthropic client — AIReiter speaks the same protocol, so only the base URL changes:

npm install @anthropic-ai/sdk

Set the AIREITER_API_KEY environment variable:

export AIREITER_API_KEY=<paste-your-key-here>

Point the client at AIReiter:

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.AIREITER_API_KEY,
  baseURL: "https://aireiter.com/api",
});

Run claude-sonnet-5:

const message = await client.messages.create({
    "model": "claude-sonnet-5",
    "max_tokens": 4096,
    "messages": [
      {
        "role": "user",
        "content": "Explain what an API rate limit is and how to handle a 429 response in code."
      }
    ],
    "output_config": {
      "effort": "medium"
    }
  });

console.log(message.content);

Stream the response instead:

const stream = client.messages.stream({
    "model": "claude-sonnet-5",
    "max_tokens": 4096,
    "messages": [
      {
        "role": "user",
        "content": "Explain what an API rate limit is and how to handle a 429 response in code."
      }
    ],
    "output_config": {
      "effort": "medium"
    }
  });

stream.on("text", (text) => process.stdout.write(text));
const message = await stream.finalMessage();

Install the official Anthropic client — AIReiter speaks the same protocol, so only the base URL changes:

pip install anthropic

Set the AIREITER_API_KEY environment variable:

export AIREITER_API_KEY=<paste-your-key-here>

Point the client at AIReiter:

import os
import anthropic

client = anthropic.Anthropic(
    api_key=os.environ["AIREITER_API_KEY"],
    base_url="https://aireiter.com/api",
)

Run claude-sonnet-5:

message = client.messages.create(
      model = "claude-sonnet-5",
      max_tokens = 4096,
      messages = [
        {
          role = "user",
          content = "Explain what an API rate limit is and how to handle a 429 response in code."
        }
      ],
      output_config = {
        effort = "medium"
      }
)

print(message.content)

Stream the response instead:

with client.messages.stream(
      model = "claude-sonnet-5",
      max_tokens = 4096,
      messages = [
        {
          role = "user",
          content = "Explain what an API rate limit is and how to handle a 429 response in code."
        }
      ],
      output_config = {
        effort = "medium"
      }
) as stream:
    for text in stream.text_stream:
        print(text, end="", flush=True)

Set the AIREITER_API_KEY environment variable:

export AIREITER_API_KEY=<paste-your-key-here>

Run claude-sonnet-5 against AIReiter's API:

curl -s -X POST \
  -H "x-api-key: $AIREITER_API_KEY" \
  -H "Content-Type: application/json" \
  "https://aireiter.com/api/v1/messages" \
  -d '{
  "model": "claude-sonnet-5",
  "max_tokens": 4096,
  "messages": [
    {
      "role": "user",
      "content": "Explain what an API rate limit is and how to handle a 429 response in code."
    }
  ],
  "output_config": {
    "effort": "medium"
  }
}'

Add "stream": true to the body to receive the response as server-sent events.

SAÍDA

Example

A codebase you don't know is a risk, not a hurdle. The plan should burn down that risk in order: understand, run, trace, spike, then make the change small enough that "production-ready" is a property you can demonstrate, not a hope.

Here are the first five steps, with the evidence you collect at each.

Step 1 — Get it building and the baseline green (half day) Read the README, the manifest(s), the CI config, and any architecture docs. Boot the app locally, run the full test suite, run the linter/typechecker. Evidence: The exact commands that reproduce a clean build and a passing test suite from a fresh checkout (recorded output, not memory of it). A one-page map you wrote yourself: where the entry points are, the layers, the build/test toolchain, and the main risks to your feature (e.g. "this touches cron jobs and payments").

Step 2 — Trace the smallest end-to-end slice that resembles your feature (half day) Don't start with your feature. Pick a neighboring one that already works and follow it from entry to persistence. Note the conventions along the way: how errors surface, how config is injected, how logging is done, how tests are written. Evidence: An annotated trace — file → function → what it does — for that slice. A written list of "conventions I must follow" (not intuitions; things you observed in real code). A named shortlist of the 3–5 files you will actually touch. If you can't produce this trace, you're not ready to write code.

Step 3 — Spike the core path (day 2) Build the ugly version: hardcoded values, no error handling, no tests. The purpose is to confirm the path you traced in step 2 is real and to surface what you didn't know you didn't know. Evidence: A working spike demonstrating the feature's central data path, alongside a list of every assumption the spike broke and what you corrected. That correction list is the most valuable document in this whole plan.

Step 4 — Write the contract before the code (half of day 2 / day 3) Once the spike proves the path, pin down what production needs: the inputs/outputs, the error cases, where it sits in the conventions from step 2. Then write the tests — they'll be red, but they're the specification. Evidence: A one-to-two-page design doc, an agreed interface/API shape (with the team if there is one), and a red test suite that encodes intended behavior. If you can't write the contract without consulting the code, you haven't finished step 2.

Step 5 — Implement in small, verified increments (days 3–4) Replace the spike with the real thing in small commits, each one keeping the suite green, leaning on the existing patterns. Run lint/tests/typecheck per commit — CI, not just locally — and exercise the actual path against a real instance (staging or a local environment that isn't stubbed). Evidence: A branch with progressive commits, each green in CI; coverage on the new code; something that proves it works against reality (a test result, a log trace, a screenshot); and a review by at least one person who knows the codebase. The review counts as evidence — an unfamiliar codebase has tribal knowledge you cannot extract from the files alone.

Steps 6+ would be the things that actually make it "shipped": a migration plan and its rollback, feature flagging, observability, the release and post-release verification. But the first five get you to a reviewed, green, working slice in staging — which is the point at which you can say "this will work in production" with evidence behind it, instead of a guess.

{
  "model": "claude-sonnet-5",
  "input": {
    "model": "claude-sonnet-5",
    "max_tokens": 4096,
    "messages": [
      {
        "role": "user",
        "content": "Explain what an API rate limit is and how to handle a 429 response in code."
      }
    ],
    "output_config": {
      "effort": "medium"
    }
  },
  "output": "A codebase you don't know is a risk, not a hurdle. The plan should burn down that risk in order: understand, run, trace, spike, then make the change small enough that \"production-ready\" is a property you can demonstrate, not a hope.\n\nHere are the first five steps, with the evidence you collect at each.\n\n**Step 1 — Get it building and the baseline green (half day)**\nRead the README, the manifest(s), the CI config, and any architecture docs. Boot the app locally, run the full test suite, run the linter/typechecker.\n*Evidence:* The exact commands that reproduce a clean build and a passing test suite from a fresh checkout (recorded output, not memory of it). A one-page map you wrote yourself: where the entry points are, the layers, the build/test toolchain, and the main risks to your feature (e.g. \"this touches cron jobs and payments\").\n\n**Step 2 — Trace the smallest end-to-end slice that resembles your feature (half day)**\nDon't start with your feature. Pick a neighboring one that already works and follow it from entry to persistence. Note the conventions along the way: how errors surface, how config is injected, how logging is done, how tests are written.\n*Evidence:* An annotated trace — file → function → what it does — for that slice. A written list of \"conventions I must follow\" (not intuitions; things you observed in real code). A named shortlist of the 3–5 files you will actually touch. If you can't produce this trace, you're not ready to write code.\n\n**Step 3 — Spike the core path (day 2)**\nBuild the ugly version: hardcoded values, no error handling, no tests. The purpose is to confirm the path you traced in step 2 is real and to surface what you didn't know you didn't know.\n*Evidence:* A working spike demonstrating the feature's central data path, alongside a list of every assumption the spike broke and what you corrected. That correction list is the most valuable document in this whole plan.\n\n**Step 4 — Write the contract before the code (half of day 2 / day 3)**\nOnce the spike proves the path, pin down what production needs: the inputs/outputs, the error cases, where it sits in the conventions from step 2. Then write the tests — they'll be red, but they're the specification.\n*Evidence:* A one-to-two-page design doc, an agreed interface/API shape (with the team if there is one), and a red test suite that encodes intended behavior. If you can't write the contract without consulting the code, you haven't finished step 2.\n\n**Step 5 — Implement in small, verified increments (days 3–4)**\nReplace the spike with the real thing in small commits, each one keeping the suite green, leaning on the existing patterns. Run lint/tests/typecheck per commit — CI, not just locally — and exercise the actual path against a real instance (staging or a local environment that isn't stubbed).\n*Evidence:* A branch with progressive commits, each green in CI; coverage on the new code; something that proves it works against reality (a test result, a log trace, a screenshot); and a review by at least one person who knows the codebase. The review counts as evidence — an unfamiliar codebase has tribal knowledge you cannot extract from the files alone.\n\nSteps 6+ would be the things that actually make it \"shipped\": a migration plan and its rollback, feature flagging, observability, the release and post-release verification. But the first five get you to a reviewed, green, working slice in staging — which is the point at which you can say \"this will work in production\" with evidence behind it, instead of a guess.",
  "metrics": {
    "input_tokens": 134,
    "output_tokens": 2354,
    "generated_in_seconds": 42.7
  },
  "example": true
}
Generated in
42.7 seconds
Token de entrada
134
Token de saída
2354
Tokens per second
55.13 tokens / second
Time to first token
-

Detalhes do modelo

Use a mesma chave de modelo no Playground, nas solicitações da API e nos fluxos de trabalho internos.

ID do modelo
claude-sonnet-5
Provedor
Anthropic
Protocolo
Anthropic Messages
Janela de contexto
1,000,000 tokens
Saída máxima
128,000 tokens
Token de entrada
100 créditos / 1 mi de tokens
Token de saída
500 créditos / 1 mi de tokens
Leitura de cache
10 créditos / 1 mi de tokens
Gravação de cache
125 créditos / 1 mi de tokens

O que você pode fazer com o Claude Sonnet 5

Escolha o Claude Sonnet 5 como um modelo de produção equilibrado para equipes que precisam de alta qualidade no dia a dia sem recorrer por padrão ao nível de maior custo em todas as solicitações.

Codificação de Produção

Implemente recursos, explique código desconhecido e itere em correções durante o desenvolvimento do dia a dia.

Análise Equilibrada

Compare opções e resuma evidências sem a sobrecarga de um fluxo de trabalho exclusivo do modelo principal.

Assistentes para Clientes

Crie suporte útil e assistentes internos que precisam de respostas claras e bem estruturadas.

Conteúdo Estruturado

Produza especificações, briefings, notas de lançamento e documentação operacional reutilizável.

Casos de uso do Claude Sonnet 5

Mais adequado para o amplo meio das tarefas de produção: capaz o suficiente para tarefas sérias e prático o bastante para uso repetido.
01

Desenvolvimento de Produto

Alterne entre código, testes, documentação e decisões de implementação.

02

Assistentes de Conhecimento Interno

Responda a perguntas operacionais em um formato claro e útil.

03

Automação de Suporte

Elabore respostas precisas e encaminhe casos ambíguos.

04

Produção de Conteúdo

Crie rascunhos estruturados e reutilizáveis para as necessidades diárias do negócio.

Como usar o Claude Sonnet 5

Teste o modelo em três etapas simples.

01

Escolha Suas Configurações

Defina os controles de resposta e as opções de upload suportadas pelo modelo.

02

Envie um Prompt

Descreva a tarefa, adicione o contexto relevante e revise a resposta em streaming e o uso de tokens.

03

Conecte a API

Use o endpoint documentado e sua API key para levar o mesmo modelo ao seu produto.

Crie com a API do Claude Sonnet 5

Passe de um teste interativo para uma integração em produção com controles previsíveis e relatório de uso.

Protocolos familiares

Use o protocolo da API configurado para este modelo, incluindo streaming quando disponível.

Visibilidade de uso

Acompanhe tokens de entrada, tokens de saída e créditos consumidos após cada resposta.

Controles específicos do modelo

Passe os parâmetros de geração compatíveis em vez de depender de padrões genéricos.

Uma conta e saldo

Teste e opere modelos de texto compatíveis por meio da mesma conta AIReiter e do mesmo sistema de cobrança.

FAQ do Claude Sonnet 5

Perguntas comuns sobre o playground online, preços e acesso à API.

/ 01

Quando devo escolher o Claude Sonnet 5?

Escolha-o como um modelo de produção equilibrado para codificação, análise, assistentes e redação estruturada.

/ 02

Como o Sonnet 5 difere dos níveis Opus?

O Sonnet é a opção padrão prática quando você precisa de forte capacidade no dia a dia sem encaminhar todas as tarefas para um nível principal.

/ 03

O Claude Sonnet 5 pode transmitir respostas em tempo real?

Sim. O playground transmite a saída e informa o uso após a conclusão.

/ 04

Como o Claude Sonnet 5 é precificado?

As taxas atuais de tokens de entrada e saída são exibidas acima do playground.

/ 05

Posso integrar o Claude Sonnet 5 por meio de uma API?

Sim. Abra a documentação da API vinculada e envie o ID do modelo exibido.

AIREITER

Dúvidas? Entre em contato em
[email protected]

新速率有限公司NEWRATE LIMITED香港九龍花園街 2-16 號好景商業中心 2304 室Room 2304, Haojing Commercial Center, 2-16 Garden Street, Kowloon, Hong Kong

LLM

GPT-6 AstraGemini 3.8 FlashClaude Fable 5.1GLM-5.3 FlashGemini 3.6 Flash

Vídeo IA

Gemini Omni 1.1 Flash ExtMiniMax H3Kling 3.0 Motion ControlKling 3.0 TurboKling 3.0

Imagem IA

GPT-Image 2.5Grok Imagine Image 2.0Midjourney V8.1Midjourney V7Z-Image Turbo

Blog

Ver Tudo →

Empresa

Política de PrivacidadeTermos de ServiçoPolítica de Reembolso

© 2026 AIReiter. Todos os direitos reservados.