OpenAI Agents SDK

Drop VideoGen tools into any OpenAI Agents SDK agent.

The official OpenAI Agents SDK tool packages for VideoGen. One call returns the full set of VideoGen tools in Agents SDK format, ready to pass to an Agent. Your agent can turn a script into a finished narrated video, plus generate standalone images, video clips, voiceovers, sound effects, music, and talking-head avatars.

There are two packages — one for each official Agents SDK:

Every tool wraps the official VideoGen SDK (videogen / @videogen/sdk) and runs as the team that owns your API key.

Setup

Get an API key from app.videogen.io/developers and set it as VIDEOGEN_API_KEY:

$export VIDEOGEN_API_KEY="sk_videogen_live_..."

Python

$pip install openai-agents-videogen
1import asyncio
2
3from agents import Agent, Runner
4from openai_agents_videogen import create_videogen_tools
5
6agent = Agent(
7 name="Video Producer",
8 instructions="You produce short narrated videos with VideoGen when asked.",
9 tools=create_videogen_tools(),
10)
11
12
13async def main() -> None:
14 result = await Runner.run(
15 agent,
16 "Make a short narrated video explaining why staying hydrated matters.",
17 )
18 print(result.final_output)
19
20
21asyncio.run(main())

TypeScript

$npm install @videogen/openai-agents @openai/agents

@openai/agents is a peer dependency.

1import { Agent, run } from "@openai/agents";
2import { createVideogenTools } from "@videogen/openai-agents";
3
4const agent = new Agent({
5 name: "Video Producer",
6 instructions: "You produce short narrated videos with VideoGen when asked.",
7 tools: createVideogenTools(),
8});
9
10const result = await run(
11 agent,
12 "Make a short narrated video explaining why staying hydrated matters.",
13);
14
15console.log(result.finalOutput);

By default each tool blocks until the workflow run or tool execution reaches a terminal state (succeeded, failed, or cancelled) and returns the finished result.

Options

create_videogen_tools / createVideogenTools reads VIDEOGEN_API_KEY from the environment by default. Pass options to override:

OptionDefaultDescription
clientA pre-configured VideoGen client.
api_key / apiKeyVIDEOGEN_API_KEYAPI key used to build a client when client is omitted.
base_url / baseUrlVIDEOGEN_BASE_URL or https://api.videogen.ioOverride the API base URL.
waittrueBlock until the operation finishes and return the result. Set false to return immediately with the run/execution id.
poll_interval_ms / pollIntervalMsHow often to poll while waiting, in milliseconds.
timeout_ms / timeoutMsMaximum time to wait for a terminal state before giving up, in milliseconds.
includeall toolsRestrict the returned tool set to these tool names.

When wait is false, use the matching get_* tool (e.g. get_workflow_run, get_tool_execution) to poll the returned id yourself.

Tools

Both packages return the same 34 tools with snake_case names (e.g. script_to_video, generate_image); parameters match the corresponding VideoGen SDK method.

  • Workflows (end-to-end video): script_to_video, voiceover_to_video, slideshow_to_video, storyboard_to_video, list_workflow_runs, get_workflow_run, cancel_workflow_run
  • Media generation: generate_image, generate_video_clip, text_to_speech, generate_sound_effect, generate_music, generate_avatar, vectorize_image, remove_image_background, remove_video_background, upscale_image, upscale_video, image_3d_effect, list_tool_executions, get_tool_execution, cancel_tool_execution
  • Projects: list_projects, get_project, export_project, remix_project, list_project_remix_actions
  • Files: upload_file, get_file, list_files
  • Resources & account: list_avatar_presenters, list_tts_voices, list_languages, get_me

For the full parameter list of each tool, see the MCP server reference — the same tools are exposed there — and the REST API reference.