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

Create file upload

POST
https://api.videogen.io/v1/files/upload
POST
/v1/files/upload
1import { VideoGenClient } from "@videogen/sdk";
2
3const client = new VideoGenClient({ token: "YOUR_TOKEN" });
4await client.files.createFileUpload({
5 displayName: "displayName"
6});
200Successful
1{
2 "fileId": "string",
3 "uploadUrl": "string"
4}

Create a new file and receive a pre-signed upload URL. PUT the file bytes to the returned URL, then poll GET /v1/files/{fileId} until the file is ready.

Was this page helpful?
Previous

Hydrate 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.
displayNamestringRequired
Display name for the uploaded file.
typeenumOptional

The type of file to upload. Optional; when omitted, the type is inferred after upload processing completes.

Allowed values:
isTemporarybooleanOptionalDefaults to false

When true, the file is temporary. Temporary files are guaranteed to be available for 24 hours, after which they may be archived at any time. Temporary files are not analyzed (no description, transcript, or embedding will be generated), so they will not appear in search results. Defaults to false.

Response

Upload instructions
fileIdstring

The file id to use in subsequent API calls (e.g. vg_file_...).

uploadUrlstring

Pre-signed URL. PUT the raw file bytes to this URL to complete the upload.