跳转到主要内容
POST
/
api
/
v1
/
task
/
submit
curl --request POST \
  --url https://api.maxapi.io/api/v1/task/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "grok-imagine/image-to-image",
  "callBackUrl": "https://example.com/webhook",
  "input": {
    "prompt": "把主体放到霓虹小巷夜景里",
    "imageUrls": ["https://example.com/portrait.jpg"],
    "n": 1
  }
}'
{
  "code": 0,
  "msg": "ok",
  "data": {
    "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}
基于 1-2 张参考图和文本提示进行图像编辑。上游固定输出 1024×1024,因此不接受 ratioresolution 参数。

可用模型

grok-imagine/image-to-image —— $0.015 / 张。
model
string
必填
固定为 grok-imagine/image-to-image
callBackUrl
string
Webhook 回调 URL。
input
object
必填
curl --request POST \
  --url https://api.maxapi.io/api/v1/task/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "grok-imagine/image-to-image",
  "callBackUrl": "https://example.com/webhook",
  "input": {
    "prompt": "把主体放到霓虹小巷夜景里",
    "imageUrls": ["https://example.com/portrait.jpg"],
    "n": 1
  }
}'
{
  "code": 0,
  "msg": "ok",
  "data": {
    "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}
输出固定 1024×1024,最多 2 张参考图。