简体中文
cURL
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" } }
创建一个新的4o图像生成任务。生成的图片保存14天,14天后过期。
所有接口都需要通过 Bearer Token 方式进行认证。
获取 API Key:
使用方式: 在请求头中添加: Authorization: Bearer YOUR_API_KEY
注意事项:
请求成功
The response is of type object.
object