APIs cost money. This one earns it.
The AI Gateway
that pays for itself.
Ship an AI API with built-in RAG, content moderation, multi-provider fallback, and per-consumer billing. Your users get an OpenAI-compatible endpoint. You get revenue.
Build your pipeline. Toggle each stage.
Every stage is optional except LLM. Enable what you need — skip what you don't.
RAG
EnabledRetrieve relevant context from your knowledge base and inject it into the prompt.
Your API. Their keys.
Each consumer gets a unique API key. You control access, track usage, and bill per token — all automatic.
// Your consumer calls your API — not OpenAI's
curl -X POST https://gateway.aerostack.dev/my-api/v1/chat/completions \
-H "Authorization: Bearer ask_live_7f3a9c2e4b1d..." \
-d '{
"messages": [{ "role": "user", "content": "Summarize Q4 revenue" }],
"stream": true
}'
// OpenAI-compatible response — any SDK works
// Your RAG context, moderation, and billing all happen transparentlyOne key per consumer
Issue API keys with ask_live_ prefix. SHA-256 hashed — raw key shown once. Revoke or regenerate anytime.
Token wallet billing
Each consumer has a token balance. Every request deducts tokens used. Set hard limits to prevent overspend.
OpenAI-compatible endpoint
Your consumers use the same /v1/chat/completions format they already know. Any OpenAI SDK works out of the box.
BYO-JWT — bring your own auth
Already have an auth system? Validate your own JWTs against your JWKS endpoint. No migration needed.
Never go down. Automatic fallback.
Configure a chain of LLM providers. If your primary fails, the next one picks up — automatically, per status code.
Primary: Claude Sonnet
Fallback 1: GPT-4o
on 429, 503
Fallback 2: Gemini Flash
on any error
Per-status-code routing
Route 429 (rate limit) to one provider, 503 (outage) to another. Fine-grained control.
Transparent to consumers
Your API key and endpoint stay the same. Consumers never know a fallback happened.
Provider-agnostic format
Your consumers send OpenAI format. You can run Claude, Gemini, or Groq behind it.
Not another API gateway.
Traditional gateways route traffic. This one adds intelligence.
| Kong / AWS API GW | OpenRouter | Aerostack | |
|---|---|---|---|
| AI-Native Features | |||
| Built-in RAG pipeline | |||
| Content moderation stage | |||
| Pre/post processing hooks | |||
| Multi-provider fallback chains | |||
| Billing & Access | |||
| Per-consumer token wallets | |||
| Consumer API key provisioning | |||
| BYO-JWT (your own auth) | |||
| Usage-based hard limits | |||
| Platform | |||
| Edge-deployed (300+ locations) | |||
| OpenAI-compatible endpoint | |||
| Marketplace monetization | |||
| Full backend platform included | |||
Launch your AI API.
Start earning per token.
RAG. Moderation. Fallbacks. Billing. All configured — not coded.