POST
/
v1
/
chat
/
completions

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
messages
object[]
required

The list of messages to generate a response for. The last message is the prompt.

model
string
required

The id of the model to use for the generation

citations
boolean

Whether to include citations in the generation > For use in owned_by: bing/openai models only, defaults to true.

image

The url of the image to use for the generation > Model limitations apply

internet
boolean

Whether to use the internet for the generation > Model limitations apply, defaults to true for bing models.

max_tokens
integer

The maximum number of tokens to generate

raw
boolean

Whether to return the raw response > For use in owned_by: bing/openai models only! Returns Bing AI Suggestions and Search Results, defaults to false.

temperature
number

The temperature of the sampling distribution

tone
string

The tone of the generation > For use in owned_by: bing/openai models only, defaults to precise.

tool_choice

Defaults to auto for automatic tool choice

tools
object[]

The list of tools to use for the generation

top_p
number

The cumulative probability of the top tokens to keep in the nucleus of the distribution

Response

200 - application/json
choices
object[]
created
integer
id
string
model
string
object
string
system_fingerprint
string
usage
object