Video Search
For chat over text, images and short videos, use the OpenAI-compatible Chat Completions API.
POST /v2/search finds moments across your videos. It supports two strategies:
semantic(default): Embedding similarity against a natural language query. Videos need theembeddingsfeature to beready.text: Literal substring match against transcripts, captions, or both. Videos need the matchingtranscriptorcaptionsfeature.
Search videos
Bash
Python
Search parameters
General parameters:
query(required): Natural language forsemantic, literal text fortext.strategy(optional):semantic(default) ortext.fields(optional): Fortextonly, which data to search:transcript,captions, or both (the default). Ignored forsemantic.video_ids(optional): Search only these videos.group_ids(optional): Search only videos in these groups.threshold(optional): Named confidence filter, one ofhigh,medium,low(default), ornone. Only affectssemantic.rerank(optional): Apply embedding-based reranking.semanticonly, slightly slower. Defaults tofalse.include_report(optional): Generate an LLM summary of the results.semanticonly. Defaults tofalse.
Filtering parameters:
filter(optional): Metadata filters.duration(seconds),widthandheight(pixels) each take a range with optionalgteandltebounds.idfilters to specific video IDs, the same asvideo_ids.datetime_from,datetime_to(optional): An explicit UTC datetime range forsemanticsearch, in ISO 8601 format.timestamp_from,timestamp_to(optional): An in-video timestamp range in seconds.
Pagination parameters:
page_limit(optional): Results per page, up to 50. Defaults to 10.page_token(optional): Thenext_page_tokenfrom a previous response.
Search response
Result fields
video_id: Video this moment is from.video_name: Video display name.start,end: Start and end of the moment, in seconds.score: Relevance score between 0 and 1. Text matches are binary, and always score1.0.rank: Position in the results, where1is the most relevant.caption: AI description of the visual content.transcript: Spoken words in this segment.thumbnail_url: Preview frame URL. Not yet available.video_url: Presigned URL to the parent video.
Top-level fields
data: The matching moments.next_page_token: Pass aspage_tokento fetch the next page.nullon the last page.report: LLM-generated summary, wheninclude_reportistrue.search_pool: The number of videos searched (video_count) and their total duration in seconds (total_duration).
Search examples
Text search over transcripts
Scope to a group and filter by duration
Page through every result
Search tips
- Be specific: “person walking on a beach” works better than “walking”.
- Tune
thresholdper query: Start withlow, raise it tomediumorhighfor precise filtering, or usenoneto see every candidate. - Use
textfor exact phrases: Names, product codes, or quotes match more reliably with literal search over transcripts. - Feed results into chat: Each result’s
video_id,start, andendcan go straight into thecontextof a video chat request.