全部接口
所有画图(查询异步结果)
Edits 通用 (图像编辑)
所有图像编辑(异步)
所有画图(异步)
Grok Image
模型信息
| 模型 ID | grok-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 中转站 | image | CNY 4 | img |
| origin | 本站 AI 中转站 | image | CNY 7.3 | img |
| ssvip | 本站 AI 中转站 | image | CNY 3 | img |
服务级错误码参照(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) | 具体错误代码 |
使用文档下载
| 附件标题/下载链接 | 更新时间 | |
|---|---|---|
| 接口资料:GET /v1/images/tasks/{task_id}(所有画图(查询异步结果)) | 2026-09-09 15:29:05 | |
| 接口资料:POST /v1/images/edits(Edits 通用 (图像编辑)) | 2026-09-09 15:29:05 | |
| 接口资料:POST /v1/images/edits(所有图像编辑(异步)) | 2026-09-09 15:29:05 | |
| 接口资料:POST /v1/images/generations(所有画图(异步)) | 2026-09-09 15:29:05 | |
| 接口资料:POST /v1/images/generations(Grok Image) | 2026-09-09 15:29:05 | |
| 价格分组:openai官-优质(CNY 4/img) | 2026-09-09 15:29:05 | |
| 价格分组:origin(CNY 7.3/img) | 2026-09-09 15:29:05 | |
| 价格分组:ssvip(CNY 3/img) | 2026-09-09 15:29:05 | |
| 阶梯与倍率计费资料 | 2026-09-09 15:29:05 | |
| 供应商令牌分组折扣资料 | 2026-09-09 15:29:05 |
常见问题:
| 标题 | 更新时间 | |
|---|---|---|
| Token 是什么?中文、英文与上下文窗口如何计算 | 2026-09-21 00:31:09 | |
| LLM API 费用如何计算?如何选择合适的模型 | 2026-09-21 01:16:03 | |
| Word-to-Token 转换与用量估算指南 | 2026-09-21 00:31:09 |
gemini-3.8-flash-thinking-medium
gemini-3.8-flash-thinking-high