A router that drops cost by 49%

We find you cheaper inference in the time window you set.

49%costs
$3.13
without FlexInference
$1.61
with FlexInference
$ / 1M tokens
+20%latency
305 ms
without FlexInference
366 ms
with FlexInference
Time to first token (ms)

// median cost and latency across 72,781 requests (2026-08-08)

Some of the ways you can drop your costs by half

  • OpenScience
    +9.3% Latency-50.0% Cost
  • OpenCode
    -37.5% Latency-50.0% Cost
  • OpenWork
    +6.9% Latency-48.5% Cost

Try it yourself

Ask anything and we will run two requests in parallel so you can see the cost savings and latency tradeoffs.

your request
0/100

flex race

waiting for your request

default request

waiting for your request

We never swap your model and still get you savings.

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.

Without a time budget

start_within: default
Standard cost$1.00

With a time budget (flex race)

start_within: 30s
Flex-discounted cost$0.50

Built so you aren't debugging at 2am

  • 3 ms routing across 300 cities.

    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.

  • We fail fast and loud.

    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.

  • Your existing client works unchanged.

    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.

  • Errors your agent can fix itself.

    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.

Find out how much you could save

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 keys, or let us run them for you.

Bring Your Own Key

Free
  • Free support for Anthropic, OpenAI, Google AI Studio, Bedrock, Vertex, Foundry, and Cloudflare Workers AI
  • Free flex race to save 49% for 20% more time to first token
  • Free logs, analytics, and cost tracking
  • Unlimited requests every month
  • No subscription and no overage, ever
  • No per-request charges of any kind
  • No credit card required
  • Your provider keys are AES-256-GCM encrypted at rest, decrypted only in memory to forward your request
  • We never store or log your prompts or model outputs

Managed Keys

10%
  • Everything in Bring Your Own Key
  • Higher API rate limits instantly
  • Flex race for Anthropic models
  • Optional PII masking to be compliant instantly
  • Model costs passed through, no markups
  • Optional trace storage
  • Spend and balance alarms
  • Full support with per provider BYOK
  • Remaining cash refunds to your card

Another three ways to drop your costs

  • Gemini Image Classification
    +20.2% Latency-38.9% Cost
  • OpenAI Deep Research
    -30.1% Latency-44.8% Cost
  • OpenAI Browser Agent
    +9.7% Latency-51.5% Cost

No new SDK semantics to learn.

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);

Frequently Asked Questions

  • 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.