Xai.Video (xai v0.1.0)

Copy Markdown View Source

Video generation (Imagine API) via gRPC.

Mirrors client.video in the official Python xai-sdk. The high-level functions automatically handle the deferred/poll pattern.

Summary

Functions

Extend a video

Generate a video.

Functions

extend(client, opts)

@spec extend(
  Xai.Client.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Extend a video

generate(client, opts)

@spec generate(
  Xai.Client.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Generate a video.

Example:

{:ok, video} = Xai.Video.generate(client,
  prompt: "A cat on a skateboard",
  model: "grok-imagine-video",
  duration: 5
)