noburn
Log inSign up
blog

OpenAI API Alternatives in 2026: Cost, Compatibility, and Switching Effort

Anthropic, Google, open-weight hosts, and routers like OpenRouter compared on price per million tokens, OpenAI-compatible endpoints, and what breaks when you switch.

by 10 min read#openai-alternatives #llm-api #api-pricing

The OpenAI API used to be the default. Every other provider was the alternative you looked at after something went wrong. That is no longer how the market works. Anthropic, Google, open-weight model hosts and routing layers each sell a different mix of price, context length, caching rules and deployment options. Most of them also accept requests shaped like OpenAI's Chat Completions format, at least in part. As a result, "switching off OpenAI" now covers several different moves: changing the model vendor, changing the cloud that serves the same model, or putting a router in front of all of them. This post compares the main options on list price per million tokens, how close each one is to a drop-in replacement, and what actually breaks during a migration. All prices were read from vendor pricing pages on 2026-11-06.

The baseline: what you pay OpenAI today

Before comparing alternatives, update your baseline. OpenAI's current lineup is gpt-6-astra (flagship, $10.00 input / $50.00 output per 1M tokens), gpt-6.1-sol (mid tier, $2.00 / $10.00) and gpt-6-luna (small, $0.10 / $0.50). All three have a 1.05M context window. Prompts over 272K input tokens are billed at a higher rate. On gpt-6-astra that is $20.00 input and $75.00 output.

If your cost model still uses gpt-4o or gpt-4o-mini, it is out of date. Both were deprecated on 2026-10-14 and shut down on January 14, 2027, and OpenAI names gpt-6-luna as the replacement. gpt-3.5-turbo, o1 and o4-mini were shut down on October 23, 2026, and o3 shuts down on December 11, 2026. Some teams "need an alternative" only because their model is being retired. For them, the cheapest path may be the replacement OpenAI already offers.

Batch and Flex both cost 50% of Standard. Priority processing was renamed Fast on July 30, 2026 and costs 2x Standard on GPT-6 models. Regional processing adds 10%.

Anthropic (Claude)

Anthropic's current tiers line up closely with OpenAI's. Claude Sonnet 5.5 costs $2 / $10, the same list price as gpt-6.1-sol. Claude Haiku 5.5 costs $0.10 / $0.50 for prompts up to 100K tokens, the same as gpt-6-luna. Claude Opus 5.5 costs $4 / $20, and Claude Fable 5.1 sits at the top at $10 / $50. Claude 4.6 and later models have no long-context surcharge, so the full 1M window is billed at standard rates. The exception is Haiku 5.5: prompts over 100K tokens are billed at $0.50 / $2.50.

Anthropic's caching math is different from OpenAI's. Cache writes cost 1.25x input for a 5-minute TTL and 2x for a 1-hour TTL. Reads cost 0.05x input on Opus 5.5 and Sonnet 5.5, and 0.025x on Fable 5.1. You can place explicit breakpoints, or set a single top-level cache_control field for automatic caching.

The biggest switching cost is the API shape. The native Messages API takes the system prompt as a top-level parameter, requires max_tokens, and returns content as typed blocks rather than a single string. Tool calls also use a different schema. Plan for an adapter layer, not a URL swap. Also check the tokenizer. Claude 4.7 and later models produce roughly 30% more tokens for the same text than Sonnet 4.6 and earlier did, so a lower per-token price can be partly cancelled by a higher token count.

Google Gemini

Google's flagship is Gemini 4 Argon at $2.00 / $10.00. The mid tier is Gemini 3.8 Flash at $0.75 / $3.75. The small models are 3.5 Flash-Lite ($0.30 / $2.50) and 3.1 Flash-Lite ($0.25 / $1.50). At today's prices, Argon matches gpt-6.1-sol and Sonnet 5.5.

Those prices are scheduled to change. Google's pricing page shows Gemini 4 Argon doubling to $4.00 / $20.00 on December 1, 2026, and 3.8 Flash and 3.6 Flash doubling to $1.50 / $7.50 on January 1, 2027. Any migration business case built on November prices will be wrong within two months. On December 1, Gemini 2.5 Pro requests will be routed to 3.8 Flash and 2.5 Flash requests to 3.5 Flash-Lite. If you pinned to 2.5, your traffic will move to a different model whether you act or not.

