Unified AI model API with routing, fallbacks and cost tracking
One OpenAI-compatible endpoint and key that routes requests to many LLM, image and video providers with fallbacks, budgets and usage analytics, paid for by developers and AI startups through prepaid credits plus platform plans.
Dev Toolsaiapideveloper-toolsinfrastructureusage-basedopen-core
The problem
Every AI product now calls several model providers. Each has its own SDK, rate limits, outages, price changes and model names that change monthly. Teams want to switch models with one string, fail over when a provider goes down, cap spend per customer or feature, and see cost per request.
Building that layer in-house is undifferentiated work. A Gartner survey cited by Kong found more than two-thirds of software engineering leaders already use AI gateway technology in some form. Gateways solve fragmented SDKs, weak cost controls and missing failover.
Who pays
- Indie developers and AI app startups who want one bill and access to every model. They pay through prepaid credits.
- Scale-ups that bring their own provider keys (BYOK) and pay for routing, caching, observability and governance. About $100 to $2,000 a month.
- Enterprises wanting a self-hosted or VPC gateway with SSO, audit logs and data-residency controls, on annual licences.
The pricing architecture in this tier is a hybrid:
- Credits: a margin on resold usage, typically a fee of a few percent on top-ups. One leader charges 5.5% on credit purchases (per the
openrouterentry in providers.yaml). - Platform plans: BYOK and analytics tiers.
- Enterprise: open-core licences.
Watch the revenue definition. At $25k to $100k a month of recognized revenue, a credit-heavy gateway may process $0.5 to $1.5M in throughput. If you report gross credit sales, 85 to 95% of "revenue" passes through to model providers (estimate). Platform-plan revenue carries 80%+ margins.
Proof it works
- In a sample of revenue-verified startups, median 30-day revenue is $0, the 95th percentile is about $5k and the 99th about $45k. A $50k to $100k business sits above the 99th percentile.
- In a sample of revenue-verified startups (the top 100 by MRR, Nov 2026), 23 fall in the $50k to $100k band. Their median is about $60k, and the median reported month-over-month growth is about 3.5% (only 16 report growth, so treat it as a small sample). Businesses of this type appear in that band.
- In a sample of revenue-verified startups, the AI category counts about 4,850 businesses and Developer Tools about 1,800.
Competitors and moat
- Credit-reselling routers (OpenRouter and similar).
- Enterprise API-gateway vendors adding AI features (Kong, Cloudflare AI Gateway, cloud providers' own gateways).
- Open-source proxies (LiteLLM-style) and observability tools (Helicone, Langfuse) that overlap.
Small players win on:
- Open source for trust and self-hosting.
- Price and latency: sub-10 ms overhead and edge routing.
- Breadth across modalities: image, video, audio and text from one balance.
- Developer experience: one-line migration from the OpenAI SDK, per-customer budgets and keys for your own SaaS users.
The moat is routing intelligence, meaning live latency, uptime and price data per provider, plus enterprise features (SSO, policies, regional data boundaries).
Market and regions
The Business Research Company sizes large-language-model gateways at about $2.18B in 2025, growing about 27% a year to $7.21B by 2030. That is directional, since definitions vary.
Buyers are global. The US and Western Europe lead on spend. India, Brazil, Southeast Asia and MENA developers like gateways because one card or crypto top-up reaches providers that are hard to pay directly from their country. The openrouter entry in providers.yaml notes "one card/crypto top-up reaches many providers". That is a real wedge for emerging-market developers.
Getting customers
- Open-source distribution. GitHub stars, Docker images and a one-command self-host. Hacker News and Reddit launches. This is the main engine.
- Model-launch SEO. Be first with "
API pricing" and " via OpenAI SDK" pages every time a model drops. - Integrations with agent frameworks, IDE coding agents and no-code automation tools, which drive steady signups.
- Free credits for students and hackathons, plus partnerships with AI-builder communities.
- Enterprise inbound from open-source users, converted by a founder.
Self-serve CAC is near $0 to $50 (estimate). Enterprise deals cost more and close in 1 to 3 months. First $1k MRR within 1 to 3 months is common, because credits sell from day one. Getting to $50k+ needs either large throughput or enterprise contracts.
What it takes to build
Team at $25k to $100k a month: 3 to 5 people. Two or three backend and infra engineers, one developer-relations person and a founder selling enterprise. Reliability engineering (global latency, streaming, retries) is the core.
| Layer | Provider id | MVP cost/month |
|---|---|---|
| Edge proxy (streaming) | cloudflare-workers (10M requests incl.) |
$5 |
| Control plane + dashboard | fly-io (multi-region machines) |
~$10 |
| Usage DB | neon Postgres + cloudflare-d1 for edge config |
~$10 |
| Logs/analytics | axiom (free Personal, 500 GB) → $25 |
$0 |
| Upstream models | anthropic, openai, google-gemini, mistral, groq, together-ai, fal, replicate (pass-through) |
prepaid |
| Auth | clerk (Pro $25 later) |
$0 |
resend |
$0 | |
| Payments (credit top-ups) | stripe (+1.5% intl cards) or polar |
% only |
| Analytics | posthog (1M events free) |
$0 |
| Errors | sentry |
$0 |
| Support | plain ($55/user) or Discord |
$0 to 55 |
Entry cost: about $25 to $80/month, plus working capital for prepaid provider balances.
At $25k to $100k/month: Infrastructure is still small (about $500 to $2,500 a month across edge, logs and Postgres). The real costs are elsewhere:
- Card fees on top-ups: 2.9% + 30c plus 1.5% for international cards eats most of a 5% margin. Push larger top-ups and crypto or bank options.
- Fraud: stolen cards used to buy credits. Use velocity limits and 3DS.
- Prepaid float with upstream providers.
- Logging at billions of tokens. Sample, and use
axiomat about $0.12/GB beyond 1 TB.
Region caveat: Stripe does not onboard sellers based in Algeria, Egypt or Morocco. creem and polar can sell credits, but merchants of record may restrict pure credit resale, so check their acceptable-use terms. paddle excludes DZ, EG and MA, and lemon-squeezy is closing. Upstream providers like anthropic and openai support DZ, EG and MA accounts. Note that polar pays out to Algeria and Egypt but not Morocco, so Moroccan founders should start with creem.
30-day MVP plan
- Days 1 to 7: OpenAI-compatible
/chat/completionsproxy with streaming for three providers. API keys and a token-cost table per model. - Days 8 to 14: Fallback and retry policies, per-key budgets, and a usage dashboard with cost per request.
- Days 15 to 21: Credit top-ups with Stripe or Polar, fraud limits, and BYOK mode. Open-source the proxy core.
- Days 22 to 30: Add 20 more models, including image and video. Launch on Hacker News and GitHub, publish model-launch pages and ship an integration for one popular agent framework.
Risks
- Thin margins on credits, made worse by card fees and fraud.
- Provider dependency. Upstream providers can change terms, ban resellers or launch their own routing.
- Commoditization. Clouds and CDNs bundle AI gateways for free.
- Reliability expectations. You become a single point of failure for customers' products, so outages churn customers fast.
- Compliance. Data retention, prompt logging and regional data rules for enterprise buyers.