Skip to main content
The Responses API is Cloudglue’s next-generation conversational video interface. Compatible with the OpenAI Responses API format, it provides richer annotations, built-in multi-turn conversations, system instructions, streaming, and background processing — all grounded in your video content.
The Responses API works with both Media Description Collections (speech, visual, text) and Entity Collections (structured extracted data). Combine both for the richest video understanding.

When to Use Responses API vs Chat Completions

Use Chat Completions if you have an existing integration and only need basic Q&A over media description collections. Use Responses API for new projects, streaming UIs, entity-backed reasoning, or when you need background processing.

Model Selection

nimbus-001

Fast general question answering model. Works with media description collections for speech, visual, and text understanding. Good for straightforward Q&A and summarization.

nimbus-002-preview

Light reasoning model capable of multi-step reasoning and inspecting your video assets from different dimensions. In addition to media description collections, it supports entity-backed knowledge — combining structured entity data with unstructured video descriptions for richer, more precise answers.
nimbus-002-preview is a preview model. Behavior may change as we iterate.
When to use which:
  • nimbus-001 — Fast Q&A, summarization, general questions over video content
  • nimbus-002-preview — Multi-step reasoning, cross-video synthesis, queries that need structured + unstructured data together

Basic Response (Sync)

The simplest usage — send a question and get a complete response.
The Python SDK uses a top-level collections parameter, while the TypeScript SDK nests it under knowledge_base: { collections: [...] }. Both achieve the same result — the difference is SDK-specific.

Streaming Responses

For real-time UIs, stream the response as it’s generated via Server-Sent Events (SSE). The JavaScript SDK uses web-standard APIs (fetch + ReadableStream) internally, so streaming works in both Node.js 18+ and modern browsers — including Next.js client components, React apps, and other browser environments. The stream emits three event types:
  • response.output_text.delta — Incremental text chunks
  • response.completed — Final event with the full response object (including annotations)
  • error — Error event if something goes wrong
Streaming and background mode cannot be used together. Setting both stream: true and background: true returns a 400 error.

Entity-Backed Knowledge

This is the key differentiator of nimbus-002-preview. Entity-backed knowledge lets the model reason over both your structured entity data (extracted schemas) and unstructured media descriptions simultaneously. For example, if you have an entity collection with extracted recipe schemas (ingredients, cook times, difficulty) and a media description collection with the full video transcripts, the model can answer questions like “Which beginner recipes take under 30 minutes?” by combining both data sources.

How It Works

  1. Create an entity collection with your extraction schema (see Entity Collections)
  2. Create a media description collection with your videos
  3. Pass both to the Responses API via entity_backed_knowledge configuration
The Python SDK provides helper methods for building entity-backed knowledge configs:

Configuration Fields

entity_backed_knowledge_config (top-level)

The top-level description on entity_backed_knowledge_config is important for guiding the model’s reasoning. For example, "Sales call recordings from Q4 2024 with deal outcomes and customer feedback" helps the model understand the domain and tailor its analysis. Without it, the model only sees individual collection descriptions and may miss the bigger picture.

Entity collection config (per-collection)

Entity-Backed Knowledge + Streaming

You can combine entity-backed knowledge with streaming for real-time entity-aware responses:

Multi-Turn Conversations

The input parameter accepts either a string (single question) or a message array (multi-turn conversation). For multi-turn, include the full conversation history.
The Python SDK uses a simplified message format ({"role": ..., "content": ...}) while the TypeScript SDK uses the full OpenAI Responses format with type: 'message' and structured content arrays.

Instructions

Use the instructions parameter to control response behavior — set a persona, language, format, or domain constraints.

Background Processing + Polling

For long-running queries or batch workflows, use background: true. The response returns immediately with status in_progress, and you poll for completion.

Rich Citations

Request detailed media description annotations on citations by passing the include parameter. This returns speech transcripts, visual scene descriptions, and scene text for each cited segment.

Filters

Constrain which videos are searched using metadata, file, or video info filters.
The Python SDK provides a create_filter() helper:

Supported Filter Operations

Filter Categories

  • metadata — Filter on custom metadata fields (e.g., metadata.topic)
  • file — Filter on file properties (e.g., id)
  • video_info — Filter on video properties (e.g., duration_seconds, has_audio)

Best Practices

Model Selection

  • Start with nimbus-001 for fast Q&A and summarization
  • Use nimbus-002-preview when you need multi-step reasoning, cross-video synthesis, or entity-backed knowledge
  • Both models support streaming, background processing, multi-turn, and instructions

Streaming vs Background

  • Streaming for interactive UIs where users see text appear in real-time
  • Background for batch processing, long-running analysis, or server-to-server workflows
  • You cannot use both simultaneously

Entity Collections

  • Set a top-level description on entity_backed_knowledge_config to give the model overall context — e.g., "Customer support calls from enterprise accounts in Q1 2025" helps the model frame its reasoning across all collections
  • Give each entity collection descriptive name and description values — the model uses these to decide when and how to query each collection
  • A name like "recipes" with a description like "Ingredients, cook times, and difficulty levels for each dish" is more helpful than "data" with no description

Multi-Turn Conversations

  • Include the full conversation history in each request for proper context
  • For long conversations, consider trimming older turns to stay within token limits
  • Use instructions to set consistent behavior across turns rather than repeating guidance in each message

Citations

  • Use include: ["cloudglue_citations.media_descriptions"] when you need to display source segments to users or verify answers
  • Citation annotations include timestamps, speech, visual descriptions, and scene text — useful for building “jump to source” features

Try It Out

Ready to build with the Responses API?