POST
/
api
/
v1
/
gpt4o-image
/
generate
Generate 4o Image
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

All APIs require authentication via Bearer Token.

Get API Key:

  1. Visit API Key Management Page to get your API Key

Usage: Add to request header: Authorization: Bearer YOUR_API_KEY

Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately in the management page

Body

application/json

Response

200
application/json

Request successful

The response is of type object.