POST
/
images
/
edits
curl --request POST \
  --url https://geekai.co/api/v1/images/edits \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-image-1",
  "prompt": "在小猫的脚下画一只老鼠",
  "image": "<string>",
  "mask": "<string>",
  "size": "1024x1024",
  "n": 1,
  "quality": "auto",
  "response_format": "url",
  "retries": 0
}'
{
  "created": 123,
  "data": [
    {
      "url": "<string>",
      "revised_prompt": "<string>"
    }
  ]
}

注意:目前仅 GPT Image 1 模型支持图片编辑,其他模型不支持。你可以在模型广场筛选查看系统支持的所有画图模型列表,画图模型请求/响应参数结构兼容 OpenAI,切换模型时只需修改对应的模型名称即可,若模型请求/响应参数和 OpenAI 不一致,极客智坊底层会自动转换对齐。

图片编辑 API 调用示例可以参考这里:图片编辑

请求/响应参数明细

Authorizations

Authorization
string
header
required

JWT认证token

Body

application/json

Response

200
application/json

成功响应

The response is of type object.