Create a chat completion
OpenAI-compatible chat completions. Pass any chat-capable model
from the catalog as model. Supports streaming (SSE), tool
calling, vision input, audio input, JSON mode, structured
output, and provider-specific reasoning controls.
Streaming uses Server-Sent Events with data: ... lines and a
final data: [DONE].
Authentication
Pass your EmpirioLabs API key as a bearer token. The Anthropic-style
x-api-key header is also accepted on every endpoint.
Request
Constrain the output format on models that advertise structured output. Omit it for normal text. Set { "type": "json_object" } to force a valid JSON object (JSON mode). Set { "type": "json_schema", "json_schema": { "name": "...", "strict": true, "schema": { ... } } } to force output that conforms to a JSON Schema. Support is per model: check the structured_output field and the “Structured Outputs” capability on GET /v1/models/{model}. Sending it to a model that does not support the requested format returns a 400.
Return raw upstream response with no server-side formatting.
Response
Completion (or SSE stream when stream=true).
