ExBifrost.Api.Videos (ex_bifrost v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged Videos.

Summary

Functions

Delete a video generation job Deletes a video generation job and its associated assets. This operation cannot be undone.

Download video content Downloads the binary content of a generated video. The video must have a status of "completed" to be downloadable. Returns the raw video file (typically MP4 format).

Generate a video Creates a video generation job from a text prompt. This is an asynchronous operation that returns immediately with a job ID. Use the retrieve endpoint to check the status and get the video URL when generation is complete.

List video generation jobs Lists video generation jobs for a specific provider. Results are paginated and can be filtered using query parameters.

Remix a video Creates a new video generation job by remixing an existing video with a new prompt. The source video must have a status of "completed" to be remixed. Returns a new video generation job that can be polled for completion.

Retrieve a video generation job Retrieves the status and metadata for a video generation job. Use this endpoint to poll for completion status after creating a video generation job. When the status is "completed", the response will include a URL to download the video.

Functions

video_delete(connection, video_id, opts \\ [])

Delete a video generation job Deletes a video generation job and its associated assets. This operation cannot be undone.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • video_id (String.t): Video ID in format id:provider (e.g., video_abc123:openai)
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.VideoDelete200Response.t} on success
  • {:error, Tesla.Env.t} on failure

video_download(connection, video_id, opts \\ [])

@spec video_download(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, String.t()}
  | {:error, Tesla.Env.t()}

Download video content Downloads the binary content of a generated video. The video must have a status of "completed" to be downloadable. Returns the raw video file (typically MP4 format).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • video_id (String.t): Video ID in format id:provider (e.g., video_abc123:openai)
  • opts (keyword): Optional parameters
    • :variant (String.t): Variant of the video content to download (provider-specific)

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

video_generation(connection, video_generation_request, opts \\ [])

Generate a video Creates a video generation job from a text prompt. This is an asynchronous operation that returns immediately with a job ID. Use the retrieve endpoint to check the status and get the video URL when generation is complete.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • video_generation_request (VideoGenerationRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.VideoGeneration200Response.t} on success
  • {:error, Tesla.Env.t} on failure

video_list(connection, provider, opts \\ [])

List video generation jobs Lists video generation jobs for a specific provider. Results are paginated and can be filtered using query parameters.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • provider (String.t): Provider name (e.g., "openai", "gemini")
  • opts (keyword): Optional parameters
    • :after (String.t): Cursor for pagination - ID of the last item from the previous page
    • :limit (integer()): Maximum number of results to return
    • :order (String.t): Sort order by creation time

Returns

  • {:ok, ExBifrost.Model.VideoList200Response.t} on success
  • {:error, Tesla.Env.t} on failure

video_remix(connection, video_id, video_remix_request, opts \\ [])

Remix a video Creates a new video generation job by remixing an existing video with a new prompt. The source video must have a status of "completed" to be remixed. Returns a new video generation job that can be polled for completion.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • video_id (String.t): Video ID in format id:provider (e.g., video_abc123:openai)
  • video_remix_request (VideoRemixRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.VideoGeneration200Response.t} on success
  • {:error, Tesla.Env.t} on failure

video_retrieve(connection, video_id, opts \\ [])

Retrieve a video generation job Retrieves the status and metadata for a video generation job. Use this endpoint to poll for completion status after creating a video generation job. When the status is "completed", the response will include a URL to download the video.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • video_id (String.t): Video ID in format id:provider (e.g., video_abc123:openai)
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.VideoGeneration200Response.t} on success
  • {:error, Tesla.Env.t} on failure