LLM gateway
An LLM gateway with the data layer attached
Three base URLs, one key, one balance. Chat, image, video and decision models on the SDK you already use; search, documents and slides on the same credits — from a tenth of the provider's official price.
10%
Starting rate, against the provider's official API price
5,000+
APIs in the same catalog
A gateway is usually one surface. This one is three.
They share your account, your key and your credits, but they answer different questions and live at different base URLs. Knowing which one you are calling is the whole trick.
| Surface | Base URL | Use it for |
|---|---|---|
| Model API | openapi.felo.ai/api/v1 · openapi.felo.ai/api | Calling a language, image, video or decision model directly |
| Data API | openapi.felo.ai/v1/beta | Calling a named third-party data or search provider |
| Felo APIs | openapi.felo.ai/v2 | Felo's own search, office, extraction and knowledge workflows |
One key covers all three. A top-up buys USD service credits that pay for a model call, a Data API call and a Felo workflow alike — no separate account per supplier.
Read the docsSix endpoints, not one
Everything under /api/v1 is a model call, but the model kind decides which endpoint can answer — and each endpoint returns its own format.
| Endpoint | Speaks | Returns |
|---|---|---|
POST /api/v1/chat/completions | OpenAI Chat Completions | Streaming or one response |
POST /api/v1/responses | OpenAI Responses | Streaming or one response |
POST /api/v1/messages | Anthropic Messages | Streaming or one response |
POST /api/v1/images/generations | OpenAI image envelope | A task_id to poll |
POST /api/v1/videos/generations | OpenAI video envelope | A task_id to poll |
POST /api/v1/decisions | Felo decision schema | Typed answers, no streaming |
The three chat surfaces are native implementations, not a translation layer: each streams events in its own protocol, so you parse the stream exactly as you do today.
Pick the endpoint by model kind, not by guesswork
Every model in the catalog carries a model_kind, and the kind decides which endpoint can call it. Discovery costs nothing and reads the local catalog.
# discover before you call — free, reads the catalog
GET /api/v1/models # every kind, with channels and rates
GET /api/v1/models/{model_id} # one model, in detail
GET /api/v1/videos/models # video_generation only
GET /api/v1/decisions/models # decisions only| model_kind | Endpoint |
|---|---|
chat | Responses, Chat Completions or Messages, as the model supports |
image_generation | POST /api/v1/images/generations |
video_generation | POST /api/v1/videos/generations |
decisions | POST /api/v1/decisions |
Filter with ?provider= to see one supplier's list, or ?exclude_video_and_decisions=true to hide everything but chat and image. A listing is not a promise: a video model will not answer a chat request, and the API answers model_kind_mismatch when you try.
Default route, or one header to pick the provider
A model can be served by several upstream channels, each with its own supplier and its own published rate. Leave the header off and the platform picks one for you; send X-Felo-Channel and you choose.
# first channel only — no automatic fallback
X-Felo-Channel: claude-cc
X-Felo-Channel: claude-cc,anthropic # ordered selection, not a retry list- The value is an ordered list of public channel codes taken from the model's
channels[].code, validated in the order you write them. - Only the first channel's provider group is submitted, and that channel's rate is what you pay.
- There is no automatic fallback. A channel list is a selection, not a retry policy — if a provider fails, resend from your application with another channel.
X-Felo-Channel works on all six generation endpoints above. It does not apply to the Data API or the Felo APIs: those go to the supplier you name in the request.
What a call actually costs
Model calls bill per token — input, output and cache — with the channel's discount multiplier applied. Rates are published per 1M tokens for readability, but billing uses the per-token precision in the current price snapshot, so a short request is never rounded up to a million.
- Cache rates apply only when the protocol response reports cache usage; a model without cache reporting bills everything at its input rate.
- Web search that a model service performs and reports costs $0.01 per search.
- Some models tier by prompt size: Claude Haiku 5.5 bills $0.10 in and $0.50 out per 1M tokens up to a 100K-token prompt, then $0.50 and $2.50 for the whole request above that.
- The first top-up is $1. There is no subscription, no seat fee and no minimum commitment — an idle key costs nothing.
Data API calls and Felo workflows bill from the same balance, each on its own published basis: per successful request, per returned item, or by actual usage.
See rates and creditsTwo limits that look alike and are not
Running out of credits returns 402 INSUFFICIENT_CREDITS. Calling too fast returns 429 RATE_LIMITED. Waiting clears the second and never clears the first.
| Status | Code | Do this |
|---|---|---|
| 401 | UNAUTHORIZED | Fix or rotate the key |
| 402 | INSUFFICIENT_CREDITS | Top up in Console Billing, then resend |
| 404 | endpoint-specific | Check the model, task or route ID |
| 429 | RATE_LIMITED | Wait for Retry-After, then retry |
| 5xx | CHAT_FAILED, SERVICE_UNAVAILABLE | Retry with exponential backoff and jitter |
Only /v2/chat documents enforced rate limits today. Model calls can still be limited upstream, which surfaces as a 429 — read X-RateLimit-* and Retry-After instead of hardcoding numbers. Every response carries a request_id, and an X-Request-Id header you send is echoed back, so your logs and ours line up.
Image and video finish in the background
Both generation endpoints return a task_id instead of a result. Submit, poll, retrieve — and note that once a task exists, most failures arrive as a 200 with a terminal status rather than as an HTTP error.
# submit, then poll the task
POST /api/v1/images/generations → task_id
GET /api/v1/images/generations/{id} → status, result
POST /api/v1/videos/generations → task_id
GET /api/v1/videos/generations/{id} → status, resultRead the status before you read the output: failed and interrupted are answers too, and error.message says why. A 402 at submit time means the task was never created. SuperAgent works differently — it hands back a stream_key and pushes events over SSE, so there is nothing to poll.
Change the base URL, keep the client
Both SDKs work unchanged once the base URL points here. npx feloapi-cli setup writes the same configuration for Claude Code and Codex.
# OpenAI SDK
base_url = "https://openapi.felo.ai/api/v1"
# Anthropic SDK — one level up; the SDK appends /v1/messages
base_url = "https://openapi.felo.ai/api"
# pin a provider (optional)
default_headers = {"X-Felo-Channel": "claude-cc"}Model IDs are not identical across providers. Pick from the catalog before you flip the base URL, or your first call answers 404.
The half a gateway usually leaves to you
An LLM gateway routes model calls. Here the same key also reaches a catalog of 5,000+ APIs — so the search step in your agent, the deck it generates and the document it reads back are billed to the same credits, not to three more vendors.
- Search
- PPT Task
- SuperAgent
- Web Fetch
- X Search
- Mindmap
- Landing Page Task
- LiveDoc
- YouTube Subtitling
Data API calls go to named providers under /v1/beta — Tavily, Exa, Apollo and the rest of the catalog — each at its own published basis.
Where the gateway stops
- No automatic failover between channels — that is your retry logic, deliberately.
- A catalog listing is not a compatibility guarantee; each model kind has one calling surface.
- No documented platform rate limit on model calls, but the upstream provider's limit still applies.
- Credits are prepaid and non-refundable and cannot be withdrawn — top up the amount you intend to spend.
LLM gateway questions, answered
What is an LLM gateway?
One endpoint in front of many model providers, so your code talks to one base URL, one key and one balance instead of a dozen vendor SDKs. An AI gateway does the same job; this one also sells the data APIs an agent needs.
Can I keep my OpenAI or Anthropic SDK?
Yes. Chat Completions and Responses are OpenAI-shaped and Messages is native. The base URLs are https://openapi.felo.ai/api/v1 and https://openapi.felo.ai/api — one level up, because that SDK appends /v1/messages itself.
How do I know which model to call?
GET /api/v1/models lists every kind with its channels and rates; video and decision models have their own lists. Read model_kind, call the matching endpoint, and remember that a listing is not a promise that every endpoint accepts that model.
Does it fail over when a provider is down?
No, and that is deliberate. A channel list is a selection, not a retry policy: only the first channel is submitted. Failover belongs in your application, where it can see the error, the budget and the fallback you actually want.
How much does it cost?
Each model carries a Felo rate that starts at a tenth of the provider's official price, and the channel you pin sets the rate you pay. Prepaid, charged per call, first top-up $1, no subscription.
Can I call images, video and data APIs too?
Yes. One key reaches chat, image, video and decision models and the 5,000+ API catalog behind /v1/beta — all billed to the same credits.
Try it on one call
Create a key, top up from $1, and point the SDK you already use at one base URL.