Aspect Ratios, Resolutions, and Cost Management
On this page
Updated November 3, 2026 based on xAI video documentation: the API accepts nine aspect ratios (including
21:9and5:2) and three resolutions, with1080pdepending on the model; the three video models each have their own pricing; and thesizeparameter, with its pixel dimensions, presented by the older version does not appear in the API reference. Sources: Video Generation · Videos API · Pricing.
Optimize Your Video Generations
Knowing how to write a prompt isn’t enough to move to production. Two factors determine the rest: the technical framing of your outputs and cost control. A studio generating two hundred clips per month without a prototyping strategy pays several times the necessary price, and a team that discovers at the end of a project that its format doesn’t match the distribution channel has to start over. This lesson covers both points together, because they inform each other.
Choose the Right Aspect Ratio
The aspect_ratio parameter sets the proportions of the generated video. Nine values are accepted, and each corresponds to a specific distribution destination.
| Ratio | Proportions | Primary Use |
|---|---|---|
16:9 | Widescreen landscape | YouTube, presentations, websites |
9:16 | Portrait | TikTok, Stories, Reels |
1:1 | Square | Social posts, thumbnails |
4:3 | Classic landscape | Documents, slides |
3:4 | Classic portrait | Pinterest, posters |
3:2 | Photo landscape | Portfolios, galleries |
2:3 | Photo portrait | Posters, covers |
21:9 | Widescreen cinema | Cinematic shots |
5:2 | Banner | Web banners, headers |
In the absence of an explicit parameter, the API applies 16:9. This is a reasonable default for the web, but it becomes a trap as soon as you feed vertical formats: a campaign intended for Reels must declare 9:16 on every request, otherwise you will retrieve landscapes that will need cropping, with the loss of composition that implies. Two modes are exempt from this setting: in image-to-video, the output follows the ratio of the source image, and in editing, that of the source video.
Three Resolutions, Depending on the Model
The resolution parameter accepts three values. The default value, 480p, is intended for previews and drafts: the render is faster, making it an ideal testbed to validate a prompt before running it again at final quality. 720p corresponds to HD quality sufficient for the majority of web and mobile uses. 1080p, finally, gives you Full HD, but not on all models:
| Model | Maximum Resolution |
|---|---|
grok-imagine-video-1.5 | Native 1080p (720p in reference-to-video) |
grok-imagine-video-1.5-lite | 1080p, via upsampling from 720p |
grok-imagine-video | 720p |
Editing is not adjustable: the produced video keeps the resolution of the source, capped at 720p. And there is no finer setting than these steps: the API reference provides no pixel size parameter. If your distribution requires exact dimensions, choose the closest ratio and resolution, then crop in editing.
{
"model": "grok-imagine-video-1.5",
"prompt": "Your description",
"aspect_ratio": "16:9",
"resolution": "1080p",
"duration": 5
}
What Production Really Costs
The price is counted per second of generated video and depends on the model: $0.020 for grok-imagine-video-1.5-lite, $0.050 for grok-imagine-video, and $0.080 for grok-imagine-video-1.5. The progression is perfectly linear, which makes the budget predictable.
| Duration | 1.5-lite | grok-imagine-video | 1.5 |
|---|---|---|---|
| 1 second | $0.02 | $0.05 | $0.08 |
| 3 seconds | $0.06 | $0.15 | $0.24 |
| 5 seconds | $0.10 | $0.25 | $0.40 |
| 8 seconds (default) | $0.16 | $0.40 | $0.64 |
| 10 seconds | $0.20 | $0.50 | $0.80 |
| 15 seconds | $0.30 | $0.75 | $1.20 |
As of November 3, 2026, the xAI Models page displays a single price per second for each model, with no distinction for resolution, while the Video Overview page refers to prices “per resolution”: check the grid before committing a large batch.
The first optimization lever is the choice of model. xAI recommends grok-imagine-video-1.5-lite, four times cheaper than version 1.5, for simple videos, and grok-imagine-video-1.5 when you need reference images, voices, imposed images, or native 1080p; editing and extension, meanwhile, only work with grok-imagine-video. The second lever is the number of trials. Prototype systematically short: validate the direction of movement on two or three seconds before committing to a ten or fifteen second generation. Refine the prompt until it is right on the first try, since every regeneration pays full price. Run these trials in 480p: the displayed price does not change, but the shortened generation time lets you iterate faster. And keep the rate limit in mind when planning a batch.
This reasoning calculates easily. For a project of twenty five-second videos with grok-imagine-video, raw production comes to 20 × $0.25, or $5.00 ($2.00 with the lite version, $8.00 with 1.5). Assume two average iterations per video and you are at $10.00. Add a 50% experimentation margin and you present a budget of $15.00 that will hold. This is the order of magnitude to communicate to a client, not the theoretical cost of the first calculation.
Handling Rate Limits
API limits are counted in requests per second, per model, and grow with your team’s tier, itself fixed by your cumulative spending: at the entry tier, video models accept 10 requests per second, and the API responds 429 Too Many Requests beyond that (Rate limits). In common usage, this limit is rarely reached: since generation is asynchronous and long, you spend more time waiting than submitting. The risk appears on massive batches launched in parallel, where a few lines of code can saturate the quota in an instant. Spacing out submissions is enough to stay within bounds.
import asyncio
async def soumettre_lot(prompts, par_seconde=5):
"""Submits generations without exceeding the rate limit."""
for prompt in prompts:
await soumettre_video(prompt) # POST, without waiting for completion
await asyncio.sleep(1 / par_seconde)
For very large batches that can wait, the API Batch offers another path: its requests do not count against rate limits, and the three video models accept it (in certain regions only for grok-imagine-video and grok-imagine-video-1.5). Do not expect savings: the Batch discount applies only to text models, and video is billed at the standard rate. Processing is generally done within 24 hours, with no guarantee.
Deliver the Video Without Downloading It
Last useful setting in production: the output.upload_url parameter designates a signed URL (S3 or GCS presigned, Azure SAS) to which the video will be automatically sent by HTTP PUT, with the header Content-Type: video/mp4, as soon as it is generated.
{
"model": "grok-imagine-video",
"prompt": "Your description",
"duration": 5,
"output": {
"upload_url": "https://your-storage.com/upload/video.mp4"
}
}
In practice, this removes a whole step from your pipeline: no need to download each file then push it to your storage, the video arrives directly at its destination. On a flow of several dozen clips per day, that’s that much less transfer code and error handling to maintain.
Pricing recorded November 3, 2026 — prices evolve regularly: before any budget calculation, check the current grid on the official xAI models and pricing page.
Key Takeaways
- Nine aspect ratios are available,
16:9by default; in image-to-video, the output follows the image ratio - Three resolutions: 480p (default), 720p, and 1080p, the latter on 1.5 models only
- No parameter sets a pixel size: ratio and resolution suffice
- The price is linear, per second: $0.020, $0.050, or $0.080 depending on the model
- Prototype short, in 480p, with the cheapest model that suffices
output.upload_urlautomates delivery; the API Batch bypasses rate limits, with no discount on video