TypeScript
Official TypeScript SDK for the VideoGen API.
Install
Create a client
The client reads from the VIDEOGEN_API_KEY environment variable when no token is provided.
Generate a video from a script
Workflows turn a script into a finished video asynchronously. Use pollWorkflowRun to wait for the run:
Options
pollWorkflowRun accepts an optional third argument:
Run a standalone tool
All tool endpoints are asynchronous. Use pollExecutedTool to wait for the result:
pollExecutedTool accepts the same options as pollWorkflowRun (pollIntervalMs, timeoutMs, signal).