| 线路 | Base URL | 说明 |
|---|---|---|
| 官网(推荐) | https://iliu.ai | 官网地址 |
| 海外直连 | https://api.xinliu.one | 海外服务器或加速节点异常时使用 |
POST {Base URL}/v1/images/generationsAuthorization: Bearer 你的令牌Content-Type: application/json| model | 备注 |
|---|---|
grok-imagine-image | Grok Imagine 多模态 |
grok-imagine-image-pro | Grok Imagine Pro |
grok-4.1-image | Grok 4.1 Image |
grok-4.2-image | Grok 4.2 Image |
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 见上表 |
prompt | string | 是 | 提示词 |
n | int | 否 | 1~10 |
size | string | 否 | 1280x720 / 720x1280 / 1024x1024 等 |
response_format | string | 否 | url(默认)/ b64_json |
POST /v1/images/edits,grok-imagine-image 系列也支持,参数与 OpenAI 标准一致。{
"created": 1778069104,
"data": [{"url": "https://files.example.com/img/<uuid>.png"}]
}400 参数错误401 令牌无效或未提供402 余额不足404 模型不存在或未开通429 速率限制500 服务端错误