Video model API

Grok Imagine API

Generate videos using Grok-imagine-video (often referred to as Grok Imagine) which is an AI video generation model from xAI that creates short dynamic videos (around 6–10 seconds at 720p HD) from text prompts or static images, with synced audio (dialogue, ambience, music). It’s built into the Grok ecosystem and designed for quick, creative short-form content generation.

Model id
grok-imagine
Takes
Text (required)
Makes
Video
Endpoint
POST /api/v1/run
Made by
xAI
Mode
Async (job polling)

Call Grok Imagine

Base URL https://payload.rentprompts.com/api/v1. Replace the placeholder with your key.

Model grok-imagine

POST /api/v1/runasync · poll /v1/jobs/:id

curl https://payload.rentprompts.com/api/v1/run \
  -H "Authorization: Bearer rp_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "grok-imagine",
  "prompt": "A slow drone shot over a misty pine forest"
}'

# Async models answer HTTP 202 with a job. Poll it until status is
# "succeeded" (output.url / output.urls) or "failed" (error):
curl https://payload.rentprompts.com/api/v1/jobs/JOB_ID \
  -H "Authorization: Bearer rp_live_YOUR_KEY"

Replace rp_live_YOUR_KEY with your key, ideally via the RENTPROMPTS_API_KEY environment variable. Keys are shown only once, so they are never filled in here. Get your API key →

What a typical call costs

Worked out from Grok Imagine's published price (6 J / second). You pay only for successful results, from your Joule balance.
  • 5 seconds of output30 Joules
  • 10 seconds of output60 Joules

Send requests to POST /api/v1/run. Grok Imagine runs asynchronously: the request answers HTTP 202 with a job, and you poll GET /api/v1/jobs/{id} until the result is ready.

Settings

Optional parameters this model accepts (pass them in settings on /v1/run, or as top-level fields where OpenAI defines them).
NameTypeDefaultRange / options
aspect_ratioselect——
durationinteger51 – 15
Grok Imagine API — Pricing & Code Examples | RentPrompts