Référence API de Grok Imagine Video 1.5
Clips de 1 à 15 secondes avec son et dialogues.
Une seule clé API PopNow suffit pour appeler Grok Imagine Video 1.5 depuis votre code. Vous trouverez ici les identifiants de modèle à envoyer, chaque champ d’entrée accepté, le coût d’une requête en USD et une requête à coller telle quelle dans un terminal.
Les descriptions des paramètres proviennent du schéma d’entrée du modèle et ne sont disponibles qu’en anglais.
En bref
- Éditeur
- xAI
- Résultat
- Vidéo
- À partir de
- $0.028 USD par seconde produite
- Durée habituelle
- environ 34 s
Les prix sont affichés en USD et les frais sont déduits de votre solde PopNow. Le montant maximal est réservé à la réception de la tâche, puis la consommation réelle est facturée à la fin et le solde libéré. Les tâches en échec ne sont pas facturées. Obtenez un devis exact avant de lancer avec POST /api/v1/jobs/quote.
Créer une vidéo
xai/grok-imagine-video-1.5/text-to-video
Prix
| Option | USD |
|---|---|
480p | $0.028 par seconde produite |
720p | $0.051 par seconde produite |
1080p | $0.09 par seconde produite |
Paramètres
| Champ | Type | Valeur par défaut | Valeurs admises | Rôle |
|---|---|---|---|---|
promptObligatoire | string | — | jusqu’à 4 096 caractères | Describe the scene, the motion and any spoken line in quotes. |
aspect_ratioFacultatif | string | 16:9 | 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 | Frame shape of the video. |
resolutionFacultatif | string | 480p | 480p, 720p, 1080p | Output height tier. Higher tiers cost more per second. |
duration_secondsFacultatif | integer | 6 | de 1 à 15 | Length of the video in whole seconds, 1 to 15. |
generate_audioFacultatif | boolean | true | — | Generate a matching soundtrack with the video. Turning it off returns a silent clip at the same price. |
Exemple de requête
Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "xai/grok-imagine-video-1.5/text-to-video",
"input": {
"prompt": "A paper boat drifts down a rain-soaked street at dusk, neon signs reflecting in the water, slow tracking shot at ground level",
"duration_seconds": 6,
"resolution": "480p"
}
}'La réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Image vers vidéo
xai/grok-imagine-video-1.5/image-to-video
Prix
| Option | USD |
|---|---|
480p | $0.028 par seconde produite |
720p | $0.051 par seconde produite |
1080p | $0.09 par seconde produite |
Paramètres
| Champ | Type | Valeur par défaut | Valeurs admises | Rôle |
|---|---|---|---|---|
promptObligatoire | string | — | jusqu’à 4 096 caractères | Describe how the scene moves from the first frame. Write @image1 to point at the reference image. |
image_urlObligatoire | string (uri) | — | — | First frame of the video: JPEG, PNG or WebP up to 20 MB. |
last_image_urlFacultatif | string (uri) | — | — | Optional last frame. Leave it empty when loop is on. |
reference_image_urlsFacultatif | array<string (uri)> | — | jusqu’à 1 éléments | Optional reference image (one) the prompt can name as @image1. Only 480p and 720p accept it. |
aspect_ratioFacultatif | string | auto | auto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 | Frame shape. auto follows the first frame. |
keyframesFacultatif | array<object> | [] | jusqu’à 4 éléments | Up to four in-between frames, each with the second at which the video should pass through it. |
loopFacultatif | boolean | false | — | End on the same frame as the first one so the clip can loop. Do not combine it with a last frame. |
resolutionFacultatif | string | 480p | 480p, 720p, 1080p | Output height tier. Higher tiers cost more per second. |
duration_secondsFacultatif | integer | 6 | de 1 à 15 | Length of the video in whole seconds, 1 to 15. |
generate_audioFacultatif | boolean | true | — | Generate a matching soundtrack with the video. Turning it off returns a silent clip at the same price. |
Exemple de requête
Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.
L’exemple utilise des fichiers d’exemple PopNow dans image_url. Remplacez-les par vos propres liens HTTPS publics, fichiers envoyés ou ressources enregistrées.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "xai/grok-imagine-video-1.5/image-to-video",
"input": {
"prompt": "He lands softly on the rooftop, laughs and turns toward the camera while the balloons sway in the evening breeze; slow push-in",
"image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
"duration_seconds": 6,
"resolution": "480p"
}
}'La réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Références vers vidéo
xai/grok-imagine-video-1.5/reference-to-video
Prix
| Option | USD |
|---|---|
480p | $0.09 par seconde produite |
720p | $0.157 par seconde produite |
Paramètres
| Champ | Type | Valeur par défaut | Valeurs admises | Rôle |
|---|---|---|---|---|
promptObligatoire | string | — | jusqu’à 4 096 caractères | Describe the scene and name the references as @image1, @image2 and so on, in upload order. |
reference_image_urlsObligatoire | array<string (uri)> | — | jusqu’à 7 éléments | One to seven reference images (people, objects, places). Each image adds a small charge. |
aspect_ratioFacultatif | string | 16:9 | 16:9, 9:16, 1:1, 3:2, 2:3 | Frame shape of the video. |
resolutionFacultatif | string | 480p | 480p, 720p | Output height tier. Higher tiers cost more per second. |
duration_secondsFacultatif | integer | 6 | de 1 à 15 | Length of the video in whole seconds, 1 to 15. |
Exemple de requête
Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.
L’exemple utilise des fichiers d’exemple PopNow dans reference_image_urls. Remplacez-les par vos propres liens HTTPS publics, fichiers envoyés ou ressources enregistrées.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "xai/grok-imagine-video-1.5/reference-to-video",
"input": {
"prompt": "The man from the reference image jogs across a sunlit rooftop at golden hour and smiles at the camera; smooth tracking shot",
"reference_image_urls": [
"https://media.popnow.ai/influencer/examples/ava.webp"
],
"duration_seconds": 6,
"resolution": "480p"
}
}'La réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
