Skip to content

OpenAI-Compatible API

One of SDKMAX's core design goals is that any code already written against the OpenAI API should work by changing only base_url and api_key — no business-logic rewrite required.

diff
- base_url = "https://api.openai.com/v1"
+ base_url = "https://api.sdkmax.com/v1"

- api_key = "sk-openai-xxx"
+ api_key = "sk-sdkmax-xxx"

Even when model points at a non-OpenAI model (Claude, Gemini, DeepSeek, ...), the request/response shape still follows the OpenAI protocol — the gateway handles that translation internally.

Supported compatible endpoints

EndpointMethodNotes
/v1/chat/completionsPOSTChat completions, streaming (stream: true) and function/tool calling (model-dependent)
/v1/completionsPOSTLegacy text completions
/v1/embeddingsPOSTText embeddings
/v1/images/generationsPOSTText-to-image, see Images API
/v1/images/editsPOSTImage editing/inpainting, see Images API
/v1/audio/transcriptionsPOSTSpeech-to-text (Whisper-compatible)
/v1/audio/translationsPOSTSpeech translation
/v1/audio/speechPOSTText-to-speech
/v1/moderationsPOSTContent moderation
/v1/rerankPOSTReranking (model-dependent)
/v1/modelsGETList currently available models
/v1/models/{model}GETGet details for a specific model

Other native protocols

Beyond the OpenAI protocol, the gateway also accepts /v1/messages (Anthropic Claude's native protocol) via an x-api-key header, and Gemini-style native calls (/v1beta/...) via x-goog-api-key / ?key=. If your code is written against the official Anthropic or Google SDKs, you can point it at SDKMAX by only changing the endpoint — no need to rewrite to the OpenAI shape.

Not yet supported / limited

  • /v1/images/variations is not supported yet.
  • /v1/files and /v1/fine-tunes are currently placeholders/incomplete — don't rely on them.
  • There is no dedicated Batch endpoint yet — see Batch API for an interim approach.

If your use case depends on any of the above, check FAQ or confirm the roadmap with the platform team before shipping a dependency on it.

Using the official OpenAI SDK directly

Because the protocol is compatible, you don't need a dedicated SDKMAX SDK — use each language's official OpenAI SDK with base_url set (see Quickstart). The Python / Node.js / Java / Go SDK pages here mainly show SDKMAX-specific usage (model switching, error handling conventions) — the underlying client is still the standard OpenAI one.

Video and other OpenAI-protocol extensions

Video generation (/v1/video/generations, /v1/videos) is a SDKMAX extension built on top of the OpenAI protocol (aligned with OpenAI's own Video/Sora-style API shape) — see Video API.

SDKMAX — Enterprise AI Gateway, Aggregating Global AI Resources