curl --request POST \
--url https://api.omnimux.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine-image",
"prompt": "a product photo on white background",
"aspect_ratio": "16:9",
"response_format": "b64_json",
"n": 1
}'
curl --request POST \
--url https://api.omnimux.ai/v1/images/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine-image",
"prompt": "change the studio backdrop to warm morning sunlight",
"images": ["https://example.com/product.jpg"],
"aspect_ratio": "1:1"
}'
{
"created": 1741428397,
"data": [
{ "url": "https://example.com/image.png" }
]
}
{
"created": 1741428397,
"data": [
{ "b64_json": "iVBORw0KGgoAAAANSUhEUg..." }
]
}
{ "error": { "message": "Invalid request", "type": "invalid_request_error", "code": "bad_request" } }
{ "error": { "message": "Invalid token", "type": "authentication_error", "code": "unauthorized" } }
{
"error": {
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota",
"code": "insufficient_quota"
}
}
{ "error": { "message": "Forbidden", "type": "permission_error", "code": "forbidden" } }
{ "error": { "message": "Rate limit exceeded", "type": "rate_limit_error", "code": "rate_limit_exceeded" } }
{ "error": { "message": "Internal server error", "type": "server_error", "code": "internal_error" } }
curl --request POST \
--url https://api.omnimux.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine-image",
"prompt": "a product photo on white background",
"aspect_ratio": "16:9",
"response_format": "b64_json",
"n": 1
}'
curl --request POST \
--url https://api.omnimux.ai/v1/images/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine-image",
"prompt": "change the studio backdrop to warm morning sunlight",
"images": ["https://example.com/product.jpg"],
"aspect_ratio": "1:1"
}'
{
"created": 1741428397,
"data": [
{ "url": "https://example.com/image.png" }
]
}
{
"created": 1741428397,
"data": [
{ "b64_json": "iVBORw0KGgoAAAANSUhEUg..." }
]
}
{ "error": { "message": "Invalid request", "type": "invalid_request_error", "code": "bad_request" } }
{ "error": { "message": "Invalid token", "type": "authentication_error", "code": "unauthorized" } }
{
"error": {
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota",
"code": "insufficient_quota"
}
}
{ "error": { "message": "Forbidden", "type": "permission_error", "code": "forbidden" } }
{ "error": { "message": "Rate limit exceeded", "type": "rate_limit_error", "code": "rate_limit_exceeded" } }
{ "error": { "message": "Internal server error", "type": "server_error", "code": "internal_error" } }
Grok Imagine
Grok Imagine Image Generation
Call Grok Imagine Image (grok-imagine-image) on OmniMux via POST /v1/images/generations or /v1/images/edits with aspect_ratio, response_format b64_json, and url output.
curl --request POST \
--url https://api.omnimux.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine-image",
"prompt": "a product photo on white background",
"aspect_ratio": "16:9",
"response_format": "b64_json",
"n": 1
}'
curl --request POST \
--url https://api.omnimux.ai/v1/images/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine-image",
"prompt": "change the studio backdrop to warm morning sunlight",
"images": ["https://example.com/product.jpg"],
"aspect_ratio": "1:1"
}'
{
"created": 1741428397,
"data": [
{ "url": "https://example.com/image.png" }
]
}
{
"created": 1741428397,
"data": [
{ "b64_json": "iVBORw0KGgoAAAANSUhEUg..." }
]
}
{ "error": { "message": "Invalid request", "type": "invalid_request_error", "code": "bad_request" } }
{ "error": { "message": "Invalid token", "type": "authentication_error", "code": "unauthorized" } }
{
"error": {
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota",
"code": "insufficient_quota"
}
}
{ "error": { "message": "Forbidden", "type": "permission_error", "code": "forbidden" } }
{ "error": { "message": "Rate limit exceeded", "type": "rate_limit_error", "code": "rate_limit_exceeded" } }
{ "error": { "message": "Internal server error", "type": "server_error", "code": "internal_error" } }
POST
/
v1
/
images
/
generations
curl --request POST \
--url https://api.omnimux.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine-image",
"prompt": "a product photo on white background",
"aspect_ratio": "16:9",
"response_format": "b64_json",
"n": 1
}'
curl --request POST \
--url https://api.omnimux.ai/v1/images/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine-image",
"prompt": "change the studio backdrop to warm morning sunlight",
"images": ["https://example.com/product.jpg"],
"aspect_ratio": "1:1"
}'
{
"created": 1741428397,
"data": [
{ "url": "https://example.com/image.png" }
]
}
{
"created": 1741428397,
"data": [
{ "b64_json": "iVBORw0KGgoAAAANSUhEUg..." }
]
}
{ "error": { "message": "Invalid request", "type": "invalid_request_error", "code": "bad_request" } }
{ "error": { "message": "Invalid token", "type": "authentication_error", "code": "unauthorized" } }
{
"error": {
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota",
"code": "insufficient_quota"
}
}
{ "error": { "message": "Forbidden", "type": "permission_error", "code": "forbidden" } }
{ "error": { "message": "Rate limit exceeded", "type": "rate_limit_error", "code": "rate_limit_exceeded" } }
{ "error": { "message": "Internal server error", "type": "server_error", "code": "internal_error" } }
- Create or reference-generate via
POST /v1/images/generationswithmodelset togrok-imagine-image; edit an existing image viaPOST /v1/images/edits - Supports OpenAI-compatible parameters
aspect_ratio(automatically mapped tosizewhensizeis omitted) andresponse_format(urlorb64_json) - Confirm live model availability and pricing in the OmniMux console or via
GET /v1/models; for higher-quality output, see Grok Imagine Image Quality - If the upstream returns an async
task_id/id, track task completion in console usage logs
Identity
| Field | Value |
|---|---|
| Series | Image series |
| Brand | Grok Imagine |
| model | grok-imagine-image |
Grok Imagine Variants
| Model ID | Tier | Endpoint | Guide |
|---|---|---|---|
grok-imagine-image | Standard | POST /v1/images/generations · /v1/images/edits | This page |
grok-imagine-image-quality | Quality tier | POST /v1/images/generations · /v1/images/edits | Grok Imagine Image Quality |
grok-imagine-image-2-0 | 2.0 generation | POST /v1/images/generations · /v1/images/edits | Grok Imagine Image 2.0 |
Endpoint
| Method | Path | Use |
|---|---|---|
POST | /v1/images/generations | Text-to-image and optional reference-guided generation |
POST | /v1/images/edits | Image editing (requires at least one reference image) |
https://api.omnimux.ai
Authorizations
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Authorization | header | string | yes | Bearer sk-... (API key) |
Body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | yes | Must be grok-imagine-image |
prompt | string | yes | Image description or edit instruction |
n | integer | no | Number of images (gateway-capped) |
size | string | no | Size or aspect ratio (model-specific) |
aspect_ratio | string | no | Aspect ratio; automatically normalized to size when size is omitted |
response_format | string | no | Output delivery format: url or b64_json |
quality | string | no | Quality tier (model-specific) |
images | string[] | conditional | Reference images as URL or base64 (required on POST /v1/images/edits). image, image_urls, and input_reference are accepted aliases and normalized to images before forwarding. |
Reference image limits
No formal model spec exists for this model yet, so its exact reference-image count, accepted formats, and per-file size ceiling remain unverified here.Response
200
| Field | Type | Description |
|---|---|---|
created | integer | Creation timestamp when present (sync responses) |
data | array | Image objects carrying url or b64_json, and optional revised_prompt |
task_id / id | string | Async task id when the upstream submits a background job |
task_id from the create response and console usage logs (no separate public image-query endpoint).