Docs
Base URL
https://api.guttertokens.com
Authenticate with Authorization: Bearer sk-…. Keys are created in the dashboard and shown once.
Create an account to get a key. Credits are prepaid; there is no subscription.
Models and prices
| Model | Input /MTok | Output /MTok |
|---|---|---|
| claude-opus-4-8 | $1.25 | $6.25 |
| claude-opus-5 | $1.25 | $6.25 |
| claude-sonnet-5 | $0.50 | $2.50 |
| claude-haiku-4-5-20251001 | $0.25 | $1.25 |
Billed on tokens delivered. A request that fails upstream is not charged. Prompt caching is billed separately: writing a prefix to cache costs 25% more than the input price above, and each read after that costs 90% less.
OpenAI SDK (Python)
from openai import OpenAI
client = OpenAI(
base_url="https://api.guttertokens.com/v1",
api_key="sk-...",
)
response = client.chat.completions.create(
model="claude-opus-4-8",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Anthropic SDK (Python)
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.guttertokens.com",
api_key="sk-...",
)
message = client.messages.create(
model="claude-opus-4-8",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
print(message.content[0].text)Claude Code
export ANTHROPIC_BASE_URL=https://api.guttertokens.com export ANTHROPIC_AUTH_TOKEN=sk-... claude
Streaming
Set stream: true. Responses are server-sent events and are not buffered — tokens arrive as they are produced.
curl https://api.guttertokens.com/v1/chat/completions \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{
"model": "claude-haiku-4-5-20251001",
"messages": [{"role": "user", "content": "Count to ten"}],
"stream": true
}'Errors
Errors use the standard shape, so an SDK can branch on error.type and error.code.
| Status | code | Meaning |
|---|---|---|
| 400 | invalid_request | Malformed body or parameters. |
| 401 | invalid_api_key | Key missing, wrong, or revoked. |
| 403 | insufficient_quota | Out of credit. Add credit and retry. |
| 429 | rate_limit_exceeded | Too many requests. Back off and retry. |
| 503 | model_unavailable | No capacity for that model right now. |
| 500 | internal_error | Something failed on our side. |
Limits
- Concurrency and request-rate limits apply per source address. They are set high enough for parallel agent workloads; a
429means back off and retry. - There is no ceiling on how long a single request may run. Long agentic turns are normal traffic.
- Spending is bounded by your prepaid balance, not by a rate limit.
Supported endpoints
POST /v1/chat/completions— OpenAI Chat Completions, streaming and non-streaming.POST /v1/messages— Anthropic Messages, streaming and non-streaming.GET /v1/models— the models your key can reach.