grok-imagine-image-2.0

阶梯计费绘图图像编辑New

支持 openai 画图格式、xai官方格式

官 稳 保
¥--已优惠¥--
----
  • 申请赠送05000000 Tokens

    约¥0/ 5百万Tokens

  • 一元试用11000000 Tokens

    约¥1/百万Token

  • openai官-优质4img

    按量计费

  • origin7.3img

    按量计费

  • ssvip3img

    按量计费

· 首次申请送500万Token
  • 使用文档

  • 附件资料

  • 计费明细

模型信息

模型 IDgrok-imagine-image-2.0供应商X.AI
输入模态未注明输出模态未注明
分类未注明发布时间2026-08-28 11:56:54

调用接口

分组接口渠道方法路径
全部接口所有画图(查询异步结果)本站 AI 中转站GET/v1/images/tasks/{task_id}
全部接口Edits 通用 (图像编辑)本站 AI 中转站POST/v1/images/edits
全部接口所有图像编辑(异步)本站 AI 中转站POST/v1/images/edits
全部接口所有画图(异步)本站 AI 中转站POST/v1/images/generations
全部接口Grok Image本站 AI 中转站POST/v1/images/generations

GET /v1/images/tasks/{task_id}

### 所有画图(查询异步结果)
status:
IN_PROGRESS (处理中)
FAILURE (失败)
SUCCESS (成功)

请求与响应结构
{
    "summary": "所有画图(查询异步结果)",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "properties": []
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [
        {
            "in": "path",
            "name": "task_id",
            "schema": {
                "type": "string"
            },
            "required": true,
            "description": ""
        }
    ],
    "description": "### 所有画图(查询异步结果)\nstatus: \nIN_PROGRESS (处理中)\nFAILURE (失败)\nSUCCESS (成功)"
}

POST /v1/images/edits

### Edits 通用 (图像编辑)
official docs:


## Image Editing Request Parameters

| Parameter | Type | Required | Description |
|------------------|---------------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| **image** | `file` or `file array` | ✅ | The image(s) to edit. Must be a supported image file or array. <br> - **gpt-image-1**: PNG, WEBP, or JPG, each <25MB. <br> - **dall-e-2**: 1 square PNG <4MB. |
| **prompt** | `string` | ✅ | A text description of the desired image(s). <br> - Max length: 1000 chars for **dall-e-2**, 32000 chars for **gpt-image-1**. |
| **mask** | `file` | | Optional PNG mask image. Transparent areas (alpha = 0) indicate regions to edit. <br> Must match size of image and be <4MB. Applies to first image. |
| **model** | `string` | | Model to use: `"dall-e-2"` or `"gpt-image-1"`. <br> Defaults to `"dall-e-2"`, unless `gpt-image-1`-specific parameters are used. |
| **n** | `integer` or `null` | | Number of images to generate. Must be between 1 and 10. <br> Default: `1`. |
| **quality** | `string` or `null` | | For **gpt-image-1** only. Options: `"high"`, `"medium"`, `"low"`. <br> Default: `"auto"`. |
| **response_format** | `string` or `null` | | Response format. Options: `"url"` or `"b64_json"`. <br> Only `"dall-e-2"` supports `"url"` (valid for 60 minutes). |
| **size** | `string` or `null` | | Image size: <br> - **gpt-image-1**: `"1024x1024"`, `"1536x1024"`, `"1024x1536"`, `"auto"` (default) <br> - **dall-e-2**: `"256x256"`, `"512x512"`, `"1024x1024"` |

