aiapi.cheap is fully compatible with the Anthropic Messages API. Just change the base URL and API key.
All API requests require a valid API key in the Authorization header. Keys start with sk-cc-.
We expose two compatible APIs. Pick the one that matches the SDK or tool you're using.
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).
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.
| Your tool | Base URL to enter |
|---|---|
| Anthropic SDK / Claude Code | https://aiapi.cheap/api/proxy |
| Kilo Code, Continue, Cherry Studio, etc. | https://aiapi.cheap/api/proxy/v1 |
Raw curl — Anthropic format | https://aiapi.cheap/api/proxy/v1/messages |
Raw curl — OpenAI format | https://aiapi.cheap/api/proxy/v1/chat/completions |
| Model ID | Official | Basic (70% off) | Pro (80% off) | Context |
|---|---|---|---|---|
claude-opus-4-7 | $5 / $25 | $1.50 / $7.50 | $1.00 / $5.00 | 200K |
claude-sonnet-4-6 | $3 / $15 | $0.90 / $4.50 | $0.60 / $3.00 | 200K |
claude-haiku-4-5 | $1 / $5 | $0.30 / $1.50 | $0.20 / $1.00 | 200K |
POST /v1/messages — Create a message (Anthropic Messages format).
| 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 |
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.
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.
| Field | Value |
|---|---|
| Base URL | https://aiapi.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 |
https://aiapi.cheap/api/proxy/v1. The /v1 suffix is required — without it the extension hits a 404.sk-cc-… key into the API key field.claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5.Set "stream": true to receive Server-Sent Events (SSE). Works with every model, thinking, and prompt caching.
Cache long system prompts to save up to 90% on repeated input tokens. Works with all models and streaming.
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:
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.
| 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 |
| Plan | Price | Requests/min | Tokens/min | Discount |
|---|---|---|---|---|
| Basic | Free | 200 | 1,000,000 | 70% off |
| Pro | $19 lifetime | 500 | 2,000,000 | 80% off |
Use aiapi.cheap directly with Claude Code:
Then just run claude in your terminal. All requests route through aiapi.cheap at up to 80% off with Pro plan.
Contact us at support@aiapi.cheap.