/v1/chat/completions is the de facto standard interface of the LLM industry — virtually every framework, client, and SDK supports it out of the box. Through APIYI, this single endpoint reaches OpenAI, Claude, Gemini, DeepSeek, and 400+ models in total; switching models is just swapping a string.
Which endpoint to pick: using existing frameworks/clients, or want one codebase across multiple vendors → compatible mode (this page); need built-in tools (web search, code interpreter) or Pro-series models → Native Calls (/v1/responses). OpenAI’s official stance on Chat Completions: supported long-term, but Responses is recommended for new projects. Both endpoints require you to maintain conversation history yourself — see the Multi-Turn Conversation Guide.
Quick Start
One Interface, Every Provider
This is the biggest payoff of compatible mode: switching models means changing a string — not a line of code.SDK Setup per Language
Every official SDK supports a custom base_url — configure once and go.Python
Node.js / TypeScript
.NET
Go
Use the official OpenAI Go SDK (github.com/openai/openai-go):
Java
Use the official OpenAI Java SDK (com.openai:openai-java):
Legacy projects on third-party libraries (Go’s
sashabaranov/go-openai, Java’s theokanning packages) still work after changing the base_url, but we recommend migrating to the official SDKs above — third-party libraries lag on new parameters such as reasoning_effort.Common Features
Streaming
Reasoning control
On Chat Completions, use the top-levelreasoning_effort parameter (different from the nested form on Responses):
Image input
Embeddings
Error Handling and Retries
The official SDKs retry automatically (2 attempts by default, on 429 / 5xx / connection errors) — prefer that over hand-rolled loops:Capability Boundaries of Compatible Mode
Migrating from OpenAI Direct
Already on OpenAI’s official service? Migration is two steps with zero code changes:- Change base_url and key
- Or change environment variables only (code untouched)
Related Links
- This group: Native Calls · Cache Billing · Function Calling
- Models & pricing: Models & Pricing
- Get / manage tokens:
https://api.apiyi.com/token - Official OpenAI SDK list:
platform.openai.com/docs/libraries