> 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.

# Libraries & SDKs

> Official TypeScript and Python SDKs for the VideoGen API, with links to GitHub, package registries, and per-language documentation.

VideoGen provides official hand-written SDKs and a CLI that track the public OpenAPI surface. The SDKs include helpers for polling, file management, and webhook verification. The CLI wraps `@videogen/sdk` and exposes `videogen <resource> <kebab-op>` commands.

| Library    | Package                                                           | GitHub                                                         |
| ---------- | ----------------------------------------------------------------- | -------------------------------------------------------------- |
| TypeScript | [npm: @videogen/sdk](https://www.npmjs.com/package/@videogen/sdk) | [GitHub](https://github.com/video-gen/videogen-typescript-sdk) |
| Python     | [PyPI: videogen](https://pypi.org/project/videogen/)              | [GitHub](https://github.com/video-gen/videogen-python-sdk)     |
| CLI        | [npm: @videogen/cli](https://www.npmjs.com/package/@videogen/cli) | [GitHub](https://github.com/video-gen/videogen-cli)            |

## Quick install

#### TypeScript

```bash
npm install @videogen/sdk
```

#### Python

```bash
pip install videogen
```

#### CLI

```bash
npm install -g @videogen/cli
# or, on macOS/Linux:
brew install video-gen/tap/videogen
```

## SDK helpers

Both SDKs ship convenience helpers on top of the client (named exports and bound methods). Tools, workflows, and projects also expose `*AndWait` / `*_and_wait` wrappers that start work and poll to completion.

| Helper                   | Purpose                                                                                                                                                                               |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pollWorkflowRun`        | Poll a workflow run until it reaches a terminal status (`succeeded`, `failed`, `cancelled`).                                                                                          |
| `pollProjectExport`      | Poll a project export until it reaches a terminal status (`succeeded`, `failed`).                                                                                                     |
| `pollExecutedTool`       | Poll a tool execution until it reaches a terminal status (`succeeded`, `failed`, `cancelled`).                                                                                        |
| `pollRemixActions`       | Poll remix actions on a project until all reach a terminal status.                                                                                                                    |
| `uploadFile`             | Create a file upload, PUT the bytes, and poll until processed.                                                                                                                        |
| `downloadFile`           | Hydrate a file's download URL and fetch the content (optionally stream to disk).                                                                                                      |
| `getHydratedFile`        | Fetch a file and refresh signed URLs if they are missing or expired.                                                                                                                  |
| `pollPublicPreview`      | After `enablePublicPreview`, poll `getFile` until `staticPublicPreviewSource` (and optionally `publicPlaybackId` for video/audio) are ready. Throws if public preview is not enabled. |
| `createPublicPreview`    | Enable public preview and poll until preview / embed URLs are ready.                                                                                                                  |
| `verifyWebhookSignature` | Verify a Standard Webhooks signature on an incoming delivery; returns the parsed event.                                                                                               |

See the per-language pages for usage examples and configuration details:

#### [TypeScript](/libraries/typescript)

Node.js, Bun, and edge runtimes.

#### [Python](/libraries/python)

Sync and async clients.

#### [CLI](/libraries/cli)

Single binary for terminals, scripts, and CI.

## AI agents

The [MCP server](/libraries/mcp) is the supported way to give an agent VideoGen. Use the hosted remote endpoint, or run `@videogen/mcp` locally. For a custom agent in code, install the TypeScript or Python SDK and bind a function, as in [Use with AI agents](/use-with-ai-agents).

#### [MCP server](/libraries/mcp)

Hosted remote (recommended) or local `@videogen/mcp`.

#### [Use with AI agents](/use-with-ai-agents)

Bind the TypeScript or Python SDK in your framework.

## No-code automation

Wire VideoGen into your automations without writing code.

| Platform  | Package                                                                     |
| --------- | --------------------------------------------------------------------------- |
| n8n       | [npm: n8n-nodes-videogen](https://www.npmjs.com/package/n8n-nodes-videogen) |
| Pipedream | [Pipedream components](/libraries/pipedream)                                |

#### [n8n](/libraries/n8n)

Workflow starts that wait for the exported MP4, plus an export-succeeded trigger.

#### [Pipedream](/libraries/pipedream)

Workflow starts that wait for the exported MP4, plus an export-succeeded trigger.

## Explore & connect

Try the API interactively, or connect it to ChatGPT.

#### [Postman](/libraries/postman)

Import and run every endpoint in Postman.

#### [ChatGPT (custom GPT)](/libraries/chatgpt)

Build a custom GPT with GPT Actions.