Quick Start
The API accepts the same payloads as Anthropic's /v1/messages. Below are cURL and Python examples using your configured base URL.
cURL
curl https://api.cheapai.cc/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '@'@"{"model":"claude-sonnet-4-5","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}"
Anthropic SDK (Python)
from anthropic import Anthropic
client = Anthropic(
api_key="YOUR_API_KEY",
base_url="https://api.cheapai.cc"
)
msg = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=256,
messages=[{"role": "user", "content": "Hello"}]
)
print(msg.content)
