Flux 生成图像
调用 POST /flux/v1/ 可根据 Prompt 生成 Flux 图像,并在链接过期前通过 get_result 跟踪状态。
Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
概述
/flux/v1/\{model\} 端点使用 Black Forest Labs 的 Flux 模型系列根据文本 Prompt 生成高质量图像。只需替换 URL 路径中的 model ID,即可在不同的 Flux 变体之间切换。
授权
Bearer token authentication. Use your CometAPI key.
请求头
Must be application/json.
路径参数
Flux model variant to use, e.g. flux-pro-1.1, flux-pro, flux-dev, flux-pro-1.1-ultra.
请求体
Text prompt describing the image to generate.
URL of a reference image to guide the generation style or content.
Output image width in pixels. Must be a multiple of 32. Range varies by model.
Output image height in pixels. Must be a multiple of 32. Range varies by model.
Number of diffusion steps. Higher values improve quality but increase latency.
When true, automatically enhances the prompt for more detailed results.
Random seed for reproducible outputs. Omit for random generation.
Guidance scale controlling how closely the output follows the prompt. Higher values increase prompt adherence.
Safety filter tolerance level. Higher values are more permissive. Range: 0–6.
Diversity interval. Higher values produce more varied outputs at the cost of prompt adherence.
Output image format. Supported values: jpeg, png.
URL to receive a POST notification when the task completes.
Secret string included in webhook payloads for request verification.