NAME
OpenAPI::Client::OpenAI::Path::videos - Documentation for the /videos path.
OPERATIONS
GET /videos
ListVideos
$client->list_videos({
body => { ... },
});
List recently generated videos for the current project.
Path/query parameters
limit(in query, optional, integer) - Number of items to retrieveorder(in query, optional, string) - Sort order of results by timestamp. Useascfor ascending order ordescfor descending order.after(in query, optional, string) - Identifier for the last item from the previous pagination request
Responses
200 - Success
Content-Type: application/json
Example:
{
"data" : [
{
"completed_at" : 0,
"created_at" : 0,
"error" : {
"code" : "string",
"message" : "string"
},
"expires_at" : 0,
"id" : "string",
"model" : "sora-2",
"object" : "video",
"progress" : 0,
"prompt" : "string",
"remixed_from_video_id" : "string",
"seconds" : "string",
"size" : "720x1280",
"status" : "queued"
}
],
"first_id" : "string",
"has_more" : false,
"last_id" : "string",
"object" : "list"
}
POST /videos
createVideo
$client->create_video({
body => { ... },
});
Create a new video generation job from a prompt and optional reference assets.
Responses
200 - Success
Content-Type: application/json
Example:
{
"completed_at" : 0,
"created_at" : 0,
"error" : {
"code" : "string",
"message" : "string"
},
"expires_at" : 0,
"id" : "string",
"model" : "sora-2",
"object" : "video",
"progress" : 0,
"prompt" : "string",
"remixed_from_video_id" : "string",
"seconds" : "string",
"size" : "720x1280",
"status" : "queued"
}
SCHEMAS
CreateVideoJsonBody
Properties:
input_reference(ImageRefParam-2) - Optional reference object that guides generation. Provide exactly one ofimage_urlorfile_id.See "ImageRefParam-2" below for shape.
model(VideoModel) - The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults tosora-2.See "VideoModel" below for shape.
prompt(string, required) - Text prompt that describes the video to generate.seconds(VideoSeconds) - Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds.See "VideoSeconds" below for shape.
size(VideoSize) - Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280.See "VideoSize" below for shape.
CreateVideoMultipartBody
Properties:
input_reference(oneOf)model(VideoModel) - The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults tosora-2.See "VideoModel" below for shape.
prompt(string, required) - Text prompt that describes the video to generate.seconds(VideoSeconds) - Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds.See "VideoSeconds" below for shape.
size(VideoSize) - Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280.See "VideoSize" below for shape.
ImageRefParam-2
Properties:
file_id(string)image_url(string) - A fully qualified URL or base64-encoded data URL.
VideoListResource
Properties:
data(array of VideoResource, required) - A list of itemsfirst_id(anyOf, required)has_more(boolean, required) - Whether there are more items available.last_id(anyOf, required)object(string, required) - The type of object returned, must belist.Allowed values: list
Default: list
VideoModel
See https://platform.openai.com/docs/api-reference for details.
VideoResource
Properties:
completed_at(anyOf, required)created_at(integer, required) - Unix timestamp (seconds) for when the job was created.error(anyOf, required)expires_at(anyOf, required)id(string, required) - Unique identifier for the video job.model(VideoModel, required) - The video generation model that produced the job.See "VideoModel" below for shape.
object(string, required) - The object type, which is alwaysvideo.Allowed values: video
Default: video
progress(integer, required) - Approximate completion percentage for the generation task.prompt(anyOf, required)remixed_from_video_id(anyOf, required)seconds(string, required) - Duration of the generated clip in seconds. For extensions, this is the stitched total duration.size(VideoSize, required) - The resolution of the generated video.See "VideoSize" below for shape.
status(VideoStatus, required) - Current lifecycle status of the video job.See "VideoStatus" below for shape.
VideoSeconds
See https://platform.openai.com/docs/api-reference for details.
VideoSize
See https://platform.openai.com/docs/api-reference for details.
VideoStatus
See https://platform.openai.com/docs/api-reference for details.
SEE ALSO
COPYRIGHT AND LICENSE
Copyright (C) 2023-2026 by Nelson Ferraz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.