Request
Parameters
Required Parameters
The video generation model identifier. Supported value:
"sora-2".A text description of the video you want to generate.
Optional / Strict Parameters
The duration of the video clip in seconds. Must be a string. Supported
values:
"4", "8", "12".The output resolution formatted as
widthxheight. Supported values:
"720x1280", "1280x720", "1024x1792", "1792x1024".An optional image reference (URL or base64 data) used to guide generation for
Image-to-Video workflows.
Optional metadata attached to the request for tracking, analytics, user
identification, or application-specific context. Any valid JSON object is
supported.
Metadata Example
Get Video Status
ThePOST /v1/videos request returns a video job id. Use this id to poll the status of your generation job.
200 Response Example
The
status field indicates the current state of the video job. Possible values include "queued", "in_progress", and "completed". Poll this endpoint until status changes to "completed" before downloading the video.Download Video Content
Once the video job status is"completed", download the generated video bytes or a derived preview asset using this endpoint.
Streams the rendered video content for the specified video job.
Path Parameters
The unique identifier of the completed video job.
Common Errors to Avoid
Due to an exception mapping quirk, if you violate any of OpenAI’s parameter
validations (e.g., passing
"duration" instead of "seconds"), the proxy may
wrap the OpenAI 400 Bad Request inside a confusing
ContentPolicyViolationError.- Passing
durationinstead ofseconds: OpenAI expects"seconds". It does not recognize"duration". - Passing
secondsas an integer: You must pass"seconds": "4", not"seconds": 4. - Passing an unsupported
size: Using standard sizes like"1920x1080"will fail. You must use the specific crop ratios allowed by OpenAI (e.g.,"1280x720").
