What is an OpenAI-compatible API endpoint?
Learn what API compatibility covers, what it does not guarantee, and how to test a gateway safely.
Compatibility is an interface contract
An OpenAI-compatible endpoint accepts familiar paths and request shapes, such as chat completions with messages, model, maximum tokens, and streaming. Many SDKs can switch by changing the base URL and API key.
It does not mean every provider supports every parameter or returns identical model behavior. Check documented surfaces and error codes.
Test the failure paths
Test a non-stream request, an SSE stream, an invalid key, a disallowed model, insufficient balance, and a rate-limit response. Confirm that retries do not duplicate spend.
Keep keys scoped and store them in secret storage. A gateway should expose content-free usage records without retaining prompt or completion payloads.