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

List videos

client.Videos.List(ctx, query) (*ConversationCursorPage[Video], error)
GET/videos

List recently generated videos for the current project.

ParametersExpand Collapse
query VideoListParams
After param.Field[string]Optional

Identifier for the last item from the previous pagination request

Limit param.Field[int64]Optional

Number of items to retrieve

minimum0
maximum100
Order param.Field[VideoListParamsOrder]Optional

Sort order of results by timestamp. Use asc for ascending order or desc for descending order.

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.

List videos

package main

import (
  "context"
  "fmt"

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

func main() {
  client := openai.NewClient()
  page, err := client.Videos.List(context.TODO(), openai.VideoListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "data": [
    {
      "id": "video_123",
      "object": "video",
      "model": "sora-2",
      "status": "completed"
    }
  ],
  "object": "list"
}
Returns Examples
{
  "data": [
    {
      "id": "video_123",
      "object": "video",
      "model": "sora-2",
      "status": "completed"
    }
  ],
  "object": "list"
}