Docs

Claude API key

How to get a Claude (Anthropic) API key and call Claude Haiku, Sonnet and Opus — the direct Anthropic Console route, and the one-key Kunavo route that also reaches Gemini, GPT, Sora and 200+ models.

このドキュメントは英語版です。日本語版のクイックスタートはこちら:日本語版クイックスタート — 日本から Claude API を呼び出す

A Claude API key authenticates your calls to Anthropic's Claude models. You can get one directly from the Anthropic Console, or use a single sk-kunavo- key that reaches Claude — via the OpenAI SDK or the native Messages API — alongside every other model.

TL;DR — Sign up, create a key at /app/keys, set base_url=https://api.kunavo.com/v1, then call model="claude-sonnet-4-6". The same key also works for Gemini, GPT-Image, Veo and Sora.

Option A — a key direct from the Anthropic Console

  1. Go to console.anthropic.com and sign in.
  2. Open Settings → API keys → Create Key. Keys look like sk-ant-....
  3. Add a payment method under Billing — there is no free tier.

This is the right path if Claude is the only model you will ever call. If you also use Gemini, GPT, image or video models, you would manage a separate key, SDK and invoice per provider.

Option B — one Kunavo key for Claude and everything else

Kunavo fronts Claude behind both an OpenAI-compatible API and the native Anthropic Messages API. One sk-kunavo- key reaches Claude and every other model, with a single Stripe-billed balance.

Anthropic Console keyKunavo key
ModelsClaude onlyClaude + Gemini, GPT, image, video, 200+
Endpointapi.anthropic.comapi.kunavo.com/v1
APIsMessages APIOpenAI-compatible + Messages API
BillingAnthropic ConsoleOne Stripe wallet
Key formatsk-ant-...sk-kunavo-...
  1. Create a Kunavo account — you get $2 of free credit.
  2. Generate a key at /app/keys. It is shown once; store it in an environment variable.
  3. Point the OpenAI SDK at https://api.kunavo.com/v1 and call a Claude slug.

Call Claude with Python

Keep the official OpenAI SDK. Change base_url and the model name — nothing else.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["KUNAVO_API_KEY"],
    base_url="https://api.kunavo.com/v1",  # the only line that changes
)

resp = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Explain quicksort in one paragraph."}],
)
print(resp.choices[0].message.content)

Call Claude with Node.js

import OpenAI from "openai";

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

const resp = await client.chat.completions.create({
  model: "claude-sonnet-4-6",
  messages: [{ role: "user", content: "Explain quicksort in one paragraph." }],
});
console.log(resp.choices[0].message.content);

Or call it with curl

curl https://api.kunavo.com/v1/chat/completions \
  -H "Authorization: Bearer $KUNAVO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "messages": [{"role": "user", "content": "Hello, Claude"}]
  }'
Prefer Anthropic's native shape? The same key works against POST /v1/messages — see the Messages API reference.

Which Claude model to use

  • claude-haiku-4-5 — cheapest and fastest; great for high-volume classification and support.
  • claude-sonnet-4-6 — the balanced default for most reasoning, RAG and coding.
  • claude-opus-4-7 — the heaviest reasoner, for the hardest problems and long context.
For per-model rates and worked cost examples, see the Claude API pricing guide.

Troubleshooting

SymptomLikely causeFix
401 unauthorizedKey is wrong, revoked, or missing the Bearer prefixRecreate the key at /app/keys and send Authorization: Bearer sk-kunavo-…
402 insufficient_quotaBalance is empty or a per-key spend cap was hitTop up the balance or raise the key's cap
model not foundWrong slugUse an exact slug like claude-sonnet-4-6; browse /models
429 rate limitToo many requests in a short windowBack off and retry with exponential delay

Security checklist

  • Never expose a key client-side. Always proxy through your own server.
  • Use one key per project or environment so a leak can be revoked without taking down everything else.
  • Rotate quarterly. Kunavo allows multiple live keys for a clean overlap.

FAQ

Is a Claude API key free?

Anthropic does not offer a free Claude API tier — you pay per token from the first call, billed through the Anthropic Console. On Kunavo you start with $2 of free credit and then pay per token at rates roughly 60% below Anthropic's list.

Can I use Claude with the OpenAI SDK?

Yes. Kunavo serves Claude through the OpenAI-compatible /v1/chat/completions endpoint — keep the OpenAI SDK and set base_url to https://api.kunavo.com/v1 with model claude-sonnet-4-6. The native Anthropic Messages API (/v1/messages) is also available on the same key.

What is the difference between an Anthropic API key and a Kunavo API key?

An Anthropic Console key calls only Claude and bills through Anthropic. A Kunavo key calls Claude plus Gemini, GPT, image, video and audio models through one OpenAI-compatible API, billed once via Stripe.

Which Claude model should I start with?

Start with claude-sonnet-4-6 — the balanced default for most reasoning and coding. Drop to claude-haiku-4-5 for cheap high-volume tasks, or claude-opus-4-7 for the hardest reasoning and long-context work.

Where to go next