Skip to content
Primary navigation

Videos

resource openai_video

required Expand Collapse
prompt: String

Text prompt that describes the video to generate.

optional Expand Collapse
input_reference?: String

Optional reference asset upload or reference object that guides generation.

model?: String

The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults to sora-2.

seconds?: String

Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds.

size?: String

Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280.

video?: String

Reference to the completed video to edit.

computed Expand Collapse
id: String

Unique identifier for the video job.

completed_at: Int64

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

created_at: Int64

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

expires_at: Int64

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

object: String

The object type, which is always video.

progress: Int64

Approximate completion percentage for the generation task.

remixed_from_video_id: String

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

status: String

Current lifecycle status of the video job.

error: Attributes

Error payload that explains why generation failed, if applicable.

code: String

A machine-readable error code that was returned.

message: String

A human-readable description of the error that was returned.

openai_video

resource "openai_video" "example_video" {
  prompt = "x"
  input_reference = "Example data"
  model = "string"
  seconds = "4"
  size = "720x1280"
}

data openai_video

optional Expand Collapse
video_id?: String
find_one_by?: Attributes
order?: String

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

computed Expand Collapse
id: String
completed_at: Int64

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

created_at: Int64

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

expires_at: Int64

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

model: String

The video generation model that produced the job.

object: String

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.

remixed_from_video_id: String

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

seconds: String

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

size: String

The resolution of the generated video.

status: String

Current lifecycle status of the video job.

error: Attributes

Error payload that explains why generation failed, if applicable.

code: String

A machine-readable error code that was returned.

message: String

A human-readable description of the error that was returned.

openai_video

data "openai_video" "example_video" {
  video_id = "video_123"
}

data openai_videos

optional Expand Collapse
order?: String

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

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
items: List[Attributes]

The items returned by the data source

id: String

Unique identifier for the video job.

completed_at: Int64

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

created_at: Int64

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

error: Attributes

Error payload that explains why generation failed, if applicable.

code: String

A machine-readable error code that was returned.

message: String

A human-readable description of the error that was returned.

expires_at: Int64

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

model: String

The video generation model that produced the job.

object: String

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.

remixed_from_video_id: String

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

seconds: String

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

size: String

The resolution of the generated video.

status: String

Current lifecycle status of the video job.

openai_videos

data "openai_videos" "example_videos" {
  order = "asc"
}