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
The fastest way to give an agent VideoGen is the MCP server. Point Cursor, Claude, or any MCP client at the hosted endpoint. For a custom agent in code, install @videogen/sdk or videogen and bind a function that starts a workflow, as in the examples below.
Automating with no code? Use the n8n community node (n8n-nodes-videogen) or the Pipedream components to start VideoGen workflows and wait for the exported MP4. Prefer ChatGPT or Postman? See ChatGPT (custom GPT) and Postman.
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 an API server that lets AI clients actually run VideoGen (generate videos, images, voiceovers, and more). The API server is available as a hosted remote server (recommended) or a local server.
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 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.
Get a key from app.videogen.io/api. The server comes in two transports that expose the same tools.
Remote (recommended)
The hosted server needs nothing to install or update. Point your client at the endpoint and send your key as a bearer token:
The hosted server is stateless: your key is read from the request header, forwarded only to the VideoGen API, and never stored.
Local (stdio)
The local server runs as a subprocess launched with npx and reads your key from the VIDEOGEN_API_KEY environment variable:
Your key stays on your machine. It is passed directly to the local server process and never sent anywhere except the VideoGen API.
See the MCP server reference for the full list of 37 tools, their parameters, the composite wait/pollIntervalMs/timeoutMs controls, and the MCP-tool-to-REST-endpoint mapping.