OpenAI, Anthropic, and Gemini Compatibility
EmpirioLabs AI exposes compatibility endpoints so you can adopt the platform without rewriting existing integrations. Point your OpenAI, Anthropic, or Google Gemini SDK at the EmpirioLabs base URL and start making requests immediately.
OpenAI-compatible Chat Completions
POST /v1/chat/completions
Accepts the same request body as the OpenAI Chat Completions API. Supports messages, model, stream, temperature, max_tokens, and other standard parameters.
Using the OpenAI Python SDK:
System prompts
Every chat model ships with a short default system message that establishes its identity (for example, “You are DeepSeek V4 Flash”). The default is prepended to your request automatically when you do not include a role: "system" or role: "developer" message. If you provide one, it fully replaces the default. No merging or prepending happens, and multiple system messages in a single request are forwarded to the upstream as-is.
Structured outputs
Chat models that advertise structured output can constrain their responses with the OpenAI response_format parameter on POST /v1/chat/completions. There are two levels:
- JSON mode returns a valid JSON object with a shape you describe in your prompt.
- JSON schema forces the response to match a JSON Schema you provide.
Support is per model. Check the structured_output field on GET /v1/models/{modelId} ("json_schema" means strict schema support, "json_object" means JSON mode only), or look for the “Structured Outputs” capability on the model page. Sending a format a model does not support returns a 400.
JSON mode:
JSON schema (schema-enforced):
The OpenAI SDKs support both shapes natively through their own response_format argument, so no EmpirioLabs-specific code is needed.
Other endpoints
Structured output also works on the other text endpoints. POST /v1/completions accepts the same response_format. POST /v1/responses uses the Responses API text.format field (for example { "text": { "format": { "type": "json_schema", "name": "...", "strict": true, "schema": { ... } } } }), which the OpenAI SDK sets for you. POST /v1/messages accepts an OpenAI-shaped response_format when you need it alongside the Anthropic request shape.
OpenAI Responses-compatible endpoint
POST /v1/responses
Accepts the same request body as the OpenAI Responses API. Supports model, input, instructions, and related fields.
Anthropic-style Messages endpoint
POST /v1/messages
Accepts the same request body as the Anthropic Messages API. Requires model, messages, and max_tokens.
Google Gemini-compatible endpoint
POST /v1beta/models/{model}:generateContent
Accepts the native Google Gemini request body (contents, systemInstruction, generationConfig, tools) for any chat model in the catalog. Streaming uses POST /v1beta/models/{model}:streamGenerateContent?alt=sse, and POST /v1beta/models/{model}:countTokens returns a fast token estimate.
Authenticate with your EmpirioLabs API key in the x-goog-api-key header or the ?key= query parameter, the same places Gemini clients already put their key. Authorization: Bearer works too.
Using the google-genai Python SDK:
Pricing, parameters, and billing match /v1/chat/completions for the same model. Streamed responses end without a [DONE] sentinel, matching Gemini behavior.
SDK configuration cheat sheet
For coding agents, IDE assistants, and CLIs, see Integrations for OpenCode, Claude Code, Cline, Aider, Continue, Cursor, and other OpenAI-compatible tools.
Model support
Not every model supports every endpoint format. Use GET /v1/models/{modelId} to check a specific model’s capabilities (streaming, system prompt, web search, images, video) and supported_parameters before integrating.