请求与响应结构
{
    "summary": "Edits 通用 (图像编辑)",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "properties": []
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "### Edits 通用 (图像编辑)\nofficial docs:  \n\n\n## Image Editing Request Parameters\n\n| Parameter         | Type                | Required | Description                                                                                                                                           |\n|------------------|---------------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **image**         | `file` or `file array` | ✅       | The image(s) to edit. Must be a supported image file or array. <br> - **gpt-image-1**: PNG, WEBP, or JPG, each <25MB. <br> - **dall-e-2**: 1 square PNG <4MB. |\n| **prompt**        | `string`            | ✅       | A text description of the desired image(s). <br> - Max length: 1000 chars for **dall-e-2**, 32000 chars for **gpt-image-1**.                          |\n| **mask**          | `file`              |         | Optional PNG mask image. Transparent areas (alpha = 0) indicate regions to edit. <br> Must match size of image and be <4MB. Applies to first image.   |\n| **model**         | `string`            |         | Model to use: `\"dall-e-2\"` or `\"gpt-image-1\"`. <br> Defaults to `\"dall-e-2\"`, unless `gpt-image-1`-specific parameters are used.                       |\n| **n**             | `integer` or `null` |         | Number of images to generate. Must be between 1 and 10. <br> Default: `1`.                                                                            |\n| **quality**       | `string` or `null`  |         | For **gpt-image-1** only. Options: `\"high\"`, `\"medium\"`, `\"low\"`. <br> Default: `\"auto\"`.                                                             |\n| **response_format** | `string` or `null` |         | Response format. Options: `\"url\"` or `\"b64_json\"`. <br> Only `\"dall-e-2\"` supports `\"url\"` (valid for 60 minutes).                                     |\n| **size**          | `string` or `null`  |         | Image size: <br> - **gpt-image-1**: `\"1024x1024\"`, `\"1536x1024\"`, `\"1024x1536\"`, `\"auto\"` (default) <br> - **dall-e-2**: `\"256x256\"`, `\"512x512\"`, `\"1024x1024\"` |",
    "requestBody": {
        "content": {
            "multipart/form-data": {
                "schema": {
                    "type": "object",
                    "title": "Edits 通用 (图像编辑)",
                    "$schema": "",
                    "required": [
                        "image",
                        "prompt",
                        "model"
                    ],
                    "properties": {
                        "image": {
                            "type": "file",
                            "example": "E:\\\\Desktop\\\\gpt\\\\icon_samll2.png",
                            "description": "支持多图"
                        },
                        "model": {
                            "type": "string",
                            "example": "gpt-image-1",
                            "description": "支持 gpt-image-1、flux-kontext-pro、flux-kontext-max"
                        },
                        "prompt": {
                            "type": "string",
                            "example": "带上眼镜"
                        }
                    },
                    "x-apifox-id": "288978020"
                }
            }
        },
        "required": true
    }
}

POST /v1/images/edits

### 所有图像编辑(异步)
支持所有画图模型异步请求,仅需添加 query 参数 async=true,请求body 与之前一致即可;
async 为 true 时,将异步提交
响应中返回一个 task_id,此 task_id 用于后续查询图像生成状态。

查询图像生成结果:
使用 GET /v1/images/tasks/{task_id} 查询生成任务的状态。如果任务完成,响应会包含生成的图像 URL。

请求与响应结构
{
    "summary": "所有图像编辑(异步)",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "properties": []
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [
        {
            "in": "query",
            "name": "async",
            "schema": {
                "type": "string",
                "example": "true",
                "description": "启用异步模式"
            },
            "required": true,
            "description": "启用异步模式"
        },
        {
            "in": "query",
            "name": "webhook",
            "schema": {
                "type": "string",
                "example": ""
            },
            "required": false,
            "description": ""
        }
    ],
    "description": "### 所有图像编辑(异步)\n支持所有画图模型异步请求,仅需添加 query 参数 async=true,请求body 与之前一致即可;\nasync 为 true 时,将异步提交\n响应中返回一个 task_id,此 task_id 用于后续查询图像生成状态。\n\n查询图像生成结果:\n使用 GET /v1/images/tasks/{task_id} 查询生成任务的状态。如果任务完成,响应会包含生成的图像 URL。",
    "requestBody": {
        "content": {
            "multipart/form-data": {
                "schema": {
                    "type": "object",
                    "title": "所有图像编辑(异步)",
                    "$schema": "",
                    "required": [
                        "image",
                        "prompt",
                        "model"
                    ],
                    "properties": {
                        "image": {
                            "type": "file",
                            "example": "E:\\\\Desktop\\\\gpt\\\\icon_samll2.png",
                            "description": "支持多图"
                        },
                        "model": {
                            "type": "string",
                            "example": "gpt-image-1",
                            "description": "支持 gpt-image-1、flux-kontext-pro、flux-kontext-max"
                        },
                        "prompt": {
                            "type": "string",
                            "example": "带上眼镜"
                        }
                    },
                    "x-apifox-id": "339685644"
                }
            }
        },
        "required": true
    }
}

POST /v1/images/generations

### 所有画图(异步)
支持所有画图模型异步请求,仅需添加 query 参数 async=true,请求body 与之前一致即可;

提交图像生成请求:
使用 POST /v1/images/generations 提交图像生成请求并传递参数(如 size、prompt、model 等)。
响应中返回一个 task_id,此 task_id 用于后续查询图像生成状态。

查询图像生成结果:
使用 GET /v1/images/tasks/{task_id} 查询生成任务的状态。如果任务完成,响应会包含生成的图像 URL。

