fal-ai/*

异步任务

支持 Fal 官方所有模型调用,具体请求参数请看官方模型文档: 提交任务会预扣,任务成功后多退少补,任务失败会补回 计费方式与 Fal.ai 一致,查询接口有返回消费

官 稳 保
¥--已优惠¥--
----
  • 申请赠送05000000 Tokens

    约¥0/ 5百万Tokens

  • 一元试用11000000 Tokens

    约¥1/百万Token

  • fal.ai-all5request

    按量计费

· 首次申请送500万Token
  • 使用文档

  • 附件资料

  • 计费明细

模型信息

模型 IDfal-ai/*供应商Fal-ai
输入模态未注明输出模态未注明
分类未注明发布时间1970-01-01 07:59:59

调用接口

分组接口渠道方法路径
全部接口获取请求结果本站 AI 中转站GET/fal/{platform}/{{model_name}}/requests/{{request_id}}
全部接口FLUX.1 [Schell] Redux本站 AI 中转站POST/fal-ai/flux-1/schnell/redux
全部接口FLUX.1 Kontext [Pro]本站 AI 中转站POST/fal-ai/flux-pro/kontext
全部接口FLUX.1 Kontext [Max]本站 AI 中转站POST/fal-ai/flux-pro/kontext/max
全部接口FLUX.1 Kontext [Max Multi](实验性多图编辑)本站 AI 中转站POST/fal-ai/flux-pro/kontext/max/multi
全部接口FLUX.1 Kontext [Multi](实验性多图编辑)本站 AI 中转站POST/fal-ai/flux-pro/kontext/multi
全部接口FLUX.1 Kontext [Max] 文本转图像本站 AI 中转站POST/fal-ai/flux-pro/kontext/text-to-image
全部接口FLUX.1 Kontext [Max] 文本转图像本站 AI 中转站POST/fal-ai/flux-pro/kontext/text-to-image
全部接口示例: FLUX.1 [Dev] 文本生成图片本站 AI 中转站POST/fal/fal-ai/flux-1/dev
全部接口FLUX.1 [Dev] 图片生成图片本站 AI 中转站POST/fal/fal-ai/flux-1/dev/image-to-image
全部接口FLUX.1 [Dev] Redux本站 AI 中转站POST/fal/fal-ai/flux-1/dev/redux

GET /fal/{platform}/{{model_name}}/requests/{{request_id}}

### 获取请求结果
fal.ai 是一个 AI 绘图、视频模型聚合平台,支持众多模型
fal.ai 官方 API 格式调用;仅需替换 api 地址和 key 即可无缝替换;
支持 Fal 官方所有模型调用,具体请求参数请看官方模型文档:
计费方式与 Fal.ai 一致,查询接口有返回消费

请求与响应结构
{
    "summary": "获取请求结果",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "required": [
                            "images",
                            "seed",
                            "has_nsfw_concepts",
                            "prompt",
                            "timings"
                        ],
                        "properties": {
                            "seed": {
                                "type": "integer",
                                "description": "生成图片时采用的随机种子"
                            },
                            "images": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "required": [
                                        "url",
                                        "content_type"
                                    ],
                                    "properties": {
                                        "url": {
                                            "type": "string",
                                            "description": "生成图片的下载链接"
                                        },
                                        "content_type": {
                                            "type": "string",
                                            "description": "图片类型(如 image/jpeg)"
                                        }
                                    }
                                },
                                "description": "生成图片文件信息数组"
                            },
                            "prompt": {
                                "type": "string",
                                "description": "此次图片生成使用的 prompt"
                            },
                            "timings": {
                                "type": "object",
                                "properties": [],
                                "description": "请求及生成消耗的时间信息"
                            },
                            "has_nsfw_concepts": {
                                "type": "array",
                                "items": {
                                    "type": "boolean"
                                },
                                "description": "判断每张图片是否包含敏感内容"
                            }
                        }
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [
        {
            "in": "path",
            "name": "platform",
            "schema": {
                "type": "string"
            },
            "required": true,
            "description": ""
        }
    ],
    "description": "### 获取请求结果\nfal.ai 是一个 AI 绘图、视频模型聚合平台,支持众多模型\nfal.ai 官方 API 格式调用;仅需替换 api 地址和 key 即可无缝替换; \n支持 Fal 官方所有模型调用,具体请求参数请看官方模型文档: \n计费方式与 Fal.ai 一致,查询接口有返回消费"
}

POST /fal-ai/flux-1/schnell/redux

请求与响应结构
{
    "summary": "FLUX.1 [Schell] Redux",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "required": [
                            "status",
                            "request_id",
                            "response_url",
                            "status_url",
                            "cancel_url",
                            "logs",
                            "metrics",
                            "queue_position"
                        ],
                        "properties": {
                            "logs": {
                                "type": "object",
                                "properties": []
                            },
                            "status": {
                                "type": "string"
                            },
                            "metrics": {
                                "type": "object",
                                "properties": []
                            },
                            "cancel_url": {
                                "type": "string"
                            },
                            "request_id": {
                                "type": "string"
                            },
                            "status_url": {
                                "type": "string"
                            },
                            "response_url": {
                                "type": "string"
                            },
                            "queue_position": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "FLUX.1 [Schell] Redux",
                    "$schema": "",
                    "required": [
                        "image_url"
                    ],
                    "properties": {
                        "seed": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "description": "随机种子,保证可复现"
                        },
                        "image_url": {
                            "type": "string",
                            "description": "输入图片的URL(必填)"
                        },
                        "sync_mode": {
                            "type": "boolean",
                            "default": false,
                            "description": "是否同步返回图片"
                        },
                        "image_size": {
                            "description": "生成图片尺寸,可选字符串或指定宽/高"
                        },
                        "num_images": {
                            "type": "integer",
                            "default": 1,
                            "maximum": 4,
                            "minimum": 1,
                            "description": "生成图片数量"
                        },
                        "num_inference_steps": {
                            "type": "integer",
                            "default": 4,
                            "maximum": 12,
                            "minimum": 1,
                            "description": "推理步数"
                        },
                        "enable_safety_checker": {
                            "type": "boolean",
                            "default": true,
                            "description": "是否启用敏感内容检测"
                        }
                    },
                    "x-apifox-id": "309503830"
                }
            }
        },
        "required": true
    }
}

POST /fal-ai/flux-pro/kontext

请求与响应结构
{
    "summary": "FLUX.1 Kontext [Pro]",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "required": [
                            "status",
                            "request_id",
                            "response_url",
                            "status_url",
                            "cancel_url",
                            "queue_position"
                        ],
                        "properties": {
                            "status": {
                                "type": "string"
                            },
                            "cancel_url": {
                                "type": "string"
                            },
                            "request_id": {
                                "type": "string"
                            },
                            "status_url": {
                                "type": "string"
                            },
                            "response_url": {
                                "type": "string"
                            },
                            "queue_position": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "FLUX.1 Kontext [Pro]",
                    "$schema": "",
                    "required": [
                        "prompt"
                    ],
                    "properties": {
                        "seed": {
                            "type": "integer",
                            "description": "随机种子,设置相同的 seed 和 prompt 会输出相同的图片(可选)"
                        },
                        "prompt": {
                            "type": "string",
                            "description": "用于生成图片的文本描述(必须)"
                        },
                        "sync_mode": {
                            "type": "boolean",
                            "description": "同步模式,若为 true,则直接返回图片内容(可选)"
                        },
                        "num_images": {
                            "type": "integer",
                            "default": 1,
                            "description": "生成图片数量,默认为1(可选)"
                        },
                        "aspect_ratio": {
                            "enum": [
                                "21:9",
                                "16:9",
                                "4:3",
                                "3:2",
                                "1:1",
                                "2:3",
                                "3:4",
                                "9:16",
                                "9:21"
                            ],
                            "type": "string",
                            "default": "1:1",
                            "description": "图片输出宽高比,默认 1:1(可选)"
                        },
                        "output_format": {
                            "enum": [
                                "jpeg",
                                "png"
                            ],
                            "type": "string",
                            "default": "jpeg",
                            "description": "图片输出格式,支持 jpeg 或 png,默认 jpeg(可选)"
                        },
                        "guidance_scale": {
                            "type": "number",
                            "default": 3.5,
                            "description": "CFG 指导强度,决定生成图片是否更贴合 prompt,默认值3.5(可选)"
                        },
                        "safety_tolerance": {
                            "enum": [
                                "1",
                                "2",
                                "3",
                                "4",
                                "5",
                                "6"
                            ],
                            "type": "string",
                            "default": "2",
                            "description": "内容安全容忍度,1最严格,6最宽松,默认2(API专有,可选)"
                        }
                    },
                    "x-apifox-id": "309256309"
                }
            }
        },
        "required": true
    }
}

POST /fal-ai/flux-pro/kontext/max

请求与响应结构
{
    "summary": "FLUX.1 Kontext [Max]",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "required": [
                            "status",
                            "request_id",
                            "response_url",
                            "status_url",
                            "cancel_url",
                            "queue_position"
                        ],
                        "properties": {
                            "status": {
                                "type": "string"
                            },
                            "cancel_url": {
                                "type": "string"
                            },
                            "request_id": {
                                "type": "string"
                            },
                            "status_url": {
                                "type": "string"
                            },
                            "response_url": {
                                "type": "string"
                            },
                            "queue_position": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "FLUX.1 Kontext [Max]",
                    "$schema": "",
                    "required": [
                        "prompt",
                        "image_url"
                    ],
                    "properties": {
                        "seed": {
                            "type": "integer",
                            "description": "随机种子,保证同样输入下生成一致的图片。可选"
                        },
                        "prompt": {
                            "type": "string",
                            "examples": [
                                "Put a donut next to the flour."
                            ],
                            "description": "提示词,对图片进行的编辑描述。例如:'把甜甜圈放在面粉旁边'"
                        },
                        "image_url": {
                            "type": "string",
                            "examples": [
                                ""
                            ],
                            "description": "要编辑的图片URL,必填,建议使用公开可访问的图片链接"
                        },
                        "sync_mode": {
                            "type": "boolean",
                            "default": false,
                            "description": "同步模式,true时等待图片生成完成并直接返回图片,false时通过CDN获取图片。默认 false"
                        },
                        "num_images": {
                            "type": "integer",
                            "default": 1,
                            "maximum": 4,
                            "minimum": 1,
                            "description": "生成图片数量,取值1-4,默认1"
                        },
                        "aspect_ratio": {
                            "type": "string",
                            "description": "图片宽高比,可选如:21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21"
                        },
                        "output_format": {
                            "enum": [
                                "jpeg",
                                "png"
                            ],
                            "type": "string",
                            "default": "jpeg",
                            "description": "图片格式,jpeg 或 png,默认 jpeg"
                        },
                        "guidance_scale": {
                            "type": "number",
                            "default": 3.5,
                            "description": "CFG 值,控制模型对prompt的遵循度,默认 3.5,可选,范围1-20。"
                        },
                        "safety_tolerance": {
                            "enum": [
                                "1",
                                "2",
                                "3",
                                "4",
                                "5",
                                "6"
                            ],
                            "type": "string",
                            "default": "2",
                            "description": "安全容忍等级,1最严格,6最宽松,默认2"
                        }
                    },
                    "x-apifox-id": "309292279"
                }
            }
        },
        "required": true
    }
}

POST /fal-ai/flux-pro/kontext/max/multi

请求与响应结构
{
    "summary": "FLUX.1 Kontext [Max Multi](实验性多图编辑)",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "title": "FluxKontextOutput 响应体",
                        "required": [
                            "status",
                            "request_id",
                            "response_url",
                            "status_url",
                            "cancel_url",
                            "queue_position"
                        ],
                        "properties": {
                            "status": {
                                "type": "string"
                            },
                            "cancel_url": {
                                "type": "string"
                            },
                            "request_id": {
                                "type": "string"
                            },
                            "status_url": {
                                "type": "string"
                            },
                            "response_url": {
                                "type": "string"
                            },
                            "queue_position": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "FLUX.1 Kontext [Max Multi](实验性多图编辑)",
                    "$schema": "",
                    "required": [
                        "prompt",
                        "image_urls"
                    ],
                    "properties": {
                        "seed": {
                            "type": "integer",
                            "description": "随机种子,传入相同参数时图片结果保持一致"
                        },
                        "prompt": {
                            "type": "string",
                            "examples": [
                                "Put the little duckling on top of the woman's t-shirt."
                            ],
                            "description": "文本描述,模型将根据该描述及图片内容进行编辑"
                        },
                        "sync_mode": {
                            "type": "boolean",
                            "default": false,
                            "description": "同步模式。true时会等待图片生成并上传再返回,适合需要直接获得图片内容时"
                        },
                        "image_urls": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "format": "uri",
                                "description": "图片的公网可访问URL,如"
                            },
                            "minItems": 1,
                            "description": "批量编辑的图片列表,支持多张图片"
                        },
                        "num_images": {
                            "type": "integer",
                            "default": 1,
                            "maximum": 4,
                            "minimum": 1,
                            "description": "生成图片数量"
                        },
                        "aspect_ratio": {
                            "enum": [
                                "21:9",
                                "16:9",
                                "4:3",
                                "3:2",
                                "1:1",
                                "2:3",
                                "3:4",
                                "9:16",
                                "9:21"
                            ],
                            "type": "string",
                            "description": "输出图片比例"
                        },
                        "output_format": {
                            "enum": [
                                "jpeg",
                                "png"
                            ],
                            "type": "string",
                            "default": "jpeg",
                            "description": "输出图片格式"
                        },
                        "guidance_scale": {
                            "type": "number",
                            "default": 3.5,
                            "description": "提示词遵循程度 (Classifier Free Guidance Scale),数值越大越贴合prompt"
                        },
                        "safety_tolerance": {
                            "enum": [
                                "1",
                                "2",
                                "3",
                                "4",
                                "5",
                                "6"
                            ],
                            "type": "string",
                            "default": "2",
                            "description": "安全容忍度,1最严格(内容少),6最宽松(内容多)"
                        }
                    },
                    "x-apifox-id": "309299431"
                }
            }
        },
        "required": true
    }
}

POST /fal-ai/flux-pro/kontext/multi

### FLUX.1 Kontext [Multi](实验性多图编辑)
实验性多图像编辑API,支持对多张图片,结合文本提示进行图像内容上下文理解和修改。广泛用于AI图片编辑、修图等场景。

请求与响应结构
{
    "summary": "FLUX.1 Kontext [Multi](实验性多图编辑)",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "required": [
                            "status",
                            "request_id",
                            "response_url",
                            "status_url",
                            "cancel_url",
                            "queue_position"
                        ],
                        "properties": {
                            "status": {
                                "type": "string"
                            },
                            "cancel_url": {
                                "type": "string"
                            },
                            "request_id": {
                                "type": "string"
                            },
                            "status_url": {
                                "type": "string"
                            },
                            "response_url": {
                                "type": "string"
                            },
                            "queue_position": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "### FLUX.1 Kontext [Multi](实验性多图编辑)\n实验性多图像编辑API,支持对多张图片,结合文本提示进行图像内容上下文理解和修改。广泛用于AI图片编辑、修图等场景。",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "FLUX.1 Kontext [Multi](实验性多图编辑)",
                    "$schema": "",
                    "required": [
                        "prompt",
                        "image_urls"
                    ],
                    "properties": {
                        "seed": {
                            "type": "integer",
                            "description": "生成图片的随机种子(可选,相同seed可复刻同样生成结果)"
                        },
                        "prompt": {
                            "type": "string",
                            "description": "描述你想对图片实现的编辑目标。必填。"
                        },
                        "sync_mode": {
                            "type": "boolean",
                            "description": "是否同步返回结果,true同步返回图片,false异步(推荐)"
                        },
                        "image_urls": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            },
                            "description": "要编辑的图片URL列表。必填。"
                        },
                        "num_images": {
                            "type": "integer",
                            "description": "返回图片数量,1-4"
                        },
                        "aspect_ratio": {
                            "enum": [
                                "21:9",
                                "16:9",
                                "4:3",
                                "3:2",
                                "1:1",
                                "2:3",
                                "3:4",
                                "9:16",
                                "9:21"
                            ],
                            "type": "string",
                            "description": "可选。输出图片宽高比。如'16:9'"
                        },
                        "output_format": {
                            "enum": [
                                "jpeg",
                                "png"
                            ],
                            "type": "string",
                            "description": "图片返回格式,可选jpeg/png"
                        },
                        "guidance_scale": {
                            "type": "number",
                            "description": "引导强度,数值越大越偏向prompt描述,默认3.5"
                        },
                        "safety_tolerance": {
                            "enum": [
                                "1",
                                "2",
                                "3",
                                "4",
                                "5",
                                "6"
                            ],
                            "type": "string",
                            "description": "风险内容检测敏感级别。1最严,6最宽松"
                        }
                    },
                    "x-apifox-id": "309320132"
                }
            }
        },
        "required": true
    }
}

POST /fal-ai/flux-pro/kontext/text-to-image

### FLUX.1 Kontext [Max] 文本转图像
FLUX.1 Kontext [max] 是一款高性能文本转图像AI模型,支持高还原文本描述生成高质量图片,且在各种细节和风格领域表现突出。

请求与响应结构
{
    "summary": "FLUX.1 Kontext [Max] 文本转图像",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "title": "FLUX.1 Kontext Max 文本转图像响应参数",
                        "required": [
                            "status",
                            "request_id",
                            "response_url",
                            "status_url",
                            "cancel_url",
                            "queue_position"
                        ],
                        "properties": {
                            "status": {
                                "type": "string"
                            },
                            "cancel_url": {
                                "type": "string"
                            },
                            "request_id": {
                                "type": "string"
                            },
                            "status_url": {
                                "type": "string"
                            },
                            "response_url": {
                                "type": "string"
                            },
                            "queue_position": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "### FLUX.1 Kontext [Max] 文本转图像\nFLUX.1 Kontext [max] 是一款高性能文本转图像AI模型,支持高还原文本描述生成高质量图片,且在各种细节和风格领域表现突出。",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "FLUX.1 Kontext [Max] 文本转图像",
                    "$schema": "",
                    "required": [
                        "prompt"
                    ],
                    "properties": {
                        "seed": {
                            "type": "integer",
                            "description": "随机种子,相同seed将产生相同图片。"
                        },
                        "prompt": {
                            "type": "string",
                            "examples": [
                                "一只猫咪在宇宙飞船里俯瞰地球"
                            ],
                            "description": "生成图片的文本提示"
                        },
                        "sync_mode": {
                            "type": "boolean",
                            "default": false,
                            "description": "是否同步等待图片生成功能,true时接口直接返回图像,latency更高。"
                        },
                        "num_images": {
                            "type": "integer",
                            "maximum": 4,
                            "minimum": 1,
                            "description": "一次生成图片数量,默认1,最多4。"
                        },
                        "aspect_ratio": {
                            "enum": [
                                "21:9",
                                "16:9",
                                "4:3",
                                "3:2",
                                "1:1",
                                "2:3",
                                "3:4",
                                "9:16",
                                "9:21"
                            ],
                            "type": "string",
                            "default": "1:1",
                            "description": "长宽比例,默认1:1"
                        },
                        "output_format": {
                            "enum": [
                                "jpeg",
                                "png"
                            ],
                            "type": "string",
                            "default": "jpeg",
                            "description": "生成图片的格式,支持jpeg/png,默认jpeg。"
                        },
                        "guidance_scale": {
                            "type": "number",
                            "description": "CFG 指令引导参数,决定图片与 prompt 的贴合度,默认3.5,取值范围[1,20]。"
                        },
                        "safety_tolerance": {
                            "enum": [
                                "1",
                                "2",
                                "3",
                                "4",
                                "5",
                                "6"
                            ],
                            "type": "string",
                            "default": "2",
                            "description": "安全容忍度,1最严格,6最宽松。默认2。"
                        }
                    },
                    "x-apifox-id": "309304467"
                }
            }
        },
        "required": true
    }
}

POST /fal-ai/flux-pro/kontext/text-to-image

### FLUX.1 Kontext [Max] 文本转图像
FLUX.1 Kontext [max] 是一款高性能文本转图像AI模型,支持高还原文本描述生成高质量图片,且在各种细节和风格领域表现突出。

请求与响应结构
{
    "summary": "FLUX.1 Kontext [Max] 文本转图像",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "title": "FLUX.1 Kontext Max 文本转图像响应参数",
                        "required": [
                            "status",
                            "request_id",
                            "response_url",
                            "status_url",
                            "cancel_url",
                            "queue_position"
                        ],
                        "properties": {
                            "status": {
                                "type": "string"
                            },
                            "cancel_url": {
                                "type": "string"
                            },
                            "request_id": {
                                "type": "string"
                            },
                            "status_url": {
                                "type": "string"
                            },
                            "response_url": {
                                "type": "string"
                            },
                            "queue_position": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "### FLUX.1 Kontext [Max] 文本转图像\nFLUX.1 Kontext [max] 是一款高性能文本转图像AI模型,支持高还原文本描述生成高质量图片,且在各种细节和风格领域表现突出。",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "FLUX.1 Kontext [Max] 文本转图像",
                    "$schema": "",
                    "required": [
                        "prompt"
                    ],
                    "properties": {
                        "seed": {
                            "type": "integer",
                            "description": "随机种子,相同seed将产生相同图片。"
                        },
                        "prompt": {
                            "type": "string",
                            "examples": [
                                "一只猫咪在宇宙飞船里俯瞰地球"
                            ],
                            "description": "生成图片的文本提示"
                        },
                        "sync_mode": {
                            "type": "boolean",
                            "default": false,
                            "description": "是否同步等待图片生成功能,true时接口直接返回图像,latency更高。"
                        },
                        "num_images": {
                            "type": "integer",
                            "maximum": 4,
                            "minimum": 1,
                            "description": "一次生成图片数量,默认1,最多4。"
                        },
                        "aspect_ratio": {
                            "enum": [
                                "21:9",
                                "16:9",
                                "4:3",
                                "3:2",
                                "1:1",
                                "2:3",
                                "3:4",
                                "9:16",
                                "9:21"
                            ],
                            "type": "string",
                            "default": "1:1",
                            "description": "长宽比例,默认1:1"
                        },
                        "output_format": {
                            "enum": [
                                "jpeg",
                                "png"
                            ],
                            "type": "string",
                            "default": "jpeg",
                            "description": "生成图片的格式,支持jpeg/png,默认jpeg。"
                        },
                        "guidance_scale": {
                            "type": "number",
                            "description": "CFG 指令引导参数,决定图片与 prompt 的贴合度,默认3.5,取值范围[1,20]。"
                        },
                        "safety_tolerance": {
                            "enum": [
                                "1",
                                "2",
                                "3",
                                "4",
                                "5",
                                "6"
                            ],
                            "type": "string",
                            "default": "2",
                            "description": "安全容忍度,1最严格,6最宽松。默认2。"
                        }
                    },
                    "x-apifox-id": "309326161"
                }
            }
        },
        "required": true
    }
}

POST /fal/fal-ai/flux-1/dev

### 示例: FLUX.1 [Dev] 文本生成图片
fal.ai 是一个 AI 绘图、视频模型聚合平台,支持众多模型
fal.ai 官方 API 格式调用;仅需替换 api 地址和 key 即可无缝替换;
支持 Fal 官方所有模型调用,具体请求参数请看官方模型文档:
计费方式与 Fal.ai 一致,查询接口有返回消费

请求与响应结构
{
    "summary": "示例: FLUX.1 [Dev] 文本生成图片",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "properties": []
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "### 示例: FLUX.1 [Dev] 文本生成图片\nfal.ai 是一个 AI 绘图、视频模型聚合平台,支持众多模型\nfal.ai 官方 API 格式调用;仅需替换 api 地址和 key 即可无缝替换; \n支持 Fal 官方所有模型调用,具体请求参数请看官方模型文档: \n计费方式与 Fal.ai 一致,查询接口有返回消费",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "示例: FLUX.1 [Dev] 文本生成图片",
                    "$schema": "",
                    "required": [
                        "prompt"
                    ],
                    "properties": {
                        "seed": {
                            "type": "integer",
                            "description": "随机数种子,设置后同样描述和参数多次请求生成一致图片。"
                        },
                        "prompt": {
                            "type": "string",
                            "description": "图片描述词,即你期望模型生成的场景、内容描述。必填项。"
                        },
                        "sync_mode": {
                            "type": "boolean",
                            "description": "同步生成(true则等图片上传后直接返回,false则异步,默认false)。"
                        },
                        "image_size": {
                            "description": "预设图片尺寸(或自定义分辨率,见下),默认 landscape_4_3。"
                        },
                        "num_images": {
                            "type": "integer",
                            "description": "生成图片数量(最大4)。默认 1。"
                        },
                        "guidance_scale": {
                            "type": "number",
                            "description": "引导系数(数值越大图片内容更贴近prompt),默认3.5,范围1~20。"
                        },
                        "num_inference_steps": {
                            "type": "integer",
                            "description": "推理迭代步数,影响图片精细度,默认28,范围1~50。"
                        },
                        "enable_safety_checker": {
                            "type": "boolean",
                            "description": "启用内容安全检查(默认true)。"
                        }
                    },
                    "definitions": {
                        "ImageSize": {
                            "type": "object",
                            "properties": {
                                "width": {
                                    "type": "integer",
                                    "description": "自定义宽度,默认512,最大14142。"
                                },
                                "height": {
                                    "type": "integer",
                                    "description": "自定义高度,默认512,最大14142。"
                                }
                            }
                        }
                    },
                    "x-apifox-id": "309502688"
                }
            }
        },
        "required": true
    }
}

POST /fal/fal-ai/flux-1/dev/image-to-image

请求与响应结构
{
    "summary": "FLUX.1 [Dev] 图片生成图片",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "properties": []
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "FLUX.1 [Dev] 图片生成图片",
                    "$schema": "",
                    "required": [
                        "image_url",
                        "prompt"
                    ],
                    "properties": {
                        "seed": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "description": "随机种子 — 用于结果复现,同样参数和 seed 会得到一致结果。可为空"
                        },
                        "prompt": {
                            "type": "string",
                            "examples": [
                                "a cat dressed as a wizard with a background of a mystic forest."
                            ],
                            "description": "文本提示,用于描述需要生成哪种风格或内容(必填)"
                        },
                        "strength": {
                            "type": "number",
                            "default": 0.95,
                            "maximum": 1,
                            "minimum": 0.01,
                            "description": "初始图片风格保留程度,越高保留越多(默认0.95,推荐)"
                        },
                        "image_url": {
                            "type": "string",
                            "examples": [
                                ""
                            ],
                            "description": "原始图片的公网 URL。(必填)"
                        },
                        "sync_mode": {
                            "type": "boolean",
                            "default": false,
                            "description": "是否启用同步模式。如果为 true,接口会等待图片生成完毕后返回。建议异步(false)"
                        },
                        "num_images": {
                            "type": "integer",
                            "default": 1,
                            "maximum": 4,
                            "minimum": 1,
                            "description": "要生成的图片数量(默认1张,最多4张)"
                        },
                        "guidance_scale": {
                            "type": "number",
                            "default": 3.5,
                            "maximum": 20,
                            "minimum": 1,
                            "description": "控制生成图片与 prompt 的契合程度,数值越高越接近prompt(默认3.5)"
                        },
                        "num_inference_steps": {
                            "type": "integer",
                            "default": 40,
                            "maximum": 50,
                            "minimum": 10,
                            "description": "生成采样步数,步数越多,图片质量可能越高但速度更慢(默认40)"
                        },
                        "enable_safety_checker": {
                            "type": "boolean",
                            "default": true,
                            "description": "是否启用安全检测,过滤不安全内容(默认true)"
                        }
                    },
                    "x-apifox-id": "309501877"
                }
            }
        },
        "required": true
    }
}

POST /fal/fal-ai/flux-1/dev/redux

请求与响应结构
{
    "summary": "FLUX.1 [Dev] Redux",
    "responses": {
        "200": {
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "properties": []
                    }
                }
            },
            "description": "成功"
        }
    },
    "parameters": [],
    "description": "",
    "requestBody": {
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "title": "FLUX.1 [Dev] Redux",
                    "$schema": "",
                    "required": [
                        "image_url",
                        "image_size",
                        "num_inference_steps",
                        "seed",
                        "guidance_scale",
                        "sync_mode",
                        "num_images",
                        "enable_safety_checker"
                    ],
                    "properties": {
                        "seed": {
                            "type": "integer",
                            "description": "可选。随机种子,重复使用可复现图片,可为null"
                        },
                        "image_url": {
                            "type": "string",
                            "description": "必填。要生成新图片的原图URL"
                        },
                        "sync_mode": {
                            "type": "boolean",
                            "description": "可选。是否同步等待图片生成(true同步返回结果,false为异步,推荐异步)"
                        },
                        "image_size": {
                            "type": "string"
                        },
                        "num_images": {
                            "type": "integer",
                            "description": "可选。生成图片数量,默认1,1-4"
                        },
                        "guidance_scale": {
                            "type": "number",
                            "description": "可选。CFG引导尺度,影响图片生成与Prompt的贴合程度,范围1-20"
                        },
                        "num_inference_steps": {
                            "type": "integer",
                            "description": "可选。推理步数,默认28,范围1-50"
                        },
                        "enable_safety_checker": {
                            "type": "boolean",
                            "description": "可选。是否启用安全检测,默认true"
                        }
                    },
                    "x-apifox-id": "309504286"
                }
            }
        },
        "required": true
    }
}

价格

价格组渠道计费项价格单位
fal.ai-all AI 中转站requestCNY 5request

服务级错误码参照(error_code):

  错误码 说明
  221301 数据源超时
  221303 认证失败

认证失败,请稍后重试
认证失败,该卡当日连续多次认证不通过被限制校验,次日恢复
  221306 参数错误

参数错误:姓名格式不正确
参数错误:手机号格式不正确
参数错误:身份证格式不正确
参数错误:银行卡号格式不正确
同一银行卡请求过于频繁

系统级错误码参照:

  错误码 说明
  10001 错误的请求KEY
  10002 该KEY无请求权限
  10003 KEY过期
  10004 错误的OPENID
  10005 应用未审核超时,请提交认证
  10007 未知的请求源
  10008 被禁止的IP
  10009 被禁止的KEY
  10011 当前IP请求超过限制
  10012 请求超过次数限制
  10013 测试KEY超过请求限制
  10014 系统内部异常(调用充值类业务时,请务必联系客服或通过订单查询接口检测订单,避免造成损失)
  10020 接口维护
  10021 接口停用

错误码格式说明(示例:200201):

  2 002 01
  服务级错误(1为系统级错误) 服务模块代码(即数据ID) 具体错误代码

使用文档下载

fal-ai/*
--
今日调用
--
成功率
--
近期调用

推荐API

  • gemini-3.8-flash-thinking-medium

    Gemini 3.8 Flash 是我们最智能的 Flash 模型,专为长远软件工程、自主代理和复杂企业工作流程设计——所有这些都具备 Flash 的速度和成本效益。
  • gemini-3.7-flash-thinking-low

  • gemini-3.8-flash-thinking-low

    Gemini 3.8 Flash 是我们最智能的 Flash 模型,专为长远软件工程、自主代理和复杂企业工作流程设计——所有这些都具备 Flash 的速度和成本效益。
  • gemini-3.7-flash-thinking-medium

  • gemini-3.8-flash-thinking-high

    Gemini 3.8 Flash 是我们最智能的 Flash 模型,专为长远软件工程、自主代理和复杂企业工作流程设计——所有这些都具备 Flash 的速度和成本效益。
  • gemini-3.8-flash

    Gemini 3.8 Flash 是我们最智能的 Flash 模型,专为长远软件工程、自主代理和复杂企业工作流程设计——所有这些都具备 Flash 的速度和成本效益。

API资讯

数 据 驱 动 未 来
Data Drives The Future
数 据 驱 动 未 来
Data Drives The Future