> ## Documentation Index
> Fetch the complete documentation index at: https://docs.varios-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# xAI Imagine Video

> Der Konnektor erzeugt Videos über die xAI Video-API (async Submit und Poll), speichert MP4 als Flow-Ressource und hängt sie an die Tool-Nachricht an.

## Optionen

<ParamField body="model" type="string" required>
  xAI-Modell für Videogenerierung (z. B. `grok-imagine-video`).
</ParamField>

<ParamField body="credential" type="string" required>
  Verweis auf gespeicherte Credentials. In den Parametern `apiKey` oder `xaiApiKey` für Bearer-Auth gegen `https://api.x.ai/v1/`. Siehe [xAI Video generations](https://docs.x.ai/docs/guides/video-generations).
</ParamField>

<ParamField body="endpointUrl" type="string">
  Optionale Basis-URL. Wenn leer oder nicht gesetzt: Standard `https://api.x.ai/v1`.
</ParamField>

<ParamField body="costs" type="number">
  Optionaler fester Kostensatz pro erfolgreichem Aufruf.
</ParamField>

## Argumente

<ParamField body="prompt" type="string" required>
  Beschreibung der gewünschten Szene.
</ParamField>

<ParamField body="duration" type="integer">
  Videolänge in Sekunden (1–15), Standard 8.
</ParamField>

<ParamField body="aspect_ratio" type="string">
  `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`; Standard `16:9`.
</ParamField>

<ParamField body="resolution" type="string">
  `480p` oder `720p`; Standard `720p`.
</ParamField>

<ParamField body="lastImagesCount" type="integer">
  Optional: Anzahl der letzten Chat-Bilder (max. 3), die als Start-/Referenzbild (`image`, Data-URL) mitgeschickt werden.
</ParamField>

## PromptFunction

```
\Avency\BotAPI\Service\Adapter\XaiImagineVideo::execute
```
