java/resources/videos/methods/download_content/index.md +0 −67 deleted
File Deleted View Diff
1## Retrieve video content
2
3`HttpResponse videos().downloadContent(VideoDownloadContentParamsparams = VideoDownloadContentParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`
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- `VideoDownloadContentParams params`
14
15 - `Optional<String> videoId`
16
17 - `Optional<Variant> variant`
18
19 Which downloadable asset to return. Defaults to the MP4 video.
20
21 - `VIDEO("video")`
22
23 - `THUMBNAIL("thumbnail")`
24
25 - `SPRITESHEET("spritesheet")`
26
27### Example
28
29```java
30package com.openai.example;
31
32import com.openai.client.OpenAIClient;
33import com.openai.client.okhttp.OpenAIOkHttpClient;
34import com.openai.core.http.HttpResponse;
35import com.openai.models.videos.VideoDownloadContentParams;
36
37public final class Main {
38 private Main() {}
39
40 public static void main(String[] args) {
41 OpenAIClient client = OpenAIOkHttpClient.fromEnv();
42
43 HttpResponse response = client.videos().downloadContent("video_123");
44 }
45}
46```
47
48### Example
49
50```java
51package com.openai.example;
52
53import com.openai.client.OpenAIClient;
54import com.openai.client.okhttp.OpenAIOkHttpClient;
55import com.openai.core.http.HttpResponse;
56import com.openai.models.videos.VideoDownloadContentParams;
57
58public final class Main {
59 private Main() {}
60
61 public static void main(String[] args) {
62 OpenAIClient client = OpenAIOkHttpClient.fromEnv();
63
64 HttpResponse response = client.videos().downloadContent("video_123");
65 }
66}
67```