/fal-ai/flux-pro/kontext

POST /fal-ai/flux-pro/kontext

MethodPOST
Path/fal-ai/flux-pro/kontext
Typehttp
Status1
Module2102810
Folder61445274

说明

概览

MethodPOST
Path/fal-ai/flux-pro/kontext
Typehttp
Status1
Module2102810
Folder61445274

参数

{
  "path": [],
  "query": [],
  "cookie": [],
  "header": []
}

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "prompt": {
        "type": "string",
        "description": "生成图像的提示"
      },
      "guidance_scale": {
        "type": "number",
        "description": "CFG(无分类器引导)量表用于衡量您希望模型在寻找相关图像时与提示的贴近程度。默认值:3.5  范围值1-20"
      },
      "num_images": {
        "type": "integer",
        "description": "生成的图像数量。默认值:1   范围值1-4"
      },
      "output_format": {
        "type": "string",
        "description": "生成图片的格式。默认值:\"jpeg\"  支持default、png、jpeg"
      },
      "safety_tolerance": {
        "type": "string",
        "description": "生成图像的安全容差等级。1 表示最严格,5 表示最宽松。默认值:\"2\""
      },
      "image_url": {
        "type": "string",
        "description": "在此处拖放文件,或提供 base64 编码的数据 URL接受的文件类型:jpg、jpeg、png、webp、gif、avif"
      }
    },
    "required": [
      "prompt",
      "image_url"
    ],
    "x-apifox-orders": [
      "prompt",
      "guidance_scale",
      "num_images",
      "output_format",
      "safety_tolerance",
      "image_url"
    ]
  },
  "examples": [
    {
      "mediaType": "application/json",
      "value": "{\r\n  \"prompt\": \"Put a donut next to the flour.\",\r\n  \"guidance_scale\": 3.5,\r\n  \"num_images\": 1,\r\n  \"output_format\": \"jpeg\",\r\n  \"safety_tolerance\": \"2\",\r\n  \"image_url\": \"https://v3.fal.media/files/rabbit/rmgBxhwGYb2d3pl3x9sKf_output.png\"\r\n}"
    }
  ],
  "mediaType": "",
  "oasExtensions": "",
  "required": false,
  "additionalContentTypes": []
}

响应

[
  {
    "id": 728720382,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {},
      "x-apifox-orders": []
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": [],
    "oasExtensions": ""
  }
]

响应示例

[
  {
    "name": "成功示例",
    "responseId": 728720382,
    "data": "{\r\n    \"status\": \"IN_QUEUE\",\r\n    \"request_id\": \"acf05732-7cb3-445b-9f39-fdaeccb1d730\",\r\n    \"response_url\": \"https://queue.fal.run/fal-ai/flux-pro/requests/acf05732-7cb3-445b-9f39-fdaeccb1d730\",\r\n    \"status_url\": \"https://queue.fal.run/fal-ai/flux-pro/requests/acf05732-7cb3-445b-9f39-fdaeccb1d730/status\",\r\n    \"cancel_url\": \"https://queue.fal.run/fal-ai/flux-pro/requests/acf05732-7cb3-445b-9f39-fdaeccb1d730/cancel\",\r\n    \"logs\": null,\r\n    \"metrics\": {},\r\n    \"queue_position\": 0\r\n}",
    "description": "",
    "oasKey": "",
    "oasExtensions": "",
    "id": 648888610
  }
]