OpenAI- and Anthropic-compatible API
Every major AI model. One API key.
Anthropic, OpenAI, Google, xAI, DeepSeek, Mistral, and Moonshot AI models, plus speech, transcription, image and video, through one endpoint your SDK already speaks. Pay as you go at the providers' list prices.
- No subscription
- Automatic fallback
- Invoice for every top-up
curl https://api.sparrowcodes.com/v1/chat/completions \
-H "Authorization: Bearer $SPARROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5.5",
"messages": [{"role": "user", "content": "Explain rate limiting in one paragraph."}]
}'Models from
- Anthropic
- OpenAI
- xAI
- DeepSeek
- Mistral
- Moonshot AI
23 chat models, 4 more model types
How it works
What happens to every request
Your code sends one request. SparrowCodes checks it, applies your privacy and routing rules, and keeps trying providers until one answers.
Your app
POST /v1/chat/completions
{
"model": "anthropic/claude-sonnet-5.5",
"models": ["openai/gpt-6.1-sol"],
"provider": { "sort": "price" },
"messages": [ … ]
}Your normal SDK call, with an optional backup model and routing preference.
SparrowCodes
Key, limits and balance
Rejected before any provider is called if a limit would be passed.
Privacy rules
Personal data masked if you turned masking on. Nothing stored by default.
Cache
An identical recent request is answered instantly, at no token cost.
Routing
Providers ordered by your preferences and their live health.
Providers
- Anthropic429 rate limitedanthropic/claude-sonnet-5.5Not charged
- OpenAI200 answeredopenai/gpt-6.1-solCharged at list price
Each attempt is logged. You see which provider answered and exactly what it cost.
Why SparrowCodes
Built for production traffic
The same models and the same API format. The difference is everything around the request.
- Automatic fallback
- List backup models in a request. If a provider errors or rate-limits, the next one answers, and you pay only for the answer.
- Routing you control
- Pin a provider order, allow or exclude providers, sort by price or speed, and cap the price you're willing to pay per request.
- Response cache
- Identical requests can be answered from cache in milliseconds at no token cost. Every cached response is marked in its headers.
- Zero retention
- Prompts and answers are not stored unless you turn logging on. Optional masking strips emails, phone numbers and card numbers before they leave.
- Bring your own keys
- Already have a provider account? Add its key and keep your own rates and limits, with SparrowCodes routing, logs and fallback on top.
- Teams and roles
- Owner, admin, developer and billing roles, two-factor sign-in, and an audit log of every change to keys, members and settings.
- Spend limits
- Monthly limits per key and alerts before your balance runs low, so a runaway script or a leaked key always has a ceiling.
- Every request, itemised
- Tokens, latency, provider, each fallback attempt and the exact cost, searchable and exportable to CSV.
- Webhooks and Slack
- Get low-balance, limit and key events in your own systems or a Slack channel as they happen.
Drop-in
Works with the SDKs you already use
Point your client at SparrowCodes by changing the base URL and the key. Streaming, tools, images and structured output work the way your SDK expects.
- OpenAI SDK for Python
- OpenAI SDK for Node.js
- Anthropic SDK for Python
- Vercel AI SDK
| Endpoint | What it does |
|---|---|
| /v1/chat/completions | Chat, tools, vision, streaming. OpenAI format. |
| /v1/messages | Claude's native format. Works with the Anthropic SDK. |
| /v1/responses | OpenAI Responses format, stateless. |
| /v1/embeddings | Text embeddings for search and RAG. |
| /v1/images/generations | Image generation. |
| /v1/videos | Video generation, polled until ready. |
| /v1/audio/speech | Text to speech. |
| /v1/audio/transcriptions | Speech to text. |
Models
Provider list prices, per million tokens
No markup on tokens: you pay what the provider charges. The top model from each provider is below; the full catalog has 23 chat models, 5 image models, 3 video models, 5 transcription models, and 2 embedding models.
| Model | Provider | Context | Input / 1M | Output / 1M | Supports |
|---|---|---|---|---|---|
| Claude Fable 5.1 anthropic/claude-fable-5.1 | Anthropic | 1M | $10 | $50 | Tools, Images |
| GPT-6 Astra openai/gpt-6-astra | OpenAI | 1.05M | $10 | $50 | Tools |
| Gemini 3.1 Pro (preview) google/gemini-3.1-pro | 1.05M | $2 | $12 | Tools, Images | |
| Grok 4.7 x-ai/grok-4.7 | xAI | 500K | $2 | $6 | Tools, Images |
| DeepSeek V4 Pro deepseek/deepseek-v4-pro | DeepSeek | 1.05M | $1.32 | $3.96 | Tools |
| Mistral Large 4 mistral/mistral-large-4 | Mistral | 1.05M | $0.70 | $2.10 | Tools, Images |
| Kimi K3 moonshotai/kimi-k3 | Moonshot AI | 262K | $3 | $15 | Tools |
Pricing
Prepaid credits. No plans.
You add credits and each request spends exactly what it uses, at the provider's list price. A 5.5% platform fee applies when you buy credits. That's the whole pricing model.
- Credits added to your balance
- $100.00
- Platform fee (5.5%)
- $5.50
- You pay
- $105.50
Make your first request in minutes
Sign in with your email, add credits, create a key. Change two lines of code.