Create an extension of a completed video.
client.Videos.Extend(ctx, body) (*Video, error)
POST/videos/extensions
Create an extension of a completed video.
package main
import (
"bytes"
"context"
"fmt"
"io"
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
)
func main() {
client := openai.NewClient(
option.WithAPIKey("My API Key"),
)
video, err := client.Videos.Extend(context.TODO(), openai.VideoExtendParams{
Prompt: "x",
Seconds: openai.VideoSeconds4,
Video: openai.VideoExtendParamsVideoUnion{
OfFile: io.Reader(bytes.NewBuffer([]byte("Example data"))),
},
})
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": "string",
"object": "video",
"progress": 0,
"prompt": "prompt",
"remixed_from_video_id": "remixed_from_video_id",
"seconds": "string",
"size": "720x1280",
"status": "queued"
}Returns Examples
{
"id": "id",
"completed_at": 0,
"created_at": 0,
"error": {
"code": "code",
"message": "message"
},
"expires_at": 0,
"model": "string",
"object": "video",
"progress": 0,
"prompt": "prompt",
"remixed_from_video_id": "remixed_from_video_id",
"seconds": "string",
"size": "720x1280",
"status": "queued"
}