APIrove

Home / Models / Claude / Claude Sonnet 5

MODEL · CLAUDE · TEXT

Claude Sonnet 5 API

Use the code below to send your own prompt to the Claude Messages API.

Sign in to get a trial allowance

Send your first request

Replace YOUR_API_KEY with your API key.

curl https://apirove.com/v1/messages \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'anthropic-version: 2023-06-01' \
  -H 'Content-Type: application/json' \
  -d '{"model": "claude-sonnet-5", "messages": [{"role": "user", "content": "Describe a paper boat on a lake."}], "max_tokens": 128}'
python -m pip install anthropic
from anthropic import Anthropic

client = Anthropic(base_url="https://apirove.com", api_key="YOUR_API_KEY")
print(client.messages.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Describe a paper boat on a lake."}],
    max_tokens=128,
))
Node.js · .mjs
const response = await fetch("https://apirove.com/v1/messages", {
  method: "POST",
  headers: {
    "x-api-key": "YOUR_API_KEY",
    "anthropic-version": "2023-06-01",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({"model": "claude-sonnet-5", "messages": [{"role": "user", "content": "Describe a paper boat on a lake."}], "max_tokens": 128})
});
console.log(response.status, await response.json());

On sale

Tutorial editing

Review a tutorial from a first-time reader’s perspective. Number the steps so a reviewer can point to the exact place where a prerequisite is missing.

Model IDclaude-sonnet-5

On sale

Endpoints

  • Base URL: https://apirove.com/v1
  • POST /v1/messages
  • Auth: Authorization: Bearer YOUR_API_KEY

Public price

Billing itemUSD rateOfficial priceSavingsUnit
Input$1$2Save 50%1M tokens
Output$5$10Save 50%1M tokens
Cache read$0.10$0.20Save 50%1M tokens
Cache write$1.25$2.50Save 50%1M tokens
1h cache write$2$4Save 50%1M tokens

Public USD retail rates. The server renders the public price list of 2026-11-24; the page refreshes them on load. Actual charges are on the Usage page.

Official prices: Anthropic pricing page (checked 2026-11-24). Savings = 1 − our rate ÷ official price, rounded down to a whole percent.

Highlights

  • Specify the screen state a reader should see at each step.
  • Ask for the number of any step with a missing prerequisite.
  • Keep suggested edits separate from questions for the author.
Six pale strips of different lengths on a terracotta gradient, with a disc at upper right

Use cases

  • Edit a starter tutorial
  • Review onboarding steps
  • Check post-install instructions

How to call it

Replace YOUR_API_KEY and send this request.

bash
APIROVE_API_KEY='YOUR_API_KEY'

curl -X POST https://apirove.com/v1/messages \
  -H 'Content-Type: application/json' \
  -H "x-api-key: $APIROVE_API_KEY" \
  -H 'anthropic-version: 2023-06-01' \
  -d '{
  "model": "claude-sonnet-5",
  "messages": [
    {
      "role": "user",
      "content": "Step A: Open a blank document. Step B: Select the inserted picture. Identify the missing action and refer to the step letters."
    }
  ],
  "max_tokens": 256
}'

FAQ

Should I let the edit supply a missing button name?

Mark the label for verification and have the author read it from the interface before publishing.

How do I compare tutorial reviews with Sonnet 5.5?

Leave one known gap in the same draft. Check whether each review locates it and proposes an edit the author can verify.

What does max_tokens do in the Messages example?

It caps the output for this request. The example allows room for a short answer. Adjust it for your task and inspect the stop reason.

What should I check if the example fails?

Check the /v1/messages URL and the x-api-key and anthropic-version headers. Then verify the exact model ID, messages and max_tokens in the body.

Where can I check current rates for this model?

Find the exact model ID in the public pricing table. Read the input, output and any listed cache rates with the unit shown for each.

Try the same sample with claude-sonnet-5-5. The related entries show the request format for each model.

Get an API key See pricing