Kicks off a generation against the chosen model with your prompt and any model-specific params. Returns a generation_id immediately — actual rendering runs async; poll the status endpoint to read the result.
POST /api/v1/generate HTTP/1.1
Host: getvivix.com
Authorization: Bearer vvx_live_…
Content-Type: application/json
{
"model": "grok-imagine-image-quality",
"prompt": "a misty forest at dawn, cinematic 24mm",
"aspect_ratio": "16:9",
"resolution": "4K"
}| Field | Type | Required | Notes |
|---|---|---|---|
model | string | yes | The slug from /docs/api/models. Must be in your account's allowlist. |
prompt | string | yes | Up to 2000 chars. UTF-8. |
negative_prompt | string | no | Up to 500 chars. Available on most image models; ignored on models that don't support it. |
aspect_ratio | enum | no | One of "1:1", "4:5", "9:16", "16:9". Defaults to model-specific value. |
resolution | enum | no | Image: "1K" / "2K" / "4K". Video: "720p" / "1080p" / "2160p". Each model has its own subset. |
duration | integer | no | Video / audio only. Seconds. Range varies by model — typically 2–10. |
audio | boolean | no | Some video models can emit a synced audio track. Defaults to false. |
reference_images | string[] | no | URLs of reference images for img-to-img / style transfer. Up to 3. |
seed | integer | no | Pin RNG for deterministic outputs. Same seed + same params = same result. |
number_results | integer | no | Image only — request multiple variations in one call (1–4). Cost multiplies. |
GET /api/v1/models. Each model returns a paramsschema you can render forms against — that's the source of truth.HTTP/1.1 201 Created
X-Request-Id: req_abc123
X-RateLimit-Remaining: 239
X-Credits-Balance: 49,711
{
"generation_id": "5b91a581-ee19-4f86-9fea-bd29471d69d5",
"status": "pending",
"model": "grok-imagine-image-quality",
"credits_estimate": 211,
"created_at": "2026-05-10T12:34:56Z"
}credits_estimate is the upper bound for the call. The final charge — credits_used on the status response — is computed from the final params and any per-customer pricing overrides on your account.
Common errors — see the full error reference:
401 KEY_INVALID — bad or missing key402 INSUFFICIENT_CREDITS — not enough balance for this call403 MODEL_NOT_ALLOWED — your account isn't enabled for that model422 INVALID_PARAMS — a param is wrong (out of range, malformed, etc.) — the body has field and reason429 RATE_LIMIT / 429 CONCURRENCY_LIMIT — back off and retry