Skip to main content
POST
Create chat completion

Headers

X-API-Key
string

Compute/Grid API key (billed to prepaid credits). Omit to pay per request via x402 X-Payment.

Example:

"x402c_..."

Body

application/json
model
string
required
Example:

"llama-3.2-3b"

messages
object[]
required
Example:
temperature
number
Example:

0.7

max_tokens
integer
Example:

512

stream
boolean
default:false

Response

Completion (or SSE stream when stream=true)

id
string
object
string
Example:

"chat.completion"

model
string
choices
object[]
usage
object