> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.videogen.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.videogen.io/_mcp/server.

# Introduction

> Overview of the VideoGen API: end-to-end video workflows, the run-remix-export flow, the async execution model, base URL, and conventions.

The VideoGen API turns a script, voiceover, or slideshow into a finished video with visuals, narration, and captions. Workflows are the heart of the API: a single call runs the whole generation pipeline and creates a VideoGen project you can edit and export.

Workflows are the core of the API. `POST /v1/workflows/*` returns `{"workflowRunId": "vg_work_...", "projectId": "vg_proj_...", "projectUrl": "...", "remixActionIds": [...]}` with status `202`. Use `projectId` for API follow-ups; `projectUrl` is optional (opens the project in the app editor for manual review; team and collaborators only). Poll `GET /v1/workflows/runs/{workflowRunId}` until `status` is `succeeded`, `failed`, or `cancelled`. The full flow is: run a workflow, optionally apply remix actions (background music, logo, captions, transitions, natural-language edits), then export the project to MP4 via `POST /v1/projects/{projectId}/export`. Standalone media tools (`POST /v1/tools/...`) are a secondary surface for generating a single asset; they return `{"toolExecutionId": "vg_tool_..."}` and are polled at `GET /v1/tools/executions/{toolExecutionId}`. All IDs are prefixed strings (e.g. `vg_work_...`, `vg_tool_...`, `vg_file_...`). Store them as-is and do not parse them. All numeric timestamp fields (`expiresAt`, `occurredAt`, `createdAt`, etc.) are seconds since the Unix epoch (UTC). The OpenAPI spec is at `https://docs.videogen.io/openapi.json`.

## Base URL

```
https://api.videogen.io
```

## The flow

Every video follows the same three steps:

1. Run a workflow. `POST /v1/workflows/*` starts the generation pipeline from your script, voiceover, or slideshow, and returns a `workflowRunId` and a `projectId`.
2. Apply remix actions (optional). Layer on edits such as background music, a logo overlay, caption changes, or open-ended natural-language edits.
3. Export the project. Render the project to an MP4 and download it.

The [Getting started](/getting-started) guide walks through this flow end to end.

## Workflows

Each workflow takes a single input and builds the full video (visuals, narration, captions):

* Script to video: write a script, get a narrated video with matching visuals.
* Voiceover to video: upload an audio file, get visuals matched to the narration.
* Slideshow to video: upload a PDF or slideshow, get a narrated walkthrough.
* Prompt to video clip: generate one short AI video clip (up to 30 seconds) from a text prompt.

See the [Workflows reference](/workflows) for inputs, options, and the run lifecycle.

## Async by default

A finished video takes anywhere from a few seconds to several minutes to produce. Rather than holding a connection open, every workflow and export returns an id immediately. You then get the result by [polling](/handling-async-tasks/polling) or by subscribing to a [webhook](/handling-async-tasks/webhooks).

## Tools

Beyond workflows, the API exposes standalone tools that generate a single asset with no project or pipeline: images, video clips, voiceovers, sound effects, music, avatar clips, and transforms like upscaling and background removal. Each `POST /v1/tools/*` call is asynchronous and returns a `toolExecutionId` to poll.

`POST /v1/tools/generate-video-clip` produces one short standalone clip (up to 30 seconds). VideoGen automatically routes each request to a suitable video generation model for your inputs and settings, so you do not pick a model. Prefer a video workflow when you want a full, professionally edited multi-scene video.

See the [REST API reference](/rest-api-reference) for every tool and its request shape.

## Account

`GET /v1/me` returns the account and team behind your API key (`apiKeyId`, `apiKeyNickname`, `email`, `displayName`, `teamId`). It takes no parameters, so it's the simplest way to confirm a key is valid. See [Getting started](/getting-started) for a copy-paste verification snippet.

## Libraries & SDKs

Official TypeScript (`@videogen/sdk`) and Python (`videogen`) clients stay in sync with the API and include helpers for polling, file uploads, and webhook verification. See [Libraries & SDKs](/libraries) for install instructions and per-language guides.

## Use with AI agents

VideoGen ships an agent skill for Cursor and other AI coding assistants, plus integration guides for OpenAI Agents SDK, Vercel AI SDK, and LangChain. See [Use with AI agents](/use-with-ai-agents) for setup, tool definitions, and an AGENTS.md snippet you can drop into your repo.

## Conventions

### IDs

All IDs are prefixed strings (e.g. `vg_work_...`, `vg_tool_...`, `vg_file_...`). Store them as-is and do not parse them.

### Timestamps

Every numeric timestamp field in the API (`expiresAt`, `occurredAt`, `createdAt`, and any future additions) is an integer representing seconds since the Unix epoch (UTC, no milliseconds). For example `1745409600` corresponds to 2025-04-23T12:00:00Z.

## Next steps

* [Getting started](/getting-started): Get an API key, install an SDK, and run your first workflow.
* [Run a workflow](/run-a-workflow): Start a workflow and wait for the finished video.
* [Apply remix actions](/apply-remix-actions): Add music, a logo, or natural-language edits to a project.
* [Export your video](/export-your-video): Render a project to an MP4 and download it.
* [Libraries & SDKs](/libraries): Official TypeScript and Python clients with polling and file helpers.
* [Use with AI agents](/use-with-ai-agents): Agent skill, framework integrations, and an AGENTS.md snippet.
* [REST API reference](/rest-api-reference): Full endpoint documentation.