OpenAI-compatible APIs became the connective tissue of the AI stack in 2026 — and Kimi K3's July 17 launch made the pattern unmissable. Moonshot's new flagship shipped OpenAI-SDK compatible on day one: pip install openai, point base_url at Moonshot's endpoint, set the model string to kimi-k3, done. No proprietary client library, no new wire format — the fifth major model line this year to launch speaking OpenAI's dialect from its first minute in public.
That convergence is genuinely good news for anyone building AI products: switching or hedging across vendors is now closer to a config change than a rewrite. But "compatible" is doing quiet, unglamorous work in that sentence. It reliably covers chat completions, tool calls, and streaming. It leaks — every time — on the newer surface area the original 2023-era spec never defined: reasoning deltas, thinking-effort parameters, sampling contracts, and structured-output dialects.
This guide maps where the compatibility actually holds and where it breaks, across five named vendors, at the parameter level. We cover the base-URL swap pattern with the stock OpenAI SDK, the newer dual-spec trend (vendors shipping OpenAI and Anthropic wire formats simultaneously), the Vercel AI SDK's compatible-provider layer, the Open Responses standardization effort, and a practical playbook for designing provider-agnostic apps around the gaps.
- 01The OpenAI API shape is now a de facto standard.Kimi K3 (July 17) is the fifth major model line in 2026 to ship OpenAI-SDK compatible on day one, joining DeepSeek, Z.ai's GLM, Alibaba's Qwen, and MiniMax. It's a trend, not a formal standard — no governing body exists.
- 02A base-URL swap covers chat, tools, and streaming.The stock OpenAI SDK pointed at a compatible endpoint handles the core loop unchanged. DeepSeek's docs go further, claiming compatibility with both the OpenAI and Anthropic SDKs against one API.
- 03Compatibility leaks at the parameter level.K3 pins five sampling parameters (temp 1.0, top_p 0.95) and accepts only reasoning_effort “max” at launch; DashScope can't combine tools with streaming; GLM hides 1M context behind a model-name suffix. Each vendor picks its own subset.
- 04Dual-spec is the newer wave worth naming.GLM, Qwen/DashScope, and reportedly MiniMax now ship an Anthropic-Messages-compatible surface alongside the OpenAI one — so teams standardized on either SDK can hedge across most of the open-weight field without touching client code.
- 05Abstraction layers help but don't absolve you.The AI SDK's createOpenAICompatible() needs an explicit supportsStructuredOutputs: true or structured calls silently degrade; Vercel's AI Gateway adds retries and fallbacks with no token markup. You still have to know each provider.
01 — The De Facto StandardThe fifth line ships OpenAI-shaped on day one.
Moonshot announced K3 with a one-line launch post: "Kimi K3 is now live on Kimi.com, Kimi Work, Kimi Code, and the Kimi API. Open Weights by July 27, 2026." The API half of that sentence is the part that matters here. K3's official quickstart doesn't document a proprietary client — it documents the OpenAI Python SDK with a swapped base URL. That is the entire integration story, and it was true at minute zero of the launch. (Our full K3 launch breakdown covers the model itself — architecture, vendor benchmarks, pricing, and the July 27 open-weights promise.)
Zoom out and the pattern is unmistakable. DeepSeek's docs describe an OpenAI/Anthropic-compatible format as the API's native shape. Z.ai's GLM line exposes an OpenAI-compatible path as its direct API. Alibaba's DashScope serves Qwen through a dedicated compatible-mode endpoint. MiniMax follows the same playbook. Five major model lines, five independent decisions that the fastest route to developers is somebody else's API spec — the strongest kind of evidence that the OpenAI Chat Completions shape has become a de facto standard, even though no standards body ever blessed it.
Major OpenAI-shaped launches in 2026
Kimi K3, DeepSeek V4, GLM-5.2, Qwen3.7 via DashScope, and MiniMax M2.7 all expose OpenAI-compatible endpoints — K3 the newest, live July 17 with compatibility documented in its day-one quickstart.
K3's quickstart is the OpenAI SDK
pip install openai, base_url pointed at api.moonshot.ai/v1, model string kimi-k3. No proprietary client library exists in the launch documentation at all.
DeepSeek retires legacy model IDs
deepseek-chat and deepseek-reasoner sunset on July 24, 2026 (15:59 UTC), replaced by the V4 line — a reminder that even stable-looking compatible endpoints change under you on vendor schedules.
Why did this convergence happen? Because the switching cost is the product. A vendor launching a frontier-class model in mid-2026 is selling into codebases that already speak Chat Completions — every agent framework, every eval harness, every internal tool. Shipping OpenAI-shaped means the eval starts today instead of after an SDK migration. For buyers, the same logic runs in reverse: every additional compatible vendor makes your existing client code more valuable and your incumbent provider less leveraged. Compatibility is a pricing strategy wearing an engineering costume.
02 — The Core PatternWhat "compatible" reliably buys you.
The canonical pattern is a two-line change: swap the API key and the base URL, keep everything else. Against K3, per Moonshot's own quickstart, that looks like this:
# The base-URL swap — stock OpenAI SDK, Kimi K3 backend
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["MOONSHOT_API_KEY"],
base_url="https://api.moonshot.ai/v1",
)
response = client.chat.completions.create(
model="kimi-k3",
messages=[
{"role": "user", "content": "Summarize this contract."},
],
# Note what's ABSENT: no temperature, no top_p.
# K3 pins them (1.0 / 0.95) and asks callers to
# omit sampling params rather than override them.
)Within this pattern, three things work reliably across every provider in this post: standard chat completions (messages in, choices out), function/tool calling in the OpenAI tools array shape, and server-sent-event streaming. That is the durable core of the de facto standard — the 2023-era surface that every implementer copied faithfully because it was the whole spec at the time.
api.deepseek.com, so teams standardized on either the OpenAI or the Anthropic SDK can point their existing client at it with no code rewrite. That dual claim is broader than most competitors make — and it previews the dual-spec pattern in Section 05.The catch is everything that happened to LLM APIs after 2023. Reasoning traces, thinking budgets, structured outputs, prompt caching, context-window flags — none of it existed when the Chat Completions shape froze into a convention. Every vendor bolted those features on independently, which is exactly where compatibility stops being a guarantee and starts being a per-provider audit. If you're wiring K3 into a real coding workflow, our hands-on Kimi Code setup guide walks the practical side of that audit.
03 — The LeaksWhere "compatible" leaks: K3 as the flagship example.
K3 is the cleanest case study precisely because its compatibility story is otherwise so good. The endpoint speaks fluent Chat Completions — and then, at the parameter level, it quietly rewrites four contracts that OpenAI-SDK code tends to assume. All four are documented in Moonshot's own quickstart; none of them throw an obvious error if you get them wrong.
Five pinned parameters
K3 fixes temperature, top_p, n, presence_penalty, and frequency_penalty — and asks callers to omit them rather than override. Code that sweeps temperature for determinism or diversity is silently doing nothing.
reasoning_effort: max only
Thinking is always on, and there is no OpenAI-shaped parameter that disables it. Moonshot says lower effort levels are coming later — at launch, you get maximum reasoning whether your latency budget likes it or not.
Two delta channels
K3 streams reasoning and answer as separate delta fields — the shape reasoning models converged on, but one the original 2023 Chat Completions spec never defined. Naive stream handlers drop or mangle the reasoning channel.
A stricter tool contract
Forcing tool use requires the required value, and multi-turn tool conversations must resend the complete prior assistant message — not just the tool result. Vanilla OpenAI-targeting agent loops break subtly here.
The pattern to internalize: these are not bugs, and they are not hostile. They are rational vendor decisions — pinned sampling because Moonshot tuned K3 for those values, always-on reasoning because that's the product's identity — expressed through a wire format that has no vocabulary for "this parameter exists but is fixed." The OpenAI shape can carry the request; it cannot carry the contract. That gap between syntax and semantics is where every "compatible" integration eventually needs provider-specific knowledge.
04 — Reality CheckFive providers, one table — the parameter-level audit.
Most coverage treats "OpenAI-compatible" as a per-vendor yes/no. The table below is the version that actually matters when you're building a provider-agnostic client: five vendors side by side at the parameter level, each cell sourced from the vendor primary named in its Source column. To our knowledge, nobody has published this matrix as a single view before.
| Provider | OpenAI-compatible surface | Anthropic-compatible surface | Documented parameter-level leaks | Source |
|---|---|---|---|---|
| OpenAI wire format only (at launch) | ||||
| Kimi K3 (Moonshot AI) | api.moonshot.ai/v1 — stock OpenAI SDK, model kimi-k3 | Not offered at launch | Five sampling params pinned (temp 1.0, top_p 0.95, n=1, penalties 0) — omit, don't override. reasoning_effort accepts only "max". Streaming splits reasoning_content from content. Multi-turn tool calls must resend the full prior assistant message. | platform.kimi.ai quickstart |
| Dual-spec — OpenAI and Anthropic wire formats | ||||
| DeepSeek V4 | api.deepseek.com | Yes — vendor docs state the API format is compatible with both the OpenAI and Anthropic SDKs | Reasoning uses a thinking object plus a separate reasoning_effort field — a different shape from both OpenAI and K3. Legacy deepseek-chat / deepseek-reasoner IDs retire July 24, 2026. | api-docs.deepseek.com |
| GLM-5.2 (Z.ai) | api.z.ai/api/paas/v4/ | Yes — api.z.ai/api/anthropic via Claude Code env vars | The 1M-token context window is unlocked by a non-standard glm-5.2[1m] model-name suffix — a vendor flag string-encoded into the model ID. | docs.z.ai |
| Qwen3.7 (Alibaba DashScope) | Region-specific hosts ending /compatible-mode/v1 | Yes — dashscope.aliyuncs.com/compatible-mode/anthropic/v1 for Qwen3.7-Max | tools cannot combine with stream=True; n is pinned to 1 whenever tools is passed; presence_penalty works only on commercial Qwen models and open models from Qwen 1.5 onward. | alibabacloud.com Model Studio docs |
| MiniMax M2.7 | OpenAI-compatible endpoint offered — verify the current base URL against MiniMax's platform docs before shipping code | Reportedly yes — an Anthropic-compatible surface following the same dual-spec pattern (secondary-sourced) | The dual-endpoint claim is cross-checked via aggregators, not a direct vendor fetch, as of July 17, 2026 — treat exact URL strings as unconfirmed until verified. | Secondary cross-check — verify on MiniMax platform docs |
Read down the leaks column and a taxonomy emerges. Some leaks are parameter pinning (K3's sampling), some are shape divergence (DeepSeek's thinking object versus K3's max-only string versus OpenAI's own effort param), some are feature interlocks (DashScope's tools-versus-streaming exclusion), and some are string-encoded flags (GLM's [1m] suffix). None of these is visible in the wire format. All of them will find you in production if your abstraction assumed the OpenAI docs were the contract.
05 — The Newer WaveThe dual-spec pattern: one vendor, two wire formats.
The under-covered trend inside the trend: vendors no longer pick a side. Z.ai ships an OpenAI-compatible direct API and an Anthropic-Messages-compatible surface for Claude Code simultaneously. Alibaba's DashScope mirrors it — an OpenAI-compatible mode plus a dedicated Anthropic-compatible endpoint for Qwen3.7-Max. DeepSeek claims both formats against one base URL. MiniMax reportedly follows the same pattern (we treat its exact URLs as unverified — see the table above). The GLM version of the Anthropic side is literally two environment variables:
# Point Claude Code at Z.ai's Anthropic-compatible surface
export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
export ANTHROPIC_AUTH_TOKEN="<your-z-ai-key>"
# The leak, even here: GLM's 1M-token context window is
# unlocked by a bracket suffix bolted onto the model string:
# glm-5.2[1m]
# — a vendor flag the Anthropic wire format has no field for.Why it matters strategically: dual-spec vendors are betting that the market has standardized on exactly two client stacks — the OpenAI SDK and the Anthropic SDK (increasingly via agent tooling like Claude Code) — and that meeting both erases the last integration excuse. For buyers, it means a team standardized on either wire format can now hedge across nearly the whole open-weight field without touching client code. That is a materially stronger negotiating position than 2025, when second-sourcing usually meant maintaining two clients.
06 — The Subtlest LeakStructured outputs: everyone speaks a dialect.
Structured outputs deserve their own section because the leak here starts at the source. OpenAI's canonical implementation requires "strict": true plus "additionalProperties": false on every schema object to guarantee schema-conformant JSON — and OpenAI's own docs concede the limits: "While Structured Outputs supports much of JSON Schema, some features are unavailable either for performance or technical reasons."
Sit with that for a second: even the reference implementation is a JSON Schema subset. Every "OpenAI-compatible" provider then picks its own subset of the subset, documents it in its own terms, and exposes it through the same-looking response_format field. Two providers can both truthfully claim structured-output support and disagree about which of your schemas will validate. This is the single most common place we see provider-agnostic apps fail silently: the request succeeds, the JSON parses, and a field your schema required simply is not enforced.
createOpenAICompatible() factory — the blessed way to plug any compatible endpoint into the SDK — does not auto-detect structured-output support. Callers must explicitly pass supportsStructuredOutputs: true at provider-creation time, or structured-output calls silently fall through to unstructured behavior. The flag is the SDK telling you, in API form, that provider capability knowledge is your job.07 — The ToolingThe provider layer: AI SDK and Gateway patterns.
Two pieces of Vercel tooling formalize the base-URL-swap pattern into something maintainable. First, the AI SDK organizes providers as separate npm packages behind a shared language-model specification — switching models becomes a config change — and ships a dedicated @ai-sdk/openai-compatible package for everything without a first-party package. That factory covers LM Studio and NVIDIA NIM in the docs, and by extension the whole compatible field this post covers:
// AI SDK: any OpenAI-compatible endpoint as a provider
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText } from "ai";
const kimi = createOpenAICompatible({
name: "kimi",
apiKey: process.env.MOONSHOT_API_KEY,
baseURL: "https://api.moonshot.ai/v1",
// Opt in explicitly — the SDK never auto-detects this:
supportsStructuredOutputs: true,
});
const { text } = await generateText({
model: kimi("kimi-k3"),
prompt: "Draft the migration checklist.",
});Second, Vercel's AI Gateway inverts the pattern: instead of your client visiting each provider's compatible endpoint, one OpenAI-compatible endpoint fronts all of them. Point an unmodified openai client at the Gateway and address any of its 40+ connected providers with prefixed model strings:
// One compatible endpoint, every provider behind it
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.AI_GATEWAY_API_KEY,
baseURL: "https://ai-gateway.vercel.sh/v1",
});
const completion = await client.chat.completions.create({
model: "anthropic/claude-opus-4.8", // or "openai/gpt-5.5"
messages: [{ role: "user", content: "..." }],
});The Gateway charges no markup on tokens — including under bring-your-own-key — and supports automatic retries and model fallbacks to a different provider when the primary fails, which turns it into a resilience layer rather than a routing convenience. It also exposes a separate Anthropic-Messages- compatible surface alongside the Chat Completions one, so the dual-spec hedge from Section 05 works at the gateway tier too. We covered the Gateway's routing model from the creative-model angle in our Seedream 5 Pro routing post, and the AI SDK's provider layer shows up again in our MCP tool-drift security guide.
08 — StandardizationOpen Responses: the spec the ecosystem asked for.
The ad-hoc nature of all this is exactly what a community specification launched on January 15, 2026 set out to fix. "Open Responses" is a vendor-neutral spec derived from OpenAI's newer Responses API — chosen over Chat Completions specifically because Responses was designed with the features of more recent models, such as reasoning traces, baked into the design. The launch partners are the plumbing of the ecosystem: OpenRouter, Hugging Face, LM Studio, vLLM, Ollama, and Vercel.
"This is the standardization effort I've most wanted in the world of LLMs"— Simon Willison, independent LLM researcher, simonwillison.net, January 15, 2026
Willison's fuller framing names the disease this post has been cataloguing symptom by symptom: "There are dozens of slightly incompatible implementations of that not-quite-specification floating around already, it would be great to have a written spec accompanied by a compliance test suite." That is the Chat Completions ecosystem in one sentence — a not-quite-specification with no compliance suite, which is why the reality-check table in Section 04 has to exist at all.
Our forward read: Open Responses is the right idea arriving after the market already standardized on the wrong-but-good-enough shape. Voluntary specs win when the biggest implementers adopt them, and the launch-partner list is infrastructure players, not the model vendors themselves — as of mid-July, the five providers in our table still document Chat Completions compatibility as their primary surface. The likely path is coexistence: Chat Completions as the lingua franca for basic calls, Open Responses growing where reasoning traces and richer semantics matter. Plan for the messy middle, not for the clean convergence.
09 — The PlaybookDesign for the gaps: a provider-agnostic playbook.
Everything above reduces to four working rules. They assume the thing this post has demonstrated: the wire format is shared, the contract is not.
Treat sampling params as advisory
K3 pins five of them and asks you to omit rather than override. Centralize sampling in per-provider config, default to omission, and never let application code assume temperature does anything on a given backend.
Keep a capability manifest per provider
Structured-output support, reasoning param shape, tool-contract strictness, streaming delta channels — one declarative record per backend, mirroring the AI SDK's supportsStructuredOutputs flag. Your router reads the manifest; your features degrade explicitly, never silently.
Put a gateway where you need resilience
One compatible endpoint fronting 40+ providers, automatic retries and cross-provider fallbacks, no token markup even with BYOK. For production traffic that must survive a provider outage, the gateway tier is cheaper than building failover yourself.
Verify against vendor primaries, not press
Mid-July press reported time-of-day surcharge pricing for DeepSeek V4; DeepSeek's own pricing docs as of July 17 show no such mechanism. Compatibility surfaces and prices move weekly — the vendor doc is the only citable state.
The economic payoff of doing this well is real. List input pricing across the compatible field spans roughly 21x — from DeepSeek V4-Flash at $0.14 per million tokens to K3 at $3.00 — with cache-hit discounts that reshape the math again (K3 drops 90% to $0.30 on cache hits; V4-Flash falls to $0.0028). When switching is a config change, that spread is negotiating leverage you can actually use.
List input price per 1M tokens · OpenAI-compatible providers
Source: vendor pricing pages (platform.kimi.ai, api-docs.deepseek.com, docs.z.ai, fact-pack verified), retrieved July 17, 2026This is the engineering half of the argument we made in our second-source vendor-resilience playbook: hedging only works if the switching cost stays near zero, and compatible endpoints are what hold it there. The same logic runs through coding-agent cost comparisons across models — the models you can cheaply evaluate are the models that discipline your incumbent's pricing. If you want help designing this into your stack — capability manifests, gateway routing, provider evals on your own workloads — that's the core of our AI transformation engagements.
10 — ConclusionA standard nobody wrote, leaks everybody ships.
The wire format converged. The contract didn't.
Kimi K3 launching OpenAI-SDK compatible on day one is the clearest signal yet that the OpenAI API shape has won as a de facto standard — five major model lines now ship it, several alongside an Anthropic-compatible twin. For builders, that's the good news: chat, tools, and streaming genuinely are a base-URL swap away on every provider that matters.
The discipline is remembering what the swap doesn't carry. Pinned sampling, max-only reasoning effort, split delta channels, structured-output dialects, string-encoded context flags — every provider leaks somewhere, always in the surface area invented after 2023, and never loudly. The teams that win here don't chase a perfect abstraction; they keep a capability manifest per provider, route through a resilience layer where uptime matters, and verify against vendor primaries instead of press cycles.
Open Responses may eventually give the ecosystem the written spec and compliance suite it deserves. Until adoption reaches the model vendors themselves, treat "OpenAI-compatible" the way senior engineers treat any vendor claim: true enough to build on, never true enough to skip the audit.