OpenAI API

Protocol protocols published

Also known as: OpenAI Compatible API, OpenAI API Format

Definition

The REST API specification originally created by OpenAI for accessing their language models, which has become the de facto standard for LLM APIs. Many providers (Anthropic, Google, local servers) offer OpenAI-compatible endpoints, enabling applications to switch providers with minimal code changes.

What this is NOT

  • Not a single endpoint (it's a family of APIs)
  • Not OpenAI-only (the format is widely adopted)
  • Not a formal standard (de facto, not de jure)

Alternative Interpretations

Different communities use this term differently:

llm-practitioners

The API format including /v1/chat/completions, /v1/embeddings, and related endpoints with their specific request/response schemas. "OpenAI compatible" means an API accepts the same format.

Sources: OpenAI API documentation, OpenAI API specification

Examples

  • POST /v1/chat/completions with messages array
  • vLLM serving with OpenAI-compatible endpoint
  • LiteLLM providing unified OpenAI-format access to 100+ models
  • Switching from OpenAI to Groq by changing base_url

Counterexamples

Things that might seem like OpenAI API but are not:

  • Anthropic's native Messages API (different format)
  • Google's Gemini API (different format)
  • Custom proprietary APIs

Relations

Implementations

Tools and frameworks that implement this concept: