Skip to main content
POST
/
v1
/
threads
/
{thread_id}
/
messages
Create a message
curl --request POST \
  --url https://api.zerobot.ai/v1/threads/{thread_id}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "role": "user",
  "assistant_id": "<string>"
}
'
{
  "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.