Skip to main content
POST

Authorizations

Authorization
string
header
required

A ForceAI virtual key or the master key, sent as Authorization: Bearer <key>.

Body

application/json
model
string
required

A model name, or a Smart Router name for automatic selection.

Example:

"smart-router"

messages
object[]
required
max_tokens
integer
temperature
number
stream
boolean

Set true for a streamed response.

Response

The completion

id
string
model
string

The requested model or router name (not the resolved model).

choices
object[]
usage
object