Claudech
ModelsPricingDocs
Sign inGet started
Claudech

Fast, capable AI models with transparent token billing.

No KYC. Crypto payments. OpenAI- and Anthropic-compatible API.

Newsletter · 50k free tokens

Double opt-in. See all rewards.

Product

  • Models
  • Pricing
  • Chat
  • Playground
  • Earn free tokens
  • Affiliate program

Developers

  • Documentation
  • Quickstart
  • API reference
  • Errors & limits

Company

  • Support
  • Security
  • Terms
  • Privacy
© 2026 ClaudechAll systems operational
Get started
  • Introduction
  • Quickstart
  • Authentication
  • Models
Guides
  • Streaming
  • Tool calling & JSON
  • SDKs & libraries
  • Cursor, Claude Code & tools
  • Rate limits
  • Errors
  • Tokens & billing
API reference
  • Chat completions
  • Messages (Anthropic format)
  • Models
  • Account & balance
  • Usage
  • API keys

SDKs and libraries

Claudech does not ship its own SDK because it does not need one. The API speaks two widely-supported wire formats, so every client library, framework and tool that talks to either works with Claudech by changing a base URL and a key:

  • OpenAI Chat Completions format at POST /v1/chat/completions — used by the OpenAI SDKs, Vercel AI SDK, LangChain, LlamaIndex, Cursor, Continue, Open WebUI and most other tooling.
  • Anthropic Messages format at POST /v1/messages — used by the Anthropic SDKs, Claude Code and tools with an "Anthropic base URL" setting.
SettingValue
Base URL (OpenAI format)https://api.claudech.com/v1
Base URL (Anthropic format)https://api.claudech.com (SDKs append /v1/messages)
API keyYour sk-... key
ModelA Claudech model slug such as claude-opus-5-5
Just a wire format

Claudech is an independent service. Supporting these request formats means your existing code and tools work unchanged; it does not mean Claudech is affiliated with, or proxies to, the companies that designed them. Every request is served by a Claudech model.

Official OpenAI SDKs#

// npm install openai
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env.CLAUDECH_API_KEY,
  baseURL: 'https://api.claudech.com/v1',
});

const res = await client.chat.completions.create({
  model: 'claude-opus-5-5',
  messages: [{ role: 'user', content: 'Hello, Claudech!' }],
});
console.log(res.choices[0].message.content);

Reading Claudech-specific fields#

The SDKs preserve fields they do not know about. Cost information is available on every response:

const res = await client.chat.completions.create({ model: 'claude-opus-5-5', messages });
console.log(res.usage.claud_tokens_debited, res.usage.claud_cost_usd);

// Headers, via the raw response helper
const { data, response } = await client.chat.completions.create({ model: 'claude-opus-5-5', messages }).withResponse();
console.log(response.headers.get('x-claud-balance'));

Anthropic SDKs and Claude Code#

The Anthropic client libraries send requests in the Messages format to {baseURL}/v1/messages with the key in an x-api-key header. Point them at Claudech's origin (without /v1) and use a Claudech model slug:

// npm install @anthropic-ai/sdk
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  apiKey: process.env.CLAUDECH_API_KEY,
  baseURL: 'https://api.claudech.com',
});

const msg = await client.messages.create({
  model: 'claude-opus-5-5',
  max_tokens: 1024,
  messages: [{ role: 'user', content: 'Hello, Claudech!' }],
});
console.log(msg.content[0].text);

// Streaming
const stream = client.messages.stream({ model: 'claude-opus-5-5', max_tokens: 1024, messages: [{ role: 'user', content: 'Tell me a story.' }] });
for await (const event of stream) {
  if (event.type === 'content_block_delta' && event.delta.type === 'text_delta') process.stdout.write(event.delta.text);
}

Tool use (tools / tool_use / tool_result blocks), system prompts, image blocks and stop_sequences are all translated. Reasoning models return thinking content blocks when thinking: { type: "enabled" } is set. The usage object carries the standard input_tokens / output_tokens fields plus claud_tokens_debited and claud_cost_usd.

To run Claude Code against Claudech, set two environment variables and start it as normal:

Shell
export ANTHROPIC_BASE_URL=https://api.claudech.com
export ANTHROPIC_AUTH_TOKEN=$CLAUDECH_API_KEY   # or ANTHROPIC_API_KEY
export ANTHROPIC_MODEL=claude-opus-5-5              # optional: default model
claude

See Cursor, Claude Code & tools for step-by-step setup of coding assistants and chat UIs.

Frameworks#

// npm install ai @ai-sdk/openai-compatible
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
import { generateText, streamText } from 'ai';

const claudech = createOpenAICompatible({
  name: 'claudech',
  apiKey: process.env.CLAUDECH_API_KEY!,
  baseURL: 'https://api.claudech.com/v1',
});

const { text } = await generateText({
  model: claudech('claude-opus-5-5'),
  prompt: 'Summarise the plot of Hamlet in one paragraph.',
});

// or stream in a route handler
const result = streamText({ model: claudech('claude-haiku-4-5'), prompt: 'Hello!' });
return result.toTextStreamResponse();

Plain HTTP#

Any HTTP client works. The essentials:

HTTP
POST /v1/chat/completions HTTP/1.1
Host: api.claudech.com
Authorization: Bearer sk-...
Content-Type: application/json

{"model":"claude-opus-5-5","messages":[{"role":"user","content":"Hello"}]}
  • Send JSON with Content-Type: application/json; bodies up to 2 MB.
  • For streaming, read the body incrementally and split on blank lines; each event is data: <json> and the stream ends with data: [DONE].
  • Retry 429/5xx with back-off and honour retry-after. See Errors.

Compatibility notes#

Claudech implements the Chat Completions surface faithfully. Differences to be aware of:

AreaBehaviour
nOnly 1 is supported.
logprobsAccepted; always returns null.
response_format.json_schemaTreated as json_object; validate the output yourself.
developer roleAccepted and mapped to system.
max_completion_tokensSupported; takes precedence over max_tokens.
reasoning_effort / thinkingSupported on reasoning models; see Reasoning controls.
usageIncludes claud_tokens_debited and claud_cost_usd; streams add a final claud billing event.
Other endpointsOnly /v1/chat/completions and /v1/models follow the OpenAI shape. Embeddings, images, audio and files are not offered.

Unknown top-level parameters are ignored rather than rejected, so libraries that send extra fields keep working.

Previous
Tool calling & JSON
Next
Cursor, Claude Code & tools