Skip to main content
POST
/
responses
Create a response
curl --request POST \
  --url https://api.cloudglue.dev/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "nimbus-001",
  "input": "<string>",
  "knowledge_base": {
    "collections": [
      "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    ],
    "filter": {
      "file_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ]
    }
  },
  "instructions": "<string>",
  "temperature": 0.7,
  "include": [
    "cloudglue_citations.media_descriptions"
  ],
  "background": false
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "object": "response",
  "status": "in_progress",
  "created_at": 123,
  "model": "<string>",
  "instructions": "<string>",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "<string>",
          "annotations": [
            {
              "type": "cloudglue_citation",
              "collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "start_time": 123,
              "end_time": 123,
              "context": "<string>",
              "relevant_sources": [
                "<string>"
              ],
              "visual_scene_description": [
                "<string>"
              ],
              "scene_text": [
                "<string>"
              ],
              "speech": [
                "<string>"
              ],
              "audio_description": [
                "<string>"
              ]
            }
          ]
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 123,
    "output_tokens": 123,
    "total_tokens": 123
  },
  "error": {
    "message": "<string>",
    "type": "<string>",
    "code": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Response creation parameters

model
enum<string>
required

The model to use for generating the response

Available options:
nimbus-001
input
required

The input for the response. Can be a simple string or an array of messages.

knowledge_base
object
required

Configuration for the video collections to search against for response context

instructions
string

System instructions to guide the model's behavior (maps to developer/system message)

temperature
number
default:0.7

Sampling temperature for the model

Required range: 0 <= x <= 2
include
enum<string>[]

Additional data to include in the response annotations

Available options:
cloudglue_citations.media_descriptions
background
boolean
default:false

Set to true to process the response in the background. When true, the response is returned immediately with status 'in_progress'.

Response

Response created successfully

id
string<uuid>

Unique identifier for the response

object
enum<string>

Object type identifier

Available options:
response
status
enum<string>

Current status of the response

Available options:
in_progress,
completed,
failed,
cancelled
created_at
integer

Unix timestamp of when the response was created

model
string

The model used for the response

instructions
string | null

The system instructions used

output
object[] | null

The generated output messages

usage
object

Token usage statistics for the response

error
object

Error details when the response status is 'failed'