For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DashboardAPI PricingGet an API key
  • Guides
    • Introduction
    • Getting started
    • Use with AI agents
    • Examples
    • Authentication
    • Handling async tasks
    • File uploads
    • File hydration
    • Embedding videos
    • Errors
    • Rate limits
    • Libraries & SDKs
  • REST API Reference
    • Overview
    • Workflows
        • POSTGenerate image
        • POSTGenerate video clip
        • POSTText to speech
        • POSTGenerate sound effect
        • POSTGenerate avatar clip
        • POSTVectorize image
        • POSTRemove background from an image
        • POSTRemove background from a video
        • POSTUpscale an image
        • POSTUpscale a video
        • POSTCancel tool execution
        • GETGet tool execution info
        • GETList files
        • POSTSearch files
        • GETGet file
        • POSTCreate file upload
        • POSTHydrate file
        • POSTArchive file
        • POSTEnable public preview
        • POSTDisable public preview
        • GETList avatar presenters
        • GETList TTS voices
        • GETList webhooks
        • POSTCreate webhook
        • DELDelete webhook
  • Webhook events
    • Overview
    • Changelog
LogoLogo
DashboardAPI PricingGet an API key
REST API ReferenceEndpointsFiles

Search files

POST
https://api.videogen.io/v1/files/search
POST
/v1/files/search
1import { VideoGenClient } from "@videogen/sdk";
2
3const client = new VideoGenClient({ token: "YOUR_TOKEN" });
4await client.files.searchFiles({
5 query: "query"
6});
200Successful
1{
2 "results": [
3 {
4 "similarity": 0.82,
5 "file": {
6 "fileId": "string",
7 "scope": "GLOBAL",
8 "type": "IMAGE",
9 "displayName": "string",
10 "description": "string",
11 "durationSeconds": 1.1,
12 "transcript": "string",
13 "thumbnailSource": {
14 "status": "pending",
15 "url": "string",
16 "expiresAt": 1.1,
17 "width": 1,
18 "height": 1,
19 "fileBytes": 1
20 },
21 "previewSource": {
22 "status": "pending",
23 "url": "string",
24 "expiresAt": 1.1,
25 "width": 1,
26 "height": 1,
27 "fileBytes": 1
28 },
29 "downloadSource": {
30 "status": "pending",
31 "url": "string",
32 "expiresAt": 1.1,
33 "width": 1,
34 "height": 1,
35 "fileBytes": 1
36 },
37 "hlsSource": {
38 "status": "pending",
39 "url": "string",
40 "expiresAt": 1.1,
41 "width": 1,
42 "height": 1,
43 "fileBytes": 1
44 },
45 "isPublicPreviewEnabled": true,
46 "publicHlsUrl": "string",
47 "publicPlaybackId": "string",
48 "sourceToolType": "string",
49 "sourceToolExecutionId": "string"
50 }
51 }
52 ]
53}
Semantic vector search over your files. Embeds the query text and returns the closest matching files ranked by cosine similarity. Only files with indexed descriptions are searchable.
Was this page helpful?
Previous

Get file

Next
Built with

Authentication

AuthorizationBearer

API key from app.videogen.io/developers. The full key is only shown once when you create it.

Request

This endpoint expects an object.
querystringRequired

Natural-language search query. The text is embedded and compared against file description vectors using cosine similarity.

numResultsintegerOptional1-100Defaults to 10

Number of results to return (1–100). Defaults to 10.

selfOnlybooleanOptionalDefaults to false

When true, only files created by the calling API key’s user are returned. When false (default), all files accessible to the team are included.

Response

Search results ordered by descending similarity
resultslist of objects