download

public CompletableFuture<Void> download(String fileName, String downloadPath, DownloadFileConfig config)

Asynchronously downloads a file from the GenAI API to the provided path.

Return

A future that resolves to the downloaded file.

Parameters

fileName

The name of the file to download.

downloadPath

The path to download the file to.

config

The configuration for the download.


public CompletableFuture<Void> download(Video video, String downloadPath, DownloadFileConfig config)

Asynchronously downloads a video from the GenAI API to the provided path.

Return

A future that resolves to the downloaded video.

Parameters

video

The video to download.

downloadPath

The path to download the video to.

config

The configuration for the download.


public CompletableFuture<Void> download(GeneratedVideo video, String downloadPath, DownloadFileConfig config)

Asynchronously downloads a generated video from the GenAI API to the provided path.

Return

A future that resolves to the downloaded video.

Parameters

video

The generated video to download.

downloadPath

The path to download the video to.

config

The configuration for the download.


public CompletableFuture<Void> download(File file, String downloadPath, DownloadFileConfig config)

Asynchronously downloads a file from the GenAI API to the provided path.

Return

A future that resolves to the downloaded file.

Parameters

file

The file to download.

downloadPath

The path to download the file to.

config

The configuration for the download.