go/resources/videos/methods/download_content/index.md +0 −88 deleted
File Deleted View Diff
1## Retrieve video content
2
3`client.Videos.DownloadContent(ctx, videoID, query) (*Response, error)`
4
5**get** `/videos/{video_id}/content`
6
7Download the generated video bytes or a derived preview asset.
8
9Streams the rendered video content for the specified video job.
10
11### Parameters
12
13- `videoID string`
14
15- `query VideoDownloadContentParams`
16
17 - `Variant param.Field[VideoDownloadContentParamsVariant]`
18
19 Which downloadable asset to return. Defaults to the MP4 video.
20
21 - `const VideoDownloadContentParamsVariantVideo VideoDownloadContentParamsVariant = "video"`
22
23 - `const VideoDownloadContentParamsVariantThumbnail VideoDownloadContentParamsVariant = "thumbnail"`
24
25 - `const VideoDownloadContentParamsVariantSpritesheet VideoDownloadContentParamsVariant = "spritesheet"`
26
27### Returns
28
29- `type VideoDownloadContentResponse interface{…}`
30
31### Example
32
33```go
34package main
35
36import (
37 "context"
38 "fmt"
39
40 "github.com/openai/openai-go"
41 "github.com/openai/openai-go/option"
42)
43
44func main() {
45 client := openai.NewClient(
46 option.WithAPIKey("My API Key"),
47 )
48 response, err := client.Videos.DownloadContent(
49 context.TODO(),
50 "video_123",
51 openai.VideoDownloadContentParams{
52
53 },
54 )
55 if err != nil {
56 panic(err.Error())
57 }
58 fmt.Printf("%+v\n", response)
59}
60```
61
62### Example
63
64```go
65package main
66
67import (
68 "context"
69 "fmt"
70
71 "github.com/openai/openai-go"
72)
73
74func main() {
75 client := openai.NewClient()
76 response, err := client.Videos.DownloadContent(
77 context.TODO(),
78 "video_123",
79 openai.VideoDownloadContentParams{
80
81 },
82 )
83 if err != nil {
84 panic(err.Error())
85 }
86 fmt.Printf("%+v\n", response)
87}
88```