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

Hydrate file

POST
https://api.videogen.io/v1/files/:fileId/hydrate
POST
/v1/files/:fileId/hydrate
1import { VideoGenClient } from "@videogen/sdk";
2
3const client = new VideoGenClient({ token: "YOUR_TOKEN" });
4await client.files.hydrateFile({
5 fileId: "fileId"
6});
200Successful
1{
2 "fileId": "string",
3 "scope": "GLOBAL",
4 "type": "IMAGE",
5 "displayName": "string",
6 "description": "string",
7 "durationSeconds": 1.1,
8 "transcript": "string",
9 "thumbnailSource": {
10 "status": "pending",
11 "url": "string",
12 "expiresAt": 1.1,
13 "width": 1,
14 "height": 1,
15 "fileBytes": 1
16 },
17 "previewSource": {
18 "status": "pending",
19 "url": "string",
20 "expiresAt": 1.1,
21 "width": 1,
22 "height": 1,
23 "fileBytes": 1
24 },
25 "downloadSource": {
26 "status": "pending",
27 "url": "string",
28 "expiresAt": 1.1,
29 "width": 1,
30 "height": 1,
31 "fileBytes": 1
32 },
33 "hlsSource": {
34 "status": "pending",
35 "url": "string",
36 "expiresAt": 1.1,
37 "width": 1,
38 "height": 1,
39 "fileBytes": 1
40 },
41 "isPublicPreviewEnabled": true,
42 "publicHlsUrl": "string",
43 "publicPlaybackId": "string",
44 "sourceToolType": "string",
45 "sourceToolExecutionId": "string"
46}

Generate fresh signed URLs for all available renditions of a file. Call this when source URLs are missing or expired. Returns the full file object with populated thumbnailSource, previewSource, and downloadSource.

Was this page helpful?
Previous

Archive file

Next
Built with

Authentication

AuthorizationBearer
API key from [app.videogen.io/developers](https://app.videogen.io/developers). The full key is only shown once when you create it.

Path parameters

fileIdstringRequired

Response

File with hydrated sources
fileIdstring

File id (e.g. vg_file_...).

scopeenum

File scope.

  • GLOBAL: user-uploaded or standalone generated files that persist indefinitely.
  • PROJECT: project-specific files (e.g. text-to-speech clips in a generated project).
  • EXPORT: project exports.
  • TEMPORARY: short-lived files guaranteed to be available for 24 hours, after which they may be archived at any time. Not analyzed (no description, transcript, or embedding).
Allowed values:
typeenum or null
File type. Null when the file is still being processed and the type has not yet been determined.
Allowed values:
displayNamestring
Display name for the file.
descriptionstring or null
durationSecondsdouble or null
Duration in seconds for video and audio files. Null for images.
transcriptstring or null
Transcript text for video and audio files, when available. Null for images or when no transcript has been generated.
thumbnailSourceobject or null
Thumbnail image source. Populated after hydration.
previewSourceobject or null

Preview rendition source (720p for video, resized for images). Populated after hydration.

downloadSourceobject or null

Highest-quality downloadable rendition. Populated after hydration.

hlsSourceobject or null

Private HLS streaming source. Populated for video and audio files once streaming renditions are ready. Uses a signed token; treat like other signed sources.

isPublicPreviewEnabledboolean

Whether public preview is enabled for this file. When true, publicHlsUrl and publicPlaybackId are populated.

publicHlsUrlstring or null

Public HLS streaming URL. Only present when isPublicPreviewEnabled is true. Does not require authentication or signed tokens.

publicPlaybackIdstring or null

Encoded public playback id (e.g. vg_play_...). Pass this to the @videogen/player or @videogen/player-react packages. Only present when isPublicPreviewEnabled is true.

sourceToolTypestring

Tool type that generated this file (e.g. GENERATE_IMAGE, TEXT_TO_SPEECH). Only present when the file was created by a tool execution.

sourceToolExecutionIdstring

Execution id of the tool call that generated this file (e.g. vg_exec_...). Only present when the file was created by a tool execution.

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