Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Retrieve video

client.Videos.Get(ctx, videoID) (*Video, error)
GET/videos/{video_id}

Fetch the latest metadata for a generated video.

ParametersExpand Collapse
videoID string
ReturnsExpand Collapse
type Video struct{…}

Structured information describing a generated video job.

ID string

Unique identifier for the video job.

CompletedAt int64

Unix timestamp (seconds) for when the job completed, if finished.

formatunixtime
CreatedAt int64

Unix timestamp (seconds) for when the job was created.

formatunixtime

Error payload that explains why generation failed, if applicable.

ExpiresAt int64

Unix timestamp (seconds) for when the downloadable assets expire, if set.

formatunixtime
Model VideoModel

The video generation model that produced the job.

Object Video

The object type, which is always video.

Progress int64

Approximate completion percentage for the generation task.

Prompt string

The prompt that was used to generate the video.

RemixedFromVideoID string

Identifier of the source video if this video is a remix.

Seconds VideoSeconds

Duration of the generated clip in seconds. For extensions, this is the stitched total duration.

The resolution of the generated video.

Status VideoStatus

Current lifecycle status of the video job.

Retrieve video

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
)

func main() {
  client := openai.NewClient()
  video, err := client.Videos.Get(context.TODO(), "video_123")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", video.ID)
}
{
  "id": "id",
  "completed_at": 0,
  "created_at": 0,
  "error": {
    "code": "code",
    "message": "message"
  },
  "expires_at": 0,
  "model": "sora-2",
  "object": "video",
  "progress": 0,
  "prompt": "prompt",
  "remixed_from_video_id": "remixed_from_video_id",
  "seconds": "4",
  "size": "720x1280",
  "status": "queued"
}
Returns Examples
{
  "id": "id",
  "completed_at": 0,
  "created_at": 0,
  "error": {
    "code": "code",
    "message": "message"
  },
  "expires_at": 0,
  "model": "sora-2",
  "object": "video",
  "progress": 0,
  "prompt": "prompt",
  "remixed_from_video_id": "remixed_from_video_id",
  "seconds": "4",
  "size": "720x1280",
  "status": "queued"
}