# OpenAI-compatible API

**Source:** https://promtable.com/glossary/openai-compatible-api

> An OpenAI-compatible API is the inference endpoint that mimics OpenAI's HTTP shape (`/v1/chat/completions`, `messages` format, streaming SSE) so client code written for OpenAI works without changes — Groq, Fireworks, Together, OpenRouter, vLLM, llama.cpp all ship OpenAI-compatible endpoints.

---
An OpenAI-compatible API is the inference endpoint that mimics OpenAI's HTTP shape (`/v1/chat/completions`, `messages` format, streaming SSE) so client code written for OpenAI works without changes — Groq, Fireworks, Together, OpenRouter, vLLM, llama.cpp all ship OpenAI-compatible endpoints.

OpenAI's API shape became the de-facto standard in 2023-2024; by 2026 almost every hosted inference platform offers an OpenAI-compatible endpoint. Benefits: switching vendors is one URL + API key change; existing SDK code, libraries (Vercel AI SDK, LiteLLM, OpenRouter, Cursor, Cline) all 'just work'; new models drop into existing eval pipelines without code change. Trade-offs: vendor-specific features (Anthropic prompt caching, Google grounding, native tool formats) require non-compatible APIs to expose; compatibility shims sometimes lag the latest OpenAI API additions (parallel tool calls, structured outputs strict mode). For production stacks needing portability, prioritize OpenAI-compatible vendors — switching cost drops by orders of magnitude.

## When to use

- Any production stack needing vendor portability.

## Common mistakes

- Assuming full feature parity — some advanced features don't translate.

## Related terms

- [ai-sdk](https://promtable.com/glossary/ai-sdk)
- [llm-gateway](https://promtable.com/glossary/llm-gateway)
- [model-name-portability](https://promtable.com/glossary/model-name-portability)

*Last updated: 2026-06-01*
---

Original page: https://promtable.com/glossary/openai-compatible-api
Maintained by Promtable (https://promtable.com). Content: CC BY 4.0. Cite as "Promtable — https://promtable.com/glossary/openai-compatible-api".
Contact: info@vibecodingturkey.com.