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",
"n": 1
}'
{
"created": 1741428397,
"data": [
{ "url": "https://example.com/image.png" }
]
}
{
"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": "Model not allowed", "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",
"n": 1
}'
{
"created": 1741428397,
"data": [
{ "url": "https://example.com/image.png" }
]
}
{
"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": "Model not allowed", "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 生图
Grok Imagine 生图 · model grok-imagine-image
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",
"n": 1
}'
{
"created": 1741428397,
"data": [
{ "url": "https://example.com/image.png" }
]
}
{
"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": "Model not allowed", "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",
"n": 1
}'
{
"created": 1741428397,
"data": [
{ "url": "https://example.com/image.png" }
]
}
{
"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": "Model not allowed", "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,model为grok-imagine-image - 请求体至少包含
model与prompt - 同步或异步以线上响应为准;若返回 task id,请用任务查询接口轮询
身份
| 字段 | 值 |
|---|---|
| 系列 | 图像系列 |
| 品牌 | Grok Imagine |
| model | grok-imagine-image |
接口
| 方法 | 路径 |
|---|---|
POST | /v1/images/generations |
https://api.omnimux.ai
鉴权
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
Authorization | header | string | 是 | Bearer sk-...(API Key) |
请求体
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 固定为 grok-imagine-image |
prompt | string | 是 | 图像描述 / 编辑说明 |
n | integer | 否 | 生成张数(受网关上限约束) |
size | string | 否 | 尺寸或宽高比(模型相关) |
quality | string | 否 | 质量档位(模型相关) |
images | string[] | 否 | 参考图:图片 URL 或 base64;image、image_urls、input_reference 为可接受的别名,调用上游前统一归一为 images。 |
参考图限制
本模型尚无模型档案,参考图能力与上限未核验:此处不声明张数、接受格式与单文件大小上限。响应
200
| 字段 | 类型 | 说明 |
|---|---|---|
created | integer | 创建时间戳(若返回) |
data | array | 图像结果(url 或 b64_json) |
task_id / id | string | 异步时的任务 id(若返回) |
task_id / 控制台日志为准(公开文档不提供独立图像 query 路径)。