Maisi-AI API Doc
首页全部OpenAI语言模型图像模型
视频模型音频模型
首页全部OpenAI语言模型图像模型
视频模型音频模型
  1. Gpt-image2图像
  • Gpt-image2图像
    • 生成图像
      POST
    • 图片编辑
      POST
  • Midjourney绘图
    • 任务提交
      • 提交Imagine任务
      • 提交Action任务
      • 提交Blend任务
      • 提交Modal任务
      • 提交Describe任务
      • 提交Shorten任务
      • 提交SwapFace任务
      • 提交Video任务
      • 上传文件到discord
    • 任务查询
      • 指定id查询任务
      • 指定id列表查询任务
      • 获取任务图片的seed
  • Nano Banana生图
    • 官方格式(文生图)
      POST
    • 官方格式(图生图)
      POST
  1. Gpt-image2图像

图片编辑

POST
/v1/images/edits

请求参数

Header 参数

Body 参数application/json必填

示例

返回响应

🟢200成功
application/json
Bodyapplication/json

请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location '/v1/images/edits' \
--header 'Authorization: Bearer sk-xxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
    "model": "gpt-image-2",
    "prompt": "这个女孩戴上眼镜",
    "size": "1024x1824",
    "image": "https://api.maisi-ai.com/uploads/69e73c385ea61.png",
    "quality": "low",
    "response_format": "png"
}'
响应示例响应示例
{
    "created": 1778209602,
    "data": [
        {
            "b64_json": "iVBORw=",
            "revised_prompt": "Edit the provided portrait photo of the young woman by adding a pair of stylish, natural-looking eyeglasses that fit her face well. Keep her facial features, pose, lighting, background, hair, clothing, and overall photorealistic style unchanged. The glasses should be subtle, elegant, and realistic with clear lenses and a thin frame."
        }
    ],
    "background": "opaque",
    "output_format": "png",
    "quality": "medium",
    "size": "1024x1824",
    "usage": {
        "input_tokens": 1612,
        "input_tokens_details": {
            "image_tokens": 1536,
            "text_tokens": 76
        },
        "output_tokens": 1254,
        "output_tokens_details": {
            "image_tokens": 1254,
            "text_tokens": 0
        },
        "total_tokens": 2866
    }
}
修改于 2026-05-11 19:16:24
上一页
生成图像
下一页
提交Imagine任务
Built with