Skip to main content
POST
Create a message

Authorizations

Authorization
string
header
required

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

Path Parameters

thread_id
string
required

The id of the thread to create a message for.

Body

application/json
content
string
required

The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.

Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.

role
enum<string>
default:user
required

The role of the entity that is creating the message.

Available options:
user,
assistant
assistant_id
string

The ID of the assistant to use to execute this run.

Response

200 - application/json

Successful response

message
object

A message object.