跳转到主要内容
已兼容官方格式,可以直接使用官方格式调用。请直接查阅 官方文档
curl --request POST \
  --url https://BASE_URL/flux/v1/flux-kontext-pro \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer API_KEY' \
  --data '{
  "prompt": "ein fantastisches bild",
  "input_image": "<string>",
  "input_image_2": "<string>",
  "input_image_3": "<string>",
  "input_image_4": "<string>",
  "seed": 42,
  "aspect_ratio": "<string>",
  "output_format": "jpeg",
  "webhook_url": "<string>",
  "webhook_secret": "<string>",
  "prompt_upsampling": false,
  "safety_tolerance": 2
}'
  1. 需要在 BASE_URL 后添加 /flux
  2. flux模型同时也兼容了 OpenAI生图接口