Zum Hauptinhalt springen
POST
/
v1
/
videos
/
generations
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.0-video-apimart",
    "prompt": "A dog running on the beach, sunny weather, slow motion",
    "size": "16:9",
    "duration": 6,
    "quality": "720p"
  }'
{
  "code": 200,
  "data": {
    "id": "task_01JNXXXXXXXXXXXXXXXXXX",
    "status": "submitted",
    "progress": 0,
    "created": 1710000000,
    "type": "video"
  }
}

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.

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.0-video-apimart",
    "prompt": "A dog running on the beach, sunny weather, slow motion",
    "size": "16:9",
    "duration": 6,
    "quality": "720p"
  }'
{
  "code": 200,
  "data": {
    "id": "task_01JNXXXXXXXXXXXXXXXXXX",
    "status": "submitted",
    "progress": 0,
    "created": 1710000000,
    "type": "video"
  }
}

Autorisierungen

Authorization
string
erforderlich
Alle APIs erfordern eine Authentifizierung per Bearer TokenAPI-Schlüssel abrufen:Besuchen Sie die Seite zur API-Schlüsselverwaltung, um Ihren API-Schlüssel zu erhaltenFügen Sie ihn dem Anfrage-Header hinzu:
Authorization: Bearer YOUR_API_KEY

Anfrageparameter

model
string
Standard:"grok-imagine-1.0-video-apimart"
erforderlich
Name des VideogenerierungsmodellsUnterstützte Modelle:
  • grok-imagine-1.0-video-apimart — Grok-Videogenerierung
Beispiel: "grok-imagine-1.0-video-apimart"
prompt
string
erforderlich
Beschreibung des Videoinhalts, unterstützt mehrere Sprachen
size
string
Standard:"16:9"
VideogrößeOptionen:
  • 16:9 — Querformat (Standard)
  • 9:16 — Hochformat
  • 1:1 — Quadrat
  • 3:2 — Querformat
  • 2:3 — Hochformat
duration
integer
Standard: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
quality
string
Standard:"480p"
VideoqualitätOptionen:
  • 480p — Standardauflösung (Standard)
  • 720p — Hohe Auflösung
image_urls
string[]
Liste der Referenzbild-URLsEinschränkungen:
  • Maximal 7 Bilder
  • Müssen öffentlich zugängliche URLs sein
  • Base64-Format wird nicht unterstützt
Nach dem Hochladen eines Referenzbildes wird das Seitenverhältnis automatisch an das Seitenverhältnis des Referenzbildes angepasst.

Antwort

code
integer
Statuscode der Antwort
data
object
Datenobjekt der Antwort
Aufgabenergebnis abfragenDie Videogenerierung ist eine asynchrone Aufgabe. Nach der Einreichung wird eine id (d. h. task_id) zurückgegeben. Verwenden Sie den Endpunkt Aufgabenstatus abrufen, um Fortschritt und Ergebnis abzufragen.

Anwendungsfälle

Fall 1: Text-zu-Video

{
  "model": "grok-imagine-1.0-video-apimart",
  "prompt": "A dog running on the beach, sunny weather, slow motion",
  "size": "16:9",
  "duration": 6
}

Fall 2: Bild-zu-Video

{
  "model": "grok-imagine-1.0-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"
}