Skip to main content
POST
/
v1
/
chat
/
completions
Create a completion
curl --request POST \
  --url https://api.zerobot.ai/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "assistant_id": "<string>",
  "thread_id": "<string>",
  "messages": [
    {
      "role": "<string>",
      "content": [
        {
          "type": "<string>",
          "text": "<string>",
          "image_url": {
            "url": "<string>"
          }
        }
      ]
    }
  ],
  "max_tokens": 123
}
'
{
  "completion": {}
}

Authorizations

Authorization
string
header
required

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

Body

application/json
assistant_id
string

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

thread_id
string

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

messages
object[]

A list of messages to include in the completion request.

max_tokens
integer

The maximum number of tokens to generate in the completion.

Response

200 - application/json

Successful response

completion
object

A completion object.