Skip to main content
Video generation uses asynchronous tasks. Save the gateway id after creation, query it with credentials in the same user/project scope, and download when complete. Do not substitute a private task ID from the provider dashboard. As of 2026-10-14, OpenAI’s official guide states that Sora 2 / the Videos API shut down on 2026-09-24. This page documents the compatibility endpoints retained by this project. Confirm an actually available channel or plugin supporting openai_video before use. The presence of a Sora plugin or SDK method does not establish upstream availability.

Task lifecycle

progress is a hint. A value of 100 does not replace status: completed. Retrieval may return a snapshot saved by background polling; frequent queries do not guarantee fresher data.

Python: create, resume, and download

Configure the Python SDK environment. API_MODEL must identify a video model your administrator has confirmed is available. Save as videos.py. The pinned SDK retains compatibility methods but may emit Sora deprecation notices. It targets your configured gateway and cannot restore a discontinued upstream. Run python videos.py create and save the returned id. Replace task_example below with that ID. Each create makes a new task: never put creation inside a polling loop.
wait queries at most 60 times with 5-second intervals by default. Each request also has a 120-second timeout, so this is not a five-minute wall-clock guarantee. Set --max-polls to 1–120 attempts. Reaching the limit, exiting, or a network failure does not cancel the server task; resume later with the same ID.

Image-to-video and Remix

The create endpoint accepts JSON or multipart, but input_reference, duration, and dimensions depend on the executing plugin. Upload a reference image in the multipart input_reference field and confirm supported encoding, dimensions, and size. Run python videos.py create --image /path/to/reference.png to upload the image to the configured gateway and upstream. A prompt alone requests text-to-video; an image reference is not a video upload for transcription. Use Remix with an existing task: python videos.py remix task_example. The original task’s channel and plugin must support it. The gateway resolves the original task and pins submission to its channel. The result is a new task submission summary: save the new id and query it. Remix is not universal across video plugins.

Download and recover

Download content returns bytes; HEAD inspects headers only. Use the gateway content endpoint with Bearer authentication. Never send the gateway key to arbitrary provider URLs, or put a long-lived API key into a browser <video> URL. This example accepts MP4 / octet-stream, caps downloads at 256 MiB, and never overwrites video.mp4; these are example constraints. A failure can leave a partial file. Remove that partial file or choose another output name before downloading again. Successful transfer does not mean media decoding was validated. Range support, cache headers, file size, and other content types depend on the source and can vary across plugins. Completed tasks do not guarantee permanent content retention. 410 means content is unavailable; 502 can indicate a proxy failure.

Compatibility boundaries

Legacy /v1/video/generations and /v1/videos have different response shapes; do not mix parsers. This guide uses /v1/videos. It does not promise support for SDK list, delete, extend, character, or separate edit endpoints, nor for webhooks or task cancellation. If submission times out without returning an ID, inspect request logs before creating again: another POST can duplicate work. Preserve IDs after retrieval/download failures and recover using the error guide. 简体中文 Related guide: Video understanding