SPB Git

Repository Public

retrieve.md 3.9 KB 179 lines markdown

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.23## Retrieve a video45**get** `/videos/{video_id}`67Fetch the latest metadata for a generated video.89### Path Parameters1011- `video_id: string`1213### Returns1415- `Video object { id, completed_at, created_at, 10 more }`1617  Structured information describing a generated video job.1819  - `id: string`2021    Unique identifier for the video job.2223  - `completed_at: number or null`2425    Unix timestamp (seconds) for when the job completed, if finished.2627  - `created_at: number`2829    Unix timestamp (seconds) for when the job was created.3031  - `error: VideoCreateError or null`3233    Error payload that explains why generation failed, if applicable.3435    - `code: string`3637      A machine-readable error code that was returned.3839    - `message: string`4041      A human-readable description of the error that was returned.4243    - `misalignment: optional object { detailed_explanation, error_type, steer }`4445      - `detailed_explanation: optional string`4647        The public explanation for this block.4849      - `error_type: optional string or "potentially_unintended_data_transfer" or "potentially_unintended_data_access" or "potentially_unintended_destructive_activity" or "other"`5051        An optional classification; clients must accept additional values.5253        - `string`5455        - `SafetyAlertErrorType = "potentially_unintended_data_transfer" or "potentially_unintended_data_access" or "potentially_unintended_destructive_activity" or "other"`5657          An optional classification; clients must accept additional values.5859          - `"potentially_unintended_data_transfer"`6061          - `"potentially_unintended_data_access"`6263          - `"potentially_unintended_destructive_activity"`6465          - `"other"`6667      - `steer: optional object { message }`6869        An optional public continuation instruction.7071        - `message: string`7273          The public continuation instruction.7475  - `expires_at: number or null`7677    Unix timestamp (seconds) for when the downloadable assets expire, if set.7879  - `model: VideoModel`8081    The video generation model that produced the job.8283    - `string`8485    - `"sora-2" or "sora-2-pro" or "sora-2-2025-10-06" or 2 more`8687      - `"sora-2"`8889      - `"sora-2-pro"`9091      - `"sora-2-2025-10-06"`9293      - `"sora-2-pro-2025-10-06"`9495      - `"sora-2-2025-12-08"`9697  - `object: "video"`9899    The object type, which is always `video`.100101    - `"video"`102103  - `progress: number`104105    Approximate completion percentage for the generation task.106107  - `prompt: string or null`108109    The prompt that was used to generate the video.110111  - `remixed_from_video_id: string or null`112113    Identifier of the source video if this video is a remix.114115  - `seconds: string`116117    Duration of the generated clip in seconds. For extensions, this is the stitched total duration.118119  - `size: VideoSize`120121    The resolution of the generated video.122123    - `"720x1280"`124125    - `"1280x720"`126127    - `"1024x1792"`128129    - `"1792x1024"`130131  - `status: "queued" or "in_progress" or "completed" or "failed"`132133    Current lifecycle status of the video job.134135    - `"queued"`136137    - `"in_progress"`138139    - `"completed"`140141    - `"failed"`142143### Example144145```http146curl https://api.openai.com/v1/videos/$VIDEO_ID \147    -H "Authorization: Bearer $OPENAI_API_KEY"148```149150#### Response151152```json153{154  "id": "id",155  "completed_at": 0,156  "created_at": 0,157  "error": {158    "code": "code",159    "message": "message",160    "misalignment": {161      "detailed_explanation": "detailed_explanation",162      "error_type": "potentially_unintended_data_transfer",163      "steer": {164        "message": "message"165      }166    }167  },168  "expires_at": 0,169  "model": "sora-2",170  "object": "video",171  "progress": 0,172  "prompt": "prompt",173  "remixed_from_video_id": "remixed_from_video_id",174  "seconds": "string",175  "size": "720x1280",176  "status": "queued"177}178```179
Files main
Menu

Theme