POST
/
chat
/
completions
curl --request POST \
  --url https://api.cloudglue.dev/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "nimbus-001",
  "messages": [
    {
      "role": "system",
      "content": "<string>",
      "name": "<string>"
    }
  ],
  "collections": [
    "<string>"
  ],
  "filter": {
    "metadata": [
      {
        "path": "<string>",
        "operator": "NotEqual",
        "valueText": "<string>",
        "valueTextArray": [
          "<string>"
        ]
      }
    ]
  },
  "force_search": false,
  "result_format": "text",
  "include_citations": true,
  "temperature": 0.7,
  "top_p": 1,
  "max_tokens": 1024
}'
{
  "id": "<string>",
  "object": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "role": "system",
        "content": "<string>",
        "name": "<string>"
      },
      "citations": [
        {
          "collection_id": "<string>",
          "file_id": "<string>",
          "segment_id": "<string>",
          "start_time": "<string>",
          "end_time": "<string>",
          "text": "<string>",
          "context": "<string>",
          "relevant_sources": [
            {
              "text": "<string>"
            }
          ],
          "visual_description": [
            {
              "text": "<string>",
              "start_time": 123,
              "end_time": 123
            }
          ],
          "scene_text": [
            {
              "text": "<string>",
              "start_time": 123,
              "end_time": 123
            }
          ],
          "speech": [
            {
              "speaker": "<string>",
              "text": "<string>",
              "start_time": 123,
              "end_time": 123
            }
          ]
        }
      ]
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
Chat completion parameters
model
enum<string>
required

ID of the video understanding model to use

Available options:
nimbus-001
messages
object[]
required

A list of messages comprising the conversation so far

collections
string[]
required

List of collection IDs to use as context for the chat

filter
object

Filter criteria to constrain search results used in chat

Whether to force the model to always perform a search when answering questions, even if it believes it knows the answer

result_format
enum<string>
default:text

Format for responses

Available options:
text,
markdown,
json
include_citations
boolean
default:true

Whether to include citations to specific video segments

temperature
number
default:0.7

Sampling temperature to use, between 0 and 2

Required range: 0 <= x <= 2
top_p
number
default:1

An alternative to sampling with temperature, called nucleus sampling

Required range: 0 <= x <= 1
max_tokens
integer
default:1024

The maximum number of tokens to generate in the chat completion

Response

200
application/json
Successful response
id
string

Unique identifier for this chat completion

object
string

Object type, always "chat.completion"

created
integer

Unix timestamp of when the chat completion was created

model
string

The model used for the chat completion

choices
object[]

The generated responses

usage
object

Usage statistics for the completion request