简体中文
cURL
curl --request POST \ --url https://api.kie.ai/api/v1/flux/kontext/generate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "prompt": "A serene mountain landscape at sunset with a lake reflecting the orange sky", "enableTranslation": true, "aspectRatio": "16:9", "outputFormat": "jpeg", "promptUpsampling": false, "model": "flux-kontext-pro" }'
{ "code": 200, "msg": "success", "data": { "taskId": "task12345" } }
使用 Flux Kontext AI 模型创建新的图像生成或编辑任务。
prompt
aspectRatio
inputImage
所有 API 都需要通过 Bearer Token 进行认证。
获取 API Key:
使用方法: 添加到请求头: Authorization: Bearer YOUR_API_KEY
注意:
请求成功
The response is of type object.
object