Skip to main content
POST
Create chat completion

Authorizations

Authorization
string
header
required

Your Kubox API key (kbx_live_…) from the console.

Body

application/json
model
string
required

A model id from GET /v1/models.

Example:

"MAGPiE"

messages
object[]
required
stream
boolean
default:false

When true, the response streams as server-sent events.

max_tokens
integer
Required range: x >= 1
temperature
number
Required range: 0 <= x <= 2

Response

The completion. JSON when stream is false; text/event-stream of chat.completion.chunk events terminated by data: [DONE] when true.

id
string
object
enum<string>
Available options:
chat.completion
model
string
choices
object[]
usage
object