跳转到主要内容
POST
/
v3
/
gpt-image-2-light-edit
GPT Image 2 Light 编辑
curl --request POST \
  --url https://api.highwayapi.ai/v3/gpt-image-2-light-edit \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "mask": {
    "image_url": "<string>"
  },
  "size": "<string>",
  "images": [
    {
      "image_url": "<string>"
    }
  ],
  "prompt": "<string>",
  "background": "<string>",
  "moderation": "<string>"
}
'
{
  "images": [
    {}
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt

Use this file to discover all available pages before exploring further.

GPT Image 2 Light 图片编辑 API。通过 images 数组接收图片 URL,根据提示词编辑输入图片,并返回编辑后的图片 URL。

请求头

Content-Type
string
必填
枚举值: application/json
Authorization
string
必填
Bearer 身份验证格式: Bearer {{API 密钥}}。

请求体

mask
object
size
string
默认值:"1024x1024"
输出图片分辨率。可选值:1024x1024, 1024x1536, 1536x1024, 1152x2048, 2048x1152, 2048x2048, 2160x3840, 3840x2160
images
array
必填
JSON URL 模式下的待编辑原图列表。至少需要一个 image_url,支持 URL 或 data URL。数组长度:1 - 16
prompt
string
必填
描述希望如何修改输入图片的编辑指令。为空会返回 prompt is required。长度限制:0 - 32000
background
string
输出图片背景处理方式。可选值:auto, opaque
moderation
string
内容审核严格程度。可选值:auto, low

响应信息

images
array
平台存储转换后的编辑结果图片 URL 数组。