Use with AI agents
The VideoGen API works with any AI agent or framework that supports function calling. Give your agent the ability to turn a script into a finished video, plus generate standalone images, voiceovers, sound effects, and avatar clips on demand.
Use the VideoGen API skill to build and manage media generation from your AI coding assistant:
Quick setup
Framework examples
OpenAI Agents SDK
Python
Vercel AI SDK
TypeScript
LangChain
Python
AGENTS.md
If you’re using an AI coding assistant like Cursor, Windsurf, or Claude Code, you can add the following to your project’s AGENTS.md or .cursor/rules/ to give the agent context about VideoGen:
MCP
VideoGen offers two MCP (Model Context Protocol) servers: a hosted documentation server that lets AI clients read the API docs, and a local API server that lets AI clients actually run VideoGen (generate videos, images, voiceovers, and more).
Documentation MCP
Your VideoGen docs site includes a hosted MCP server that AI clients can connect to directly. This lets tools like Cursor and Claude Desktop query the full API documentation in real time. It is read-only — it answers questions about the API but does not call it.
Server URL: https://docs.videogen.io/_mcp/server
To connect in Cursor, add this to your MCP configuration:
API MCP server
The API MCP server runs locally and executes real VideoGen API calls on your behalf, using your own API key. Point any MCP client at it and your agent can generate videos from scripts, produce images and voiceovers, upload files, export projects, and manage runs — every VideoGen endpoint is exposed as a tool. Long-running operations (workflows, media tools, exports) are handled by composite tools that start the operation and wait for the finished result by default.
The server communicates over stdio and reads your API key from the VIDEOGEN_API_KEY environment variable. Get a key from app.videogen.io/developers.
To connect in Cursor (or any MCP client), add this to your MCP configuration:
Your key stays on your machine — it is passed directly to the local server process and never sent anywhere except the VideoGen API.