Grok Imagine 1.5
xAI video model: clips up to 15 seconds from a description or your photos, up to 1080p.
Grok Imagine 1.5 is the new xAI video model. It films 1 to 15 second clips in 480p, 720p and 1080p from a description or your photos (up to 7). Strong motion, light and character acting.
You pay per second of the clip; each attached photo adds a small fee.
One model, grok-imagine-1.5 · ~2 min. The result follows the input fields (prompt, frames, references, video_mode, duration) — there are no separate «animate / edit» endpoints.
Features
nsfw_check— check before charge
Price
| Resolution | Price per second |
|---|---|
| 480p | $0.096 |
| 720p | $0.168 |
| 1080p | $0.3 |
- Price = per-second price × clip length, rounded up to $0.001. Charged when the task is created and fully refunded if it fails.
- Each attached photo adds $0.012.
Media limits
| Type | Limits |
|---|---|
| Images | up to 7; JPG / PNG / WebP; upload via files/upload — up to 30 MB per file |
Photos — public https or upload; video and audio — files/upload only.
How the task is shaped
| Fields | Mode |
|---|---|
prompt only | text → video |
image_urls | photos → video (up to 7) |
Upstream rejects aspect_ratio «auto» — text defaults to 16:9; with a photo the frame follows the photo.
Parameters (field input)
| Parameter | Description | Values (default in bold) |
|---|---|---|
prompt | What happens in the clip: scene, motion, camera, light, style | text, up to 8000 chars |
image_urls | Your photos (https): a single photo becomes the first frame | ["https://…"], up to 7 |
resolution | Video resolution | 480p · 720p · 1080p |
aspect_ratio | Aspect ratio | 16:9 · 9:16 · 1:1 · 4:3 · 3:4 · 3:2 · 2:3 |
duration | Video duration in seconds | 1 to 15 (default 8) |
nsfw_check | Content check: the description and photos are checked first; if not allowed, no task is created and nothing is charged | true false (default false) |
Examples
Prompt only
curl -X POST https://mixmedia.tech/api/v1/jobs/createTask \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"grok-imagine-1.5","input":{"prompt":"A drone flies over an autumn forest at sunrise, fog, cinematic","resolution":"480p","aspect_ratio":"16:9","duration":"8"}}'
import os, requests
r = requests.post(
"https://mixmedia.tech/api/v1/jobs/createTask",
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
json={
"model": "grok-imagine-1.5",
"input": {
"prompt": "A drone flies over an autumn forest at sunrise, fog, cinematic",
"resolution": "480p",
"aspect_ratio": "16:9",
"duration": "8"
}
},
)
print(r.json()) # {"code": 200, "data": {"taskId": "..."}}
const r = await fetch("https://mixmedia.tech/api/v1/jobs/createTask", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"model": "grok-imagine-1.5",
"input": {
"prompt": "A drone flies over an autumn forest at sunrise, fog, cinematic",
"resolution": "480p",
"aspect_ratio": "16:9",
"duration": "8"
}
}),
});
console.log(await r.json()); // { code: 200, data: { taskId: "..." } }
With a first frame
curl -X POST https://mixmedia.tech/api/v1/jobs/createTask \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"grok-imagine-1.5","input":{"prompt":"The character slowly turns to the camera, the wind moves the hair","image_urls":["https://mixmedia.tech/static/img/previews/gpt-t2i.jpg"],"resolution":"480p","duration":"8"}}'
import os, requests
r = requests.post(
"https://mixmedia.tech/api/v1/jobs/createTask",
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
json={
"model": "grok-imagine-1.5",
"input": {
"prompt": "The character slowly turns to the camera, the wind moves the hair",
"image_urls": [
"https://mixmedia.tech/static/img/previews/gpt-t2i.jpg"
],
"resolution": "480p",
"duration": "8"
}
},
)
print(r.json()) # {"code": 200, "data": {"taskId": "..."}}
const r = await fetch("https://mixmedia.tech/api/v1/jobs/createTask", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"model": "grok-imagine-1.5",
"input": {
"prompt": "The character slowly turns to the camera, the wind moves the hair",
"image_urls": [
"https://mixmedia.tech/static/img/previews/gpt-t2i.jpg"
],
"resolution": "480p",
"duration": "8"
}
}),
});
console.log(await r.json()); // { code: 200, data: { taskId: "..." } }
Create and result
POST /api/v1/jobs/createTaskwithmodelandinput.- Poll
GET /api/v1/jobs/recordInfo?taskId=…every 3–5 s (or a callback).
Successful createTask (HTTP 200)
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_...",
"task_id": "task_...",
"status": "submitted"
}
}
Completed task (recordInfo)
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_...",
"task_id": "task_...",
"state": "success",
"status": "completed",
"costUsd": "0.384",
"refunded": false,
"resultJson": {
"videos": [
{
"url": "https://…/out.mp4"
}
],
"duration": 8
}
}
}
Aliases: task_id = taskId; status: pending / processing / completed / failed alongside state. Clip URL is in resultJson. size is an alias of aspect_ratio in input.
Photos can be any public https links or uploads via files/upload. Videos and audio — via files/upload only.
Error handling
API responses are JSON {"code", "msg", "data"}; errors also have a string error field (type). On /api/v1/* the HTTP status matches body code.
Example response bodies
400
{
"code": 400,
"msg": "input.duration: must be between 4 and 30, or \"auto\" / -1",
"data": null,
"error": "invalid_request_error"
}
401
{
"code": 401,
"msg": "Authentication failed. Please check your API key",
"data": null,
"error": "authentication_error"
}
402
{
"code": 402,
"msg": "Insufficient balance. Please top up and try again. Available: $0.01, required: $0.015. Top up at https://ai.aimixmedia.site/cabinet/billing",
"data": {
"balance": "0.0100",
"required": "0.0150",
"currency": "USD",
"topUpUrl": "https://mixmedia.tech/cabinet/billing"
},
"error": "payment_required"
}
429
{
"code": 429,
"msg": "Rate limit exceeded: 10 createTask/upload requests per 10 s per key. Retry after 8s",
"data": null,
"error": "rate_limit_error"
}
500
{
"code": 500,
"msg": "Internal server error",
"data": null,
"error": "server_error"
}
Codes on createTask / upload
| code | error | Meaning | What to do |
|---|---|---|---|
| 400 | invalid_request_error | Invalid parameter or body | See msg |
| 400 | unsupported_model | Unknown model | Model list |
| 400 | nsfw_content_detected | Rejected by content check (nsfw_check) | Change the prompt or files |
| 401 | authentication_error | Missing or invalid key | Check the key |
| 402 | payment_required | Not enough balance | Top up |
| 403 | permission_error | No access | Contact support |
| 429 | rate_limit_error | Too many requests | Wait for Retry-After |
| 505 | model_disabled | Model temporarily disabled | Pick another |
| 500 | server_error | Our failure | Retry later |
Example msg values: Authentication failed. Please check your API key (401); Insufficient balance. Please top up and try again… (402).
Task errors (recordInfo)
If the task was created and then failed: state: "fail" (alias status: "failed"), failCode / failMsg, and error: { code, message, type }. Money is refunded (refunded: true).
| failCode | error.type | Meaning |
|---|---|---|
| 400 | nsfw_content_detected / invalid_request_error | Moderation / safety rules |
| 422 | invalid_request_error | The model rejected the parameters (length, mode, resolution, file) |
| 501 | server_error | The model could not generate (failMsg) |
| 504 | timeout_error | Timed out — retry |
| 500 / 503 | server_error | Service temporarily unavailable |
Rate limits
| What | Limit |
|---|---|
| createTask and upload | 20 per 10 s per key |
| recordInfo / list / balance | 100 per 10 s per key |
Over the limit — HTTP 429 and Retry-After.