Polling
The VideoGen API exposes poll endpoints for each async surface. Both SDKs ship helpers that loop until a terminal status is reached.
Workflow runs
After POST /v1/workflows/*, poll GET /v1/workflows/runs/{workflowRunId} until status is succeeded, failed, or cancelled, or use pollWorkflowRun / poll_workflow_run:
TypeScript
Python
Tool executions
Poll GET /v1/tools/executions/{toolExecutionId} until the status is succeeded, failed, or cancelled, or use pollExecutedTool / poll_executed_tool:
TypeScript
Python
cURL
The helper polls every 1.5 seconds (configurable via pollIntervalMs / poll_interval_ms) and returns once a terminal status is reached. Under the hood it’s a simple loop:
TypeScript
Python
When to use polling: good for scripts, CLI tools, or any situation where you can block and wait. For production systems, consider using webhooks instead.
Public preview
After POST /v1/files/{fileId}/enable-public-preview, poll GET /v1/files/{fileId} until staticPublicPreviewSource.url is ready (and publicPlaybackId for video/audio embeds), or use pollPublicPreview / poll_public_preview:
pollPublicPreview throws if isPublicPreviewEnabled is false — call enablePublicPreview first. Use waitForEmbedPlaybackId: false (or wait_for_embed_playback_id=False) when you only need the permanent direct URL (e.g. images).
Project exports
After POST /v1/projects/{projectId}/export, poll GET /v1/projects/{projectId}/exports/{exportId} until status is succeeded or failed, or use pollProjectExport / poll_project_export.
Each response includes progressPercentage (0-100) for the current attempt, so you can render a live progress bar while the export runs. It is always 100 once status is succeeded.