POST
Text Chat

Authorizations

Authorization
string
header
required

Bearer API_key, can be found in Account Management > API Keys.

Headers

X-Stack-Id
string
default:stk_jmqog66ha0mugmro
required

Supplied automatically by the documentation playground.

Body

application/json
model
enum<string>
default:magma
required

Select a supported model layer.

Available options:
magma,
pyro,
pyro:max
messages
object[]
required

Array of message objects.

max_tokens
integer

Maximum number of tokens to generate.

temperature
number
default:1

Sampling temperature between 0 and 2.

stream
boolean
default:false

Whether to stream the response via SSE.

top_p
number
default:1

Nucleus sampling parameter.

Response

200 - application/json

Successful response

id
string
object
string
created
integer
model
string
choices
object[]
usage
object