Skip to main content

Quick Start

First, make sure you have Cloudglue set up by following the setup guide.

Create a Collection and Query with Responses

The Responses API provides an OpenAI Responses-compatible interface for multi-turn conversations with your video collections. Compared to Chat Completions, it offers richer annotations with timestamps, built-in multi-turn support, and system instructions for controlling response behavior. To get started:
  1. Create a media description collection
  2. Add videos to your collection
  3. Create a response
from cloudglue import CloudGlue

client = CloudGlue()

# Create a media description collection
collection = client.collections.create(
    name='my-video-collection',
    collection_type='media-descriptions'
)

# Upload video
video = client.files.upload('path/to/video.mp4', wait_until_finish=True)

# Add video to collection
client.collections.add_video(
    collection_id=collection.id,
    file_id=video.id,
    wait_until_finish=True
)

# Create a response
response = client.responses.create(
    input="What are the key topics discussed in this video?",
    collections=[collection.id],
    model="nimbus-001",
    instructions="Provide detailed answers with timestamps when possible."
)

print(response.output[0].content[0].text)
For more details about the Python SDK, check out our Python SDK Documentation.

Model Options

The Responses API supports two models:
ModelBest For
nimbus-001Fast general question answering over media description collections
nimbus-002-previewLight reasoning with multi-step analysis, entity-backed knowledge, cross-video synthesis
nimbus-002-preview can combine structured entity data with media descriptions for richer answers. See the Responses API deep dive for entity-backed knowledge examples.
nimbus-002-preview is a preview model. Behavior may change as we iterate.

Streaming

Stream responses in real-time via Server-Sent Events:
from cloudglue import CloudGlue

client = CloudGlue()

events = client.responses.create(
    input="Summarize the main topics in these videos.",
    collections=["COLLECTION_ID"],
    model="nimbus-002-preview",
    stream=True,
)

for event in events:
    evt_type = event.get("event")
    data = event.get("data")
    if evt_type == "response.output_text.delta" and isinstance(data, dict):
        print(data.get("delta", ""), end="", flush=True)
    elif evt_type == "response.completed":
        print()

Next Steps

For advanced features — entity-backed knowledge, background processing, multi-turn conversations, rich citations, and filters — see the Responses API deep dive. For more detailed API parameters, check out our API Reference.