API Documentation
ClaudeAPI.cheap is fully compatible with the Anthropic Messages API. Just change the base URL and API key.
On this page
Quick Start
- Create an account at ClaudeAPI.cheap/signup
- Top up your balance with crypto (USDT, BTC, ETH)
- Generate an API key from the dashboard
- Replace your Anthropic base URL and API key
- Start making requests — that's it!
Authentication
All API requests require a valid API key in the Authorization header. Keys start with sk-cc-.
Base URL
We expose two compatible APIs. Pick the one that matches the SDK or tool you're using.
For Anthropic SDKs & Claude Code
Set as base_url / baseURL / ANTHROPIC_BASE_URL. The SDK appends /v1/messages automatically — do not add /v1 yourself.
Works with: official anthropic Python & Node SDKs, Claude Code CLI, Cursor (Anthropic provider), Cline (Anthropic provider).
For OpenAI-compatible tools
Set as base_url / baseURL. The OpenAI client appends /chat/completions automatically — the /v1 suffix IS required here.
Works with: official openai Python & Node SDKs, Kilo Code, Cline (OpenAI Compatible), Cursor (OpenAI Compatible), Cherry Studio, LobeChat, LibreChat, Continue, Roo Code, SwiftRouter.
Quick reference
| Your tool | Base URL to enter |
|---|---|
| Anthropic SDK / Claude Code | https://claudeapi.cheap/api/proxy |
| Kilo Code, Continue, Cherry Studio, etc. | https://claudeapi.cheap/api/proxy/v1 |
Raw curl — Anthropic format | https://claudeapi.cheap/api/proxy/v1/messages |
Raw curl — OpenAI format | https://claudeapi.cheap/api/proxy/v1/chat/completions |
| Codex CLI (Responses API) | https://claudeapi.cheap/api/proxy/v1 |
Available Models
| Model ID | Official | Basic (50% off) | Pro (80% off) | Context |
|---|---|---|---|---|
claude-opus-4-7 | $5 / $25 | $2.50 / $12.50 | $1.00 / $5.00 | 200K |
claude-sonnet-4-6 | $3 / $15 | $1.50 / $7.50 | $0.60 / $3.00 | 200K |
claude-haiku-4-5 | $1 / $5 | $0.50 / $2.50 | $0.20 / $1.00 | 200K |
Messages API
POST /v1/messages — Create a message (Anthropic Messages format).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID |
messages | array | Yes | Array of message objects |
max_tokens | integer | No | Max output tokens (default: 4096) |
system | string | array | No | System prompt (string or array with cache_control) |
temperature | float | No | 0.0 to 1.0 |
stream | boolean | No | Enable SSE streaming |
thinking | object | No | Enable extended thinking (see below) |
tools | array | No | Tool definitions for function calling |
tool_choice | object | No | Control tool selection behavior |
Response
OpenAI-Compatible API
POST /v1/chat/completions — Same Claude models, OpenAI ChatCompletions wire format.
This endpoint exists so any tool that speaks OpenAI's ChatCompletions API can talk to Claude through us without modification — drop us in as a custom OpenAI provider.
When to use this
Use it whenever your tool asks for an "OpenAI Compatible" / "OpenAI-style" provider. We handle the translation in both directions internally — system prompts, tool calls, streaming, thinking blocks, and prompt caching all map cleanly.
Configuration
| Field | Value |
|---|---|
| Base URL | https://claudeapi.cheap/api/proxy/v1 |
| API Key | sk-cc-… (same key as Anthropic side) |
| Model | claude-opus-4-7 · claude-sonnet-4-6 · claude-haiku-4-5 |
Python (OpenAI SDK)
Node.js (OpenAI SDK)
cURL
Editor extension setup (Kilo Code, Cline, Continue, Cursor "OpenAI Compat")
- In the extension settings, choose OpenAI Compatible provider.
- Set Base URL to
https://claudeapi.cheap/api/proxy/v1. The/v1suffix is required — without it the extension hits a 404. - Paste your
sk-cc-…key into the API key field. - Add models manually if the extension does not auto-discover:
claude-opus-4-7,claude-sonnet-4-6,claude-haiku-4-5.
Codex CLI (Responses API)
POST /v1/responses — OpenAI's newer Responses API wire format. Used by the Codex CLI and any client that calls /v1/responses instead of /v1/chat/completions.
Currently supports our OpenAI-vendor models (e.g. gpt-5.3-codex, gpt-5.5, gpt-5.4, gpt-5.4-mini). Claude and Gemini are not exposed on this endpoint — use /v1/messages or /v1/chat/completions for those.
Codex CLI setup
Point Codex at our proxy with two env vars:
Or persist them in ~/.codex/config.toml:
Raw curl example
Streaming
Set "stream": true to receive Server-Sent Events (SSE). Works with every model, thinking, and prompt caching.
Prompt Caching
Cache long system prompts to save up to 90% on repeated input tokens. Works with all models and streaming.
How it works
- First request — system prompt is cached. You pay 1.25× input price (cache write).
- Next requests — same system prompt is read from cache. You pay only 0.1× input price (90% off).
- Cache lasts 5 minutes (refreshed on each use).
Minimum cacheable size: 1,024 tokens for Sonnet 4.x and Opus 4.x, 2,048 tokens for Haiku 4.5. Below the threshold the request still works but nothing is cached.
Pass system as an array with cache_control:
Extended Thinking
Enable extended thinking to let Claude reason through complex problems before answering. Works with streaming.
budget_tokens controls max thinking tokens. Thinking tokens are billed as output tokens. Works on Claude Sonnet 4.6 and Opus 4.7.
Python SDK
Node.js SDK
cURL
Error Handling
| Status | Error Type | Description |
|---|---|---|
401 | authentication_error | Invalid or missing API key |
400 | invalid_request_error | Invalid model or malformed request |
402 | insufficient_balance | Balance is $0. Top up required. |
429 | rate_limit_error | Too many requests |
500 | internal_error | Server error |
502 | api_error | Model temporarily unavailable |
Rate Limits
| Plan | Price | Requests/min | Tokens/min | Discount |
|---|---|---|---|---|
| Basic | Free | 200 | 1,000,000 | 50% off |
| Pro | $19 lifetime | 500 | 2,000,000 | 80% off |
Claude Code Integration
Use ClaudeAPI.cheap directly with Claude Code:
Then just run claude in your terminal. All requests route through ClaudeAPI.cheap at up to 80% off with Pro plan.
Tools & Integrations
One-click setup guides for 14 popular AI coding tools — config snippet, recommended models, and FAQ for each.
Aider
Terminal coding agentAI pair programming in your terminal — multi-file edits, git-aware, and aggressive about token use.
Claude Code
Terminal coding agentAnthropic's official terminal coding agent — the gold standard, but $200-1000/month if you let it loose on a real project.
Cline
VS Code extensionThe autonomous coding agent for VS Code that turned plan-and-act into a 1-click button — at the cost of your Anthropic invoice.
Codex CLI
Terminal coding agentOpenAI's official command-line coding agent — direct competitor to Claude Code, with the same token-burning appetite.
Continue.dev
IDE extensionOpen-source IDE assistant for VS Code and JetBrains — autocomplete, chat, edit, agent — all powered by your API key.
Cursor
AI code editorThe AI-first code editor everyone forks VS Code for — until you hit the $20/month plan ceiling.
Gemini CLI
Terminal coding agentGoogle's open-source terminal agent for Gemini — 1M context, browser tools, surprisingly good. And surprisingly expensive at scale.
Goose
Autonomous AI agentBlock's open-source AI agent — local, extensible, MCP-native. Quietly one of the best multi-provider agents shipping in 2026.
Kilo Code
VS Code extensionThe open-source VS Code agent that merged the best of Cline and Roo — and shares their appetite for tokens.
OpenClaw
Autonomous AI agentThe autonomous AI agent that runs locally — and burns Claude tokens at 6-figure speed.
OpenCode
Terminal coding agentThe open-source Claude Code alternative — terminal-native, multi-provider, and BYOK from day one.
OpenHands
Autonomous AI agentFormerly OpenDevin — the autonomous AI software engineer that runs in a docker sandbox and ships PRs. Costs match the ambition.
Windsurf
AI code editorThe Cascade-flow IDE that turns your editor into an autonomous engineer — and your Anthropic invoice into a monthly surprise.
Zed
Code editorThe Rust-built code editor with first-class Anthropic support — fast enough that you actually notice when the API isn't.
Don't see your tool? Browse the full list at /tools, or email support@claudeapi.cheap and we'll add a guide.
Need Help?
Contact us at support@claudeapi.cheap.