POST
/
api
/
v1
/
gpt4o-image
/
generate
生成4o图像
curl --request POST \
  --url https://api.kie.ai/api/v1/gpt4o-image/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "filesUrl": [
    "https://example.com/image1.png",
    "https://example.com/image2.png"
  ],
  "prompt": "A beautiful sunset over the mountains",
  "size": "1:1",
  "callBackUrl": "https://your-callback-url.com/callback",
  "isEnhance": false,
  "uploadCn": false,
  "nVariants": 1,
  "enableFallback": false,
  "fallbackModel": "FLUX_MAX"
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task12345"
  }
}

Authorizations

Authorization
string
header
required

所有接口都需要通过 Bearer Token 方式进行认证。

获取 API Key:

  1. 访问 API Key 管理页面 获取您的 API Key

使用方式: 在请求头中添加: Authorization: Bearer YOUR_API_KEY

注意事项:

  • 请妥善保管您的 API Key,不要泄露给他人
  • 如果怀疑 API Key 泄露,请立即在管理页面重置

Body

application/json

Response

200
application/json

请求成功

The response is of type object.