Quickstart
FableAI API speaks the Anthropic Messages API. Point any Anthropic SDK or tool at https://api.fableaiapi.com and authenticate with a key from your dashboard.
- Create an account and verify your email.
- Add credit on the Balance page with your coupon code.
- Create an API key and copy it — it's shown only once.
# ~/.zshrc export ANTHROPIC_BASE_URL="https://api.fableaiapi.com" export ANTHROPIC_AUTH_TOKEN="sk-ant-fai-your-key" claude # that's it
Claude Code
Add these to your shell profile (~/.zshrc, ~/.bashrc) or set them in PowerShell, then run claude.
export ANTHROPIC_BASE_URL="https://api.fableaiapi.com" export ANTHROPIC_AUTH_TOKEN="sk-ant-fai-your-key" # Windows PowerShell $env:ANTHROPIC_BASE_URL="https://api.fableaiapi.com" $env:ANTHROPIC_AUTH_TOKEN="sk-ant-fai-your-key"
API reference
Supported endpoints:
POST /v1/messages— create a message (streaming and non-streaming)POST /v1/messages/count_tokens— estimate tokens (free)GET /v1/models— list available models
Authenticate with either x-api-key: sk-ant-fai-… or Authorization: Bearer sk-ant-fai-…. The anthropic-version and anthropic-beta headers are passed through.
Models
| Model ID | Price per 1M tokens |
|---|---|
| claude-fable-5-1 | $13.33334 |
| claude-opus-5-5 | $12.5 |
| claude-sonnet-5-5 | $12.903226 |
| claude-haiku-5-5 | $13.333333 |
| claude-fable-5 | $12.121206 |
| claude-opus-5 | $11.428571 |
| claude-sonnet-5 | $11.764706 |
| claude-opus-4-8 | $11.111111 |
| claude-opus-4-7 | $11.111111 |
| claude-opus-4-6 | $11.111111 |
| claude-sonnet-4-6 | $11.111111 |
| claude-opus-4-5 | $11.111111 |
| claude-sonnet-4-5-20250929 | $11.111111 |
| claude-haiku-4-5-20251001 | $11.111111 |
| claude-opus-4-1-20250805 | $11.111111 |
Streaming
Set "stream": true. Server-sent events are passed straight through; usage is read from the message_start and message_delta events and billed when the stream ends — including if you disconnect early.
Rate limits
Each key has a requests-per-minute limit based on your account group (default 60 RPM). Exceeding it returns 429 rate_limit_error with a retry-after header.
Errors
| 401 | authentication_error | Missing or invalid key |
| 402 | billing_error | Insufficient balance |
| 403 | permission_error | Key disabled, expired, over its spend cap, or model not allowed |
| 404 | not_found_error | Model not available |
| 429 | rate_limit_error | Too many requests per minute |
| 502 | api_error | Upstream temporarily unreachable — retry |
Billing
Each model has one price per million tokens. Input, output and cache tokens all count the same, and every request also carries a small fixed system overhead added by the upstream. Requests are metered at the upstream — the token counts in the API response are estimates, while your Usage page shows the exact billed tokens (finalised within about a minute). Requests draw from an active subscription first, then bonus credit, then your paid balance.