Caching rules depend on the model. Gemini 4 Argon supports only implicit caching, and explicit cache objects are not available on it. The minimum cacheable prompt is 4,096 tokens on Argon, 3.8 Flash, 3.6 Flash and 3.1 Pro Preview. In multi-turn conversations on Gemini 4, each new turn must add at least 2,050 tokens for the full previous request to stay cached. The cache-read price is 5% of input on Argon, derived from the $0.10 vs $2.00 listed prices.

Same model, different cloud: Azure, Bedrock, Vertex

Some teams switch the cloud, not the model. Microsoft's Azure OpenAI pricing page lists the GPT-6, 6.1 and 5.x rows, but every price cell rendered as a placeholder when we checked. Third-party aggregators show prices that match OpenAI's direct prices, but we could not verify them. Check the vendor's pricing page before you budget.

For Claude, Anthropic's own pricing page says Amazon Bedrock regional endpoints cost 10% more than global endpoints for Claude 4.5 and later models. Google-managed Vertex works the same way: multi-region and regional endpoints add 10% over global. Bedrock sets its own prices and retirement schedule, and it still serves some models that Anthropic has retired, including Sonnet 4 and Opus 4.1. That is useful if you need more time to migrate, but it means you are now running on a deprecation schedule Bedrock controls. On Anthropic's own platform, inference_geo: "us" adds a 1.1x multiplier, and OpenAI's regional processing adds 10%. Data residency costs about the same at both.

Open-weight model hosts

Inference hosts that serve open-weight model families (Llama, Qwen, DeepSeek, Mistral and others) usually expose OpenAI-compatible Chat Completions endpoints. For basic text generation, that makes them the easiest switch on this list: you change the base URL and the API key. Prices vary by host and by model, and none are in our verified reference, so check the vendor's pricing page for each one.

The risks are less obvious than the price. The same model name can be served at different quantization levels or with different context limits by different hosts. Tool-calling and JSON-mode support depend on the host's serving stack, not on the model weights. Run your evaluation set against the specific host and endpoint you plan to use, not against a benchmark of the model family.

Routers and gateways

Routers don't replace a provider. They sit in front of several providers.

OpenRouter exposes many providers behind one OpenAI-compatible API. It charges no markup on token prices ("billed at the provider's list price") but takes a platform fee on credit purchases: 5.5% on Standard and 8% on Business. With bring-your-own-key, the first $25,000 per month of list-price inference is free, and usage above that costs 5%.

Cloudflare AI Gateway offers free analytics, caching and rate limiting. Its Unified Billing charges a 5% fee on credit purchases and passes provider rates through with no markup. Gateways created on or after September 24, 2026 are billed under Workers Logs pricing.

LiteLLM is a free, open-source proxy that translates the OpenAI format to many providers. You host and run it yourself. Enterprise pricing is quote-only.

Portkey is now Palo Alto Networks' Prisma AIRS AI Gateway. Self-serve pricing still lists a free Developer tier (10k recorded logs per month) and Production at $49/mo for 100k logs.

Kong AI Gateway charges $100/mo per unique LLM, on top of a control-plane fee ($25/mo serverless, $200/mo hybrid).

A router lowers the cost of switching, but it adds a fee or a service you have to run. It also does not fix behavioral differences between models. A prompt tuned for gpt-6.1-sol will not automatically produce the same output on Sonnet 5.5 just because both go through the same endpoint.

A worked cost comparison

Example workload: 10M input tokens and 2M output tokens per month, no caching, Standard tier, prompts under every long-context threshold.

ModelMonthly cost todayAfter scheduled changes
gpt-6-astra$200$200
Claude Fable 5.1$200$200
Claude Opus 5.5$80$80
gpt-6.1-sol$40$40
Claude Sonnet 5.5$40$40
Gemini 4 Argon$40$80 (Dec 1, 2026)
Gemini 3.8 Flash$15$30 (Jan 1, 2027)
gpt-6-luna$2$2
Claude Haiku 5.5$2$2

At list price, the mid and small tiers cost the same across vendors, so the real difference comes from three places: how many tokens each tokenizer produces for your text, your cache hit rate under each vendor's rules, and how much output each model generates for the same task. Measure all three on your own traffic before you commit.

Comparison table

OptionPricing (verified 2026-11-06)Budget enforcementArchitectureSelf-hostingStatus
OpenAI directgpt-6.1-sol $2 / $10; Batch 50% off; Fast 2xOrg and project limits only, nothing per end-userNative APINoActive; gpt-4o family shuts down Jan 14, 2027
AnthropicSonnet 5.5 $2 / $10; Haiku 5.5 $0.10 / $0.50Org-level onlyNative Messages APINoActive; Sonnet 4.5 retires Nov 30, 2026
Google GeminiArgon $2 / $10, rising to $4 / $20 on Dec 1Org-level onlyNative APINoPrice increases scheduled
Azure OpenAIUnverified, check the vendor's pricing pageAzure-level quotasOpenAI models on AzureNoActive
Amazon Bedrock (Claude)Regional endpoints +10% over globalAWS-level controlsPartner-operatedNoSeparate retirement schedule
Open-weight hostsCheck the vendor's pricing pageVaries by hostOpenAI-compatible, usuallyModel weights yesVaries
OpenRouterList price + 5.5% / 8% credit feePer-key credit limitsHosted routerNoActive
Cloudflare AI GatewayCore free; 5% Unified Billing feeRate limitingHosted gatewayNoActive
LiteLLMOSS free; Enterprise quote-onlyProxy-level budgetsProxyYesActive
Portkey (Prisma AIRS)Free 10k logs; $49/mo ProductionGateway-levelHosted gateway, OSS gatewayOSS gatewayOwned by Palo Alto Networks
Kong AI Gateway$100/mo per LLM + control planeRate-limiting pluginsGatewayEnterpriseActive
noburn.devFree 10k req/mo; Starter $19/mo; Pro $49/moPre-flight, per user and per project, blocks the request before it is sentSDK-side estimation + managed budgetsManagedActive

What the category is still missing

Every option above prices tokens or moves requests between providers. None of them answers the question a multi-tenant product has to answer on every request: "Should this specific customer's call run at all, given what they have already spent?" Provider limits apply to the whole organization. When one heavy tenant hits the limit, every other tenant gets cut off along with them. Router limits apply to API keys, not to the end customers you bill. Most logging tools report spend after the tokens have already been billed.

Multi-vendor setups make this worse. Each vendor tokenizes differently, applies caching discounts and write charges differently, and adds long-context surcharges at different thresholds (272K at OpenAI, 100K on Haiku 5.5, 200K on Gemini 3.1 Pro Preview). A budget written as "dollars per customer" has to be converted into the token math of whichever model handles the next request, before that request goes out.

FAQ

What is the cheapest OpenAI API alternative right now? At list price, Claude Haiku 5.5 ($0.10 / $0.50 for prompts up to 100K tokens) costs the same as OpenAI's own gpt-6-luna. Gemini 2.5 Flash-Lite is listed at $0.10 / $0.40 but is an older model. For most teams, moving from deprecated gpt-4o-mini to gpt-6-luna cuts cost without changing vendors.

Can I switch by changing only the base URL? For open-weight hosts and routers like OpenRouter, often yes, for basic chat completions. Tool calling, structured output and streaming events are where implementations differ. For Anthropic's native API, expect to change how you pass the system prompt, set max_tokens, and parse the content blocks in the response.

Will my prompt caching savings carry over? Not directly. OpenAI charges 1.25x input for cache writes on GPT-5.6 and later, Anthropic charges 1.25x or 2x depending on TTL, and Gemini 4 Argon supports only implicit caching with a 4,096-token minimum. Recompute your effective rate using each vendor's own rules.

Should I lock in Gemini at today's prices? Budget for the scheduled prices instead. Gemini 4 Argon doubles on December 1, 2026, and 3.8 Flash doubles on January 1, 2027. If Argon's quality is what you need, compare it at $4 / $20 against Opus 5.5 at $4 / $20.

Does a router reduce my LLM bill? OpenRouter and Cloudflare AI Gateway pass through provider list prices and charge a fee on credit purchases. LiteLLM's open-source proxy has no fee, but you host and run it. Savings come from routing traffic to cheaper models, not from the router itself.

The enforcement gap noburn fills

None of the providers or routers in this article check a request against a budget before sending it. noburn estimates the token cost of each call before it fires and blocks the request if the user or project is over budget. It works with the OpenAI and Anthropic SDKs and with LiteLLM, LangChain, LangGraph and the Vercel AI SDK, so the same budgets still apply when you route traffic to a different provider. Per-user metering enforces a separate limit for each end customer, and Stripe passthrough billing charges those customers for the LLM usage they generate. The free tier covers 10,000 requests per month. Documentation and SDKs are at noburn.dev/docs.