Back to home

API Documentation

Beta

claudeapi.cheap is fully compatible with the Anthropic Messages API. Just change the base URL and API key.

Quick Start

  1. Create an account at claudeapi.cheap/dashboard
  2. Top up your balance with crypto (USDT, BTC, ETH)
  3. Generate an API key from the dashboard
  4. Replace your Anthropic base URL and API key
  5. Start making requests — that's it!

Authentication

All API requests require a valid API key in the Authorization header. Keys start with sk-cc-.

HTTP
Authorization: Bearer sk-cc-your-api-key-here

Base URL

URL
https://claudeapi.cheap/api/proxy/v1

Compatible with the Anthropic Messages API. Set base_url in your SDK to this value.

Available Models

Model IDInput / 1MOutput / 1MContext
claude-opus-4-6$7.50 $15$37.50 $75200K
claude-sonnet-4-6$1.50 $3$7.50 $15200K
claude-haiku-4-5$0.40 $0.80$2.00 $4200K

Messages API

POST /v1/messages — Create a message (Anthropic Messages format).

Request Body

FieldTypeRequiredDescription
modelstringYesModel ID
messagesarrayYesArray of message objects
max_tokensintegerNoMax output tokens (default: 4096)
systemstringNoSystem prompt
temperaturefloatNo0.0 to 1.0
streambooleanNoEnable SSE streaming

Response

response.json
{
"id": "msg_abc123",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-6",
"content": [
{
"type": "text",
"text": "Hello! How can I help you today?"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 15
}
}

Streaming

Set "stream": true to receive Server-Sent Events (SSE).

Python SDK

example.py
from anthropic import Anthropic
 
client = Anthropic(
base_url="https://claudeapi.cheap/api/proxy",
api_key="sk-cc-your-api-key"
)
 
message = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[
{"role": "user", "content": "Explain quantum computing"}
]
)
 
print(message.content[0].text)

Node.js SDK

example.ts
import Anthropic from "@anthropic-ai/sdk";
 
const client = new Anthropic({
baseURL: "https://claudeapi.cheap/api/proxy",
apiKey: "sk-cc-your-api-key",
});
 
const message = await client.messages.create({
model: "claude-sonnet-4-6",
max_tokens: 1024,
messages: [
{ role: "user", content: "Explain quantum computing" }
],
});
 
console.log(message.content[0].text);

cURL

terminal
curl -X POST https://claudeapi.cheap/api/proxy/v1/messages \
-H "Authorization: Bearer sk-cc-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello!"}
]
}'

Error Handling

StatusError TypeDescription
401authentication_errorInvalid or missing API key
400invalid_request_errorInvalid model or malformed request
402insufficient_balanceBalance is $0. Top up required.
429rate_limit_errorToo many requests
500internal_errorServer error
502upstream_errorUpstream provider error

Rate Limits

PlanRequests/minTokens/min
Free (Beta)1040,000
Starter60200,000
Pro3001,000,000
EnterpriseCustomCustom

Claude Code Integration

Use claudeapi.cheap directly with Claude Code:

~/.bashrc
export ANTHROPIC_API_KEY="sk-cc-your-api-key"
export ANTHROPIC_BASE_URL="https://claudeapi.cheap/api/proxy"

Then just run claude in your terminal. All requests route through claudeapi.cheap at 50% off.


Need Help?

Contact us at support@claudeapi.cheap.