Skip to main content
POST
Create Chat Completion

Authorizations

Authorization
string
header
required

API key passed as an Authorization Bearer token: Authorization: Bearer YOUR_API_KEY

Headers

X-Eachlabs-Webhook-Url
string<uri>

Optional webhook URL for asynchronous result delivery.

Body

application/json

OpenAI-compatible chat completions request body

model
string
required

LLM model identifier

Example:

"openai/gpt-4o-mini"

messages
object[]
required

OpenAI-compatible chat messages

Example:
stream
boolean

Set to true to receive OpenAI-compatible SSE chunks (text/event-stream) instead of a buffered JSON response.

Example:

false

stream_options
object | null

Optional OpenAI-compatible streaming options. When include_usage is true, the stream may include a final usage chunk before [DONE].

Response

OpenAI-compatible chat completion. Requests with stream: true return Server-Sent Events.

OpenAI-compatible chat completions response

id
string
Example:

"chatcmpl-abc123"

object
string
Example:

"chat.completion"

created
integer<int64>
Example:

1773651600

model
string
Example:

"eachlabs-llm-router"

choices
object[]
usage
object | null
Last modified on July 27, 2026