Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Authentication using a bearer token

Body

application/json

Chat completion request parameters

model
string
required

The model ID to use

messages
object[]
required

A list of messages comprising the conversation so far

stream
boolean
default:false

Whether to stream the response

tools
object[]

A list of tools the model may use

tool_choice
object

Controls which tool is used by the model

temperature
number<float>

What sampling temperature to use

Required range: 0 <= x <= 2
max_tokens
integer

The maximum number of tokens to generate

Required range: x >= 1

Response

Successful completion

id
string

A unique identifier for the completion

choices
object[]

A list of completion choices

usage
object