请求与响应结构
{
    "summary": "所有画图(异步)",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "required": [
                            "code",
                            "message",
                            "data"
                        ],
                        "properties": {
                            "code": {
                                "type": "string"
                            },
                            "data": {
                                "type": "string",
                                "description": "task id"
                            },
                            "message": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [
        {
            "in": "query",
            "name": "async",
            "schema": {
                "type": "string",
                "example": "true",
                "description": "启用异步模式"
            },
            "required": true,
            "description": "启用异步模式"
        },
        {
            "in": "query",
            "name": "webhook",
            "schema": {
                "type": "string",
                "example": ""
            },
            "required": false,
            "description": ""
        }
    ],
    "description": "### 所有画图(异步)\n支持所有画图模型异步请求,仅需添加 query 参数 async=true,请求body 与之前一致即可;\n\n提交图像生成请求:\n使用 POST /v1/images/generations 提交图像生成请求并传递参数(如 size、prompt、model 等)。\n响应中返回一个 task_id,此 task_id 用于后续查询图像生成状态。\n\n查询图像生成结果:\n使用 GET /v1/images/tasks/{task_id} 查询生成任务的状态。如果任务完成,响应会包含生成的图像 URL。",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "所有画图(异步)",
                    "$schema": "",
                    "required": [
                        "prompt",
                        "model"
                    ],
                    "properties": {
                        "model": {
                            "type": "string"
                        },
                        "prompt": {
                            "type": "string"
                        }
                    },
                    "x-apifox-id": "356258955"
                }
            }
        },
        "required": true
    }
}

POST /v1/images/generations

请求与响应结构
{
    "summary": "Grok Image",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "properties": []
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "Grok Image",
                    "$schema": "",
                    "required": [
                        "model",
                        "prompt"
                    ],
                    "properties": {
                        "image": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "model": {
                            "enum": [
                                "grok-4.2-image",
                                "grok-4.1-image"
                            ],
                            "type": "string"
                        },
                        "prompt": {
                            "type": "string"
                        },
                        "aspect_ratio": {
                            "enum": [
                                "1:1",
                                "2:3",
                                "3:2",
                                "9:16",
                                "16:9"
                            ],
                            "type": "string",
                            "description": "如果加入参考图,按照参考图比例生成"
                        }
                    },
                    "x-apifox-id": "439071064"
                }
            }
        },
        "required": true
    }
}

价格

价格组渠道计费项价格单位
openai官-优质本站 AI 中转站imageCNY 4img
origin本站 AI 中转站imageCNY 7.3img
ssvip本站 AI 中转站imageCNY 3img

服务级错误码参照(error_code):

  错误码 说明
  221301 数据源超时
  221303 认证失败

认证失败,请稍后重试
认证失败,该卡当日连续多次认证不通过被限制校验,次日恢复
  221306 参数错误

参数错误:姓名格式不正确
参数错误:手机号格式不正确
参数错误:身份证格式不正确
参数错误:银行卡号格式不正确
同一银行卡请求过于频繁

系统级错误码参照:

  错误码 说明
  10001 错误的请求KEY
  10002 该KEY无请求权限
  10003 KEY过期
  10004 错误的OPENID
  10005 应用未审核超时,请提交认证
  10007 未知的请求源
  10008 被禁止的IP
  10009 被禁止的KEY
  10011 当前IP请求超过限制
  10012 请求超过次数限制
  10013 测试KEY超过请求限制
  10014 系统内部异常(调用充值类业务时,请务必联系客服或通过订单查询接口检测订单,避免造成损失)
  10020 接口维护
  10021 接口停用

错误码格式说明(示例:200201):

  2 002 01
  服务级错误(1为系统级错误) 服务模块代码(即数据ID) 具体错误代码

使用文档下载

grok-imagine-image-2.0
--
今日调用
--
成功率
--
近期调用

推荐API

  • gemini-3.8-flash-thinking-medium

    Gemini 3.8 Flash 是我们最智能的 Flash 模型,专为长远软件工程、自主代理和复杂企业工作流程设计——所有这些都具备 Flash 的速度和成本效益。
  • gemini-3.7-flash-thinking-low

  • gemini-3.8-flash-thinking-low

    Gemini 3.8 Flash 是我们最智能的 Flash 模型,专为长远软件工程、自主代理和复杂企业工作流程设计——所有这些都具备 Flash 的速度和成本效益。
  • gemini-3.7-flash-thinking-medium

  • gemini-3.8-flash-thinking-high

    Gemini 3.8 Flash 是我们最智能的 Flash 模型,专为长远软件工程、自主代理和复杂企业工作流程设计——所有这些都具备 Flash 的速度和成本效益。
  • gemini-3.8-flash

    Gemini 3.8 Flash 是我们最智能的 Flash 模型,专为长远软件工程、自主代理和复杂企业工作流程设计——所有这些都具备 Flash 的速度和成本效益。

API资讯

数 据 驱 动 未 来
Data Drives The Future
数 据 驱 动 未 来
Data Drives The Future