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

# Grok Imagine 1.5 Videogenerierung

>  - Asynchroner Verarbeitungsmodus, gibt eine Task-ID für nachfolgende Abfragen zurück
- Hochwertige KI-Videogenerierung, unterstützt Text-to-Video und Image-to-Video
- Flexible Optionen für Seitenverhältnis und Qualität für verschiedene kreative Anforderungen 

<Info>
  **Hinweis zur Modellnamen-Kompatibilität**: Diese Schnittstelle unterstützt auch den Alias `grok-imagine-1.5-video-ext`, der `grok-imagine-1.5-video-apimart` entspricht. Beide sind austauschbar und liefern identische Ergebnisse.
</Info>

<RequestExample>
  ```bash cURL theme={null}
  # model kann "grok-imagine-1.5-video-apimart" sein, alternativ auch der Alias "grok-imagine-1.5-video-ext"
  curl --request POST \
    --url https://api.apimart.ai/v1/videos/generations \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "grok-imagine-1.5-video-apimart",
      "prompt": "A dog running on the beach, sunny weather, slow motion",
      "size": "16:9",
      "duration": 6,
      "quality": "720p"
    }'
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.apimart.ai/v1/videos/generations"

  payload = {
      "model": "grok-imagine-1.5-video-apimart",
      "prompt": "A dog running on the beach, sunny weather, slow motion",
      "size": "16:9",
      "duration": 6,
      "quality": "720p"
  }

  headers = {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
  }

  response = requests.post(url, json=payload, headers=headers)

  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const url = "https://api.apimart.ai/v1/videos/generations";

  const payload = {
    model: "grok-imagine-1.5-video-apimart",
    prompt: "A dog running on the beach, sunny weather, slow motion",
    size: "16:9",
    duration: 6,
    quality: "720p"
  };

  const headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
  };

  fetch(url, {
    method: "POST",
    headers: headers,
    body: JSON.stringify(payload)
  })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "code": 200,
    "data": [
      {
        "task_id": "task_01JNXXXXXXXXXXXXXXXXXX",
        "status": "submitted"
      }
    ]
  }
  ```

  ```json 400 theme={null}
  {
    "error": {
      "code": 400,
      "message": "Invalid request parameters",
      "type": "invalid_request_error"
    }
  }
  ```

  ```json 401 theme={null}
  {
    "error": {
      "code": 401,
      "message": "Authentication failed, please check your API key",
      "type": "authentication_error"
    }
  }
  ```

  ```json 402 theme={null}
  {
    "error": {
      "code": 402,
      "message": "Insufficient balance, please top up and try again",
      "type": "payment_required"
    }
  }
  ```

  ```json 403 theme={null}
  {
    "error": {
      "code": 403,
      "message": "Access forbidden, you do not have permission to access this resource",
      "type": "permission_error"
    }
  }
  ```

  ```json 429 theme={null}
  {
    "error": {
      "code": 429,
      "message": "Too many requests, please try again later",
      "type": "rate_limit_error"
    }
  }
  ```

  ```json 500 theme={null}
  {
    "error": {
      "code": 500,
      "message": "Internal server error, please try again later",
      "type": "server_error"
    }
  }
  ```

  ```json 502 theme={null}
  {
    "error": {
      "code": 502,
      "message": "Bad gateway, server temporarily unavailable",
      "type": "bad_gateway"
    }
  }
  ```
</ResponseExample>

## Autorisierungen

<ParamField header="Authorization" type="string" required>
  Alle APIs erfordern eine Authentifizierung per Bearer Token

  API-Schlüssel abrufen:

  Besuchen Sie die [Seite zur API-Schlüsselverwaltung](https://apimart.ai/keys), um Ihren API-Schlüssel zu erhalten

  Fügen Sie ihn dem Anfrage-Header hinzu:

  ```
  Authorization: Bearer YOUR_API_KEY
  ```
</ParamField>

## Anfrageparameter

<ParamField body="model" type="string" default="grok-imagine-1.5-video-apimart" required>
  Name des Videogenerierungsmodells

  Unterstützte Modelle:

  * `grok-imagine-1.5-video-apimart` — Grok-Videogenerierung (kompatibler Alias `grok-imagine-1.5-video-ext`)

  Beispiel: `"grok-imagine-1.5-video-apimart"`

  <Note>
    Zur Kompatibilität mit älteren Aufrufen kann der Alias `grok-imagine-1.5-video-ext` (entspricht `grok-imagine-1.5-video-apimart`) weiterhin verwendet werden.
  </Note>
</ParamField>

<ParamField body="prompt" type="string" required>
  Beschreibung des Videoinhalts, unterstützt mehrere Sprachen
</ParamField>

<ParamField body="size" type="string" default="16:9">
  Videogröße

  Optionen:

  * `16:9` — Querformat (Standard)
  * `9:16` — Hochformat
  * `1:1` — Quadrat
  * `3:2` — Querformat
  * `2:3` — Hochformat
</ParamField>

<ParamField body="duration" type="integer" default={6}>
  Videodauer (Sekunden)

  Bereich: 6–30 (mindestens 6 Sekunden, maximal 30 Sekunden)

  **⚠️ Hinweis:** Muss eine einfache Zahl sein (z. B. `6`), keine Anführungszeichen, sonst tritt ein Fehler auf
</ParamField>

<ParamField body="quality" type="string" default="480p">
  Videoqualität

  Optionen:

  * `480p` — Standardauflösung (Standard)
  * `720p` — Hohe Auflösung
</ParamField>

<ParamField body="image_urls" type="string[]">
  Liste der Referenzbild-URLs

  **Einschränkungen:**

  * Maximal 7 Bilder
  * Müssen öffentlich zugängliche URLs sein
  * Base64-Format wird nicht unterstützt

  <Tip>Nach dem Hochladen eines Referenzbildes wird das Seitenverhältnis automatisch an das Seitenverhältnis des Referenzbildes angepasst.</Tip>
</ParamField>

## Antwort

<ResponseField name="code" type="integer">
  Statuscode der Antwort
</ResponseField>

<ResponseField name="data" type="object[]">
  Array der Antwortdaten

  <Expandable title="Eigenschaften">
    <ResponseField name="task_id" type="string">
      Eindeutige Task-ID
    </ResponseField>

    <ResponseField name="status" type="string">
      Task-Status

      * `submitted` — eingereicht
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  **Aufgabenergebnis abfragen**

  Die Videogenerierung ist eine asynchrone Aufgabe. Nach der Einreichung wird eine `task_id` zurückgegeben. Verwenden Sie den Endpunkt [Aufgabenstatus abrufen](/de/api-reference/tasks/status), um Fortschritt und Ergebnis abzufragen.
</Note>

## Anwendungsfälle

### Fall 1: Text-zu-Video

```json theme={null}
{
  "model": "grok-imagine-1.5-video-apimart",
  "prompt": "A dog running on the beach, sunny weather, slow motion",
  "size": "16:9",
  "duration": 6
}
```

### Fall 2: Bild-zu-Video

```json theme={null}
{
  "model": "grok-imagine-1.5-video-apimart",
  "prompt": "Bring the scene to life with natural dynamic effects",
  "image_urls": ["https://example.com/start.png"],
  "size": "16:9",
  "duration": 10,
  "quality": "720p"
}
```
