PopNowDocs API
Contenu principal

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

OptionUSD
480p$0.028 par seconde produite
720p$0.051 par seconde produite
1080p$0.09 par seconde produite

Paramètres

ChampTypeValeur par défautValeurs admisesRôle
promptObligatoirestring—jusqu’à 4 096 caractèresDescribe the scene, the motion and any spoken line in quotes.
aspect_ratioFacultatifstring16:916:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3Frame shape of the video.
resolutionFacultatifstring480p480p, 720p, 1080pOutput height tier. Higher tiers cost more per second.
duration_secondsFacultatifinteger6de 1 à 15Length of the video in whole seconds, 1 to 15.
generate_audioFacultatifbooleantrue—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.

POST /api/v1/jobs/createTask
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.

GET /api/v1/jobs/recordInfo
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

OptionUSD
480p$0.028 par seconde produite
720p$0.051 par seconde produite
1080p$0.09 par seconde produite

Paramètres

ChampTypeValeur par défautValeurs admisesRôle
promptObligatoirestring—jusqu’à 4 096 caractèresDescribe how the scene moves from the first frame. Write @image1 to point at the reference image.
image_urlObligatoirestring (uri)——First frame of the video: JPEG, PNG or WebP up to 20 MB.
last_image_urlFacultatifstring (uri)——Optional last frame. Leave it empty when loop is on.
reference_image_urlsFacultatifarray<string (uri)>—jusqu’à 1 élémentsOptional reference image (one) the prompt can name as @image1. Only 480p and 720p accept it.
aspect_ratioFacultatifstringautoauto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3Frame shape. auto follows the first frame.
keyframesFacultatifarray<object>[]jusqu’à 4 élémentsUp to four in-between frames, each with the second at which the video should pass through it.
loopFacultatifbooleanfalse—End on the same frame as the first one so the clip can loop. Do not combine it with a last frame.
resolutionFacultatifstring480p480p, 720p, 1080pOutput height tier. Higher tiers cost more per second.
duration_secondsFacultatifinteger6de 1 à 15Length of the video in whole seconds, 1 to 15.
generate_audioFacultatifbooleantrue—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.

POST /api/v1/jobs/createTask?wait=60
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.

GET /api/v1/jobs/recordInfo
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

OptionUSD
480p$0.09 par seconde produite
720p$0.157 par seconde produite

Paramètres

ChampTypeValeur par défautValeurs admisesRôle
promptObligatoirestring—jusqu’à 4 096 caractèresDescribe the scene and name the references as @image1, @image2 and so on, in upload order.
reference_image_urlsObligatoirearray<string (uri)>—jusqu’à 7 élémentsOne to seven reference images (people, objects, places). Each image adds a small charge.
aspect_ratioFacultatifstring16:916:9, 9:16, 1:1, 3:2, 2:3Frame shape of the video.
resolutionFacultatifstring480p480p, 720pOutput height tier. Higher tiers cost more per second.
duration_secondsFacultatifinteger6de 1 à 15Length 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.

POST /api/v1/jobs/createTask
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.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Pour aller plus loin

Sur cette page