# `Xai.Video`
[🔗](https://github.com/beamlab-xai/xai/blob/main/lib/xai/video.ex#L1)

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.

# `extend`

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

Extend a video

# `generate`

```elixir
@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
    )

---

*Consult [api-reference.md](api-reference.md) for complete listing*
