Anthropic-compatible

An Anthropic-compatible API for the Messages format.

Point the Anthropic SDK, Claude Code or any HTTP client at Claudech with one base URL and an sk- key. Messages requests are billed per token from a prepaid balance.
  • POST /v1/messages
  • Streaming and tool use
  • 4 models

Setup

Two lines to switch

Anthropic-format base URL is https://api.claudech.com with no /v1 suffix. OpenAI-format clients use https://api.claudech.com/v1 instead.

import anthropic

client = anthropic.Anthropic(
    base_url="https://api.claudech.com",
    api_key="sk-...",
)

message = client.messages.create(
    model="claude-opus-5-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)

Compatibility

What works

Same request shapes as the Anthropic Messages API for the features below.

Messages

POST /v1/messages with role-based messages, max_tokens and optional parameters.

Streaming events

Enable streaming on Messages and consume Anthropic-style SSE events from the response.

Tool use

Define tools and let the model return tool_use blocks in the Messages response format.

Image input

User content can include image blocks alongside text on every model.

System prompts

Pass a system string or system blocks separate from the user and assistant turns.

1M-token context

Every model accepts up to one million tokens of context in a single request.

Models

Model rates

Prices are per million tokens, the same on every plan.

Model idMax outputInput / 1MCached input / 1MOutput / 1M
claude-opus-5-5
Fast and capable
66K tokens$0.50$0.010$1.90
claude-fable-5-1
Advanced reasoning
131K tokens$0.50$0.010$1.90
claude-opus-5
Deep reasoning
131K tokens$0.50$0.010$1.90
claude-sonnet-5
Fast responses
33K tokens$0.50$0.010$1.90

Using Claude Code? See Claude Code with Claudech and the Claude Code integration guide. Also see SDK examples and the migration guide.

FAQ

Frequently asked questions

Is Claudech affiliated with Anthropic?

No. Claudech is an independent service and is not affiliated with, endorsed by or sponsored by Anthropic. It implements the public Messages request format so the Anthropic SDK, Claude Code and similar tools keep working when you change the base URL and key.

Which base URL does the Anthropic SDK need?

https://api.claudech.com, with nothing after it. The SDK adds /v1/messages itself. Do not use the OpenAI-format address ending in /v1.

Authorization: Bearer or x-api-key?

Both work on every endpoint. Send your sk- key as Authorization: Bearer sk-... or as x-api-key: sk-.... Claude Code often uses ANTHROPIC_AUTH_TOKEN (Bearer) or ANTHROPIC_API_KEY (x-api-key).

How am I billed?

Every request is billed per token from your prepaid balance at the model rates in the table below. Cached input is billed at the lower cache rate automatically. The Usage page itemises each request. Purchased tokens never expire.

What is not supported?

Embeddings, image generation, audio, files and the OpenAI Responses API are not offered. Messages (including streaming, tool use, system prompts and image input) and the model list are.

When can I create an API key?

Sign up with an email, then buy any token package once. That unlocks API keys on your account. There is no separate API subscription.

Point your Anthropic client at Claudech

Create an account, buy any token package to unlock API keys, and set the base URL to https://api.claudech.com.