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

Quickstart

Make your first Claudech request in a few minutes.

1. Get an API key#

Sign in and open API keys in the dashboard. Click Create key, give it a name, and copy the key that starts with sk-. The full key is shown once; Claudech only stores a hash of it.

Store it as an environment variable rather than pasting it into source code:

Shell
export CLAUDECH_API_KEY="sk-..."
Warning:

New accounts must verify their email address before the API accepts requests. Check your inbox for the verification link or resend it from Settings.

2. Pick the right base URL#

The same sk-... key works everywhere, but the base URL depends on your tool:

Tool / SDKBase URLExample endpoint
OpenAI SDK, Cursor, most “OpenAI-compatible” appshttps://api.claudech.com/v1POST /v1/chat/completions
Anthropic SDK, Claude Codehttps://api.claudech.comPOST /v1/messages (appended by the client)

For Claude Code, set ANTHROPIC_BASE_URL=https://api.claudech.com — not https://api.claudech.com/v1/chat/completions. See Cursor, Claude Code & tools.

3. Send a chat completion#

curl https://api.claudech.com/v1/chat/completions \
  -H "Authorization: Bearer $CLAUDECH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5",
    "messages": [
      { "role": "system", "content": "You are a concise assistant." },
      { "role": "user", "content": "Explain what a mutex is in two sentences." }
    ]
  }'

A successful response looks like this:

JSON
{
  "id": "chatcmpl-01J9X3Q5K7M2N8P4R6T0V2W4Y6",
  "object": "chat.completion",
  "created": 1789467600,
  "model": "claude-sonnet-5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "A mutex is a lock that lets only one thread at a time enter a critical section of code. Other threads that try to acquire it wait until the holder releases it, which prevents concurrent modification of shared state."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 31,
    "completion_tokens": 47,
    "total_tokens": 78,
    "prompt_tokens_details": { "cached_tokens": 0 },
    "completion_tokens_details": { "reasoning_tokens": 0 },
    "claud_tokens_debited": "83",
    "claud_cost_usd": "0.000164"
  },
  "system_fingerprint": "fp_claud"
}

The usage object includes two Claudech-specific fields: claud_tokens_debited (what the request cost from your balance) and claud_cost_usd (the same amount in dollars). The response headers carry the same information as x-claud-tokens-debited and your remaining balance as x-claud-balance.

4. Stream the response#

Set "stream": true to receive tokens as they are generated. The OpenAI SDKs handle the event stream for you:

curl https://api.claudech.com/v1/chat/completions \
  -H "Authorization: Bearer $CLAUDECH_API_KEY" \
  -H "Content-Type: application/json" \
  -N \
  -d '{
    "model": "claude-sonnet-5",
    "stream": true,
    "messages": [{ "role": "user", "content": "Write a haiku about compilers." }]
  }'

See Streaming for the exact chunk format, including the final usage and billing events.

5. Check your balance and usage#

Shell
curl https://api.claudech.com/v1/billing/balance \
  -H "Authorization: Bearer $CLAUDECH_API_KEY"
JSON
{
  "object": "balance",
  "available_tokens": "25998200",
  "purchased_tokens": "20000000",
  "subscription_tokens": "5998200",
  "reserved_tokens": "0",
  "approx_value_usd": "52.00",
  "token_rate": { "micro_usd_per_token": 2, "tokens_per_usd": 500000 }
}

The Usage page in the dashboard shows the same data with charts and a per-request log, and GET /v1/usage exposes it programmatically.

Where to go next#

  • Models: choose the right model for the job.
  • Tool calling & JSON: get structured output or let the model call your functions.
  • Rate limits and Errors: build a robust client.
  • Chat completions reference: every request parameter.
Previous
Introduction
Next
Authentication