Without a time budget
start_within: defaultstart_within: defaultForwarded exactly as you sent it
Full price, starts immediately
From the exact model you picked
We find you cheaper inference in the time window you set.
// median cost and latency across 72,781 requests (2026-08-08)
Ask anything and we will run two requests in parallel so you can see the cost savings and latency tradeoffs.
waiting for your request
waiting for your request
People ask "What's the catch?" There isn't one. You give us a time budget. We find cheaper inference. We don't mess with your request.
start_within: defaultstart_within: defaultForwarded exactly as you sent it
Full price, starts immediately
From the exact model you picked
start_within: 30sstart_within: 30sForwarded exactly as you sent it
Half price if it starts in time
Full price if flex misses the window
From the exact model you picked
When you make a request it is fulfilled using edge compute. We use Cloudflare workers which is deployed in 300+ cities. Our own routing adds 1-5 milliseconds on a cold start.
If you send a wrong parameter we don't quietly strip it to force a success. When the provider rejects a request, we send the status code and the error back to you. That way you can debug based on your intentions and not find a bug weeks after launching.
Point the base URL at us and pass your key. We work with OpenAI, Anthropic, and Gemini clients, and can route Claude through Amazon Bedrock or Gemini through Google Vertex AI on your own cloud key via an optional provider route chain. To use FlexInference you just need to add a single new field, start_within.
Every error comes back in the shape of the SDK you called, so your client parses it unchanged. It carries a machine-readable code, the exact fix, and a doc_url. Our MCP server goes further. Coding tools like Claude and Cursor can search the docs, look up any error code, and inspect your keys and usage over OAuth. So your agents fix their own mistakes, and you are not stuck babysitting them.
Upload last month's logs (we don't store them) from OpenRouter/Anthropic/OpenAI/Google and we'll report how much you could save.
Bring Your Own Key
Managed Keys
import OpenAI from "openai";
const BASE =
"https://api.flexinference.com/v1";
const client = new OpenAI({
baseURL: BASE,
apiKey: "flex_live_...",
});
const resp = await client
.chat.completions.create({
model: "gemini-2.5-flash",
messages: [{
role: "user",
content: "Summarize this thread.",
}],
start_within: "00h-00m-30s",
} as any);A deadline-aware LLM router across OpenAI, Gemini, and Anthropic. It's OpenAI-compatible, so you keep your SDK and point the base URL at us. Run it two ways: bring your own provider key, or let us hold the keys with Managed. Add a start_within deadline and we race a cheaper tier, then hand you back the model you asked for. The race runs on both now. BYOK is free at any volume, no card.
A field every request needs, either in the body or as a default on the key. Set it to default, priority, auto, or a duration like 00h-00m-30s. A duration races a cheaper tier for the model you picked, then escalates to standard if the race loses. That race runs on both BYOK and Managed, for OpenAI and Gemini. On Managed, a claude duration between 3 and 10 minutes races Claude's cheaper tier instead. Can't find cheaper in time? You still get your response, we serve it standard. Using a tool that can't add a field? Put the deadline on the key when you create it, and the body still wins whenever it sends one.
Across all our traffic, the flex race cuts blended cost by about 49%, for roughly 20% more time to first token. You also skip the upcharge other routers slap on default, auto, and priority requests. That upcharge annoyed us, so we don't add it. Your numbers depend on your models, providers, and the deadline you set.
Both route the same way. What changes is who holds the keys and how you pay. Pick BYOK if you already have provider keys. You bring the key, model usage bills to your provider, and our serving is free at any volume, with no subscription, allowance or overage. Pick Managed to skip provider signup. We serve it on our own pooled provider credentials and model cost draws from a wallet you load. The flex race runs either way for OpenAI and Gemini, and Claude's race runs on Managed only.
The supported OpenAI, Gemini, and Anthropic models, though only the flex-capable ones run the race. A model we do not carry is refused by name with model_not_carried rather than quietly substituted. Pin a route with a provider array, openai, google, or anthropic. Want the same model on your own cloud key? Vertex and Bedrock serve it BYOK, standard tier, no flex. Managed serves OpenAI, Anthropic, and Gemini direct, plus Cloudflare Workers AI for open-source models.