Loading...
Loading...
Usage guide for the `flux` CLI (@vforsh/flux) to generate and edit images via Black Forest Labs (BFL) FLUX API. Use for setting up the BFL API key, choosing models, generating images, editing with references, inpaint/outpaint, waiting for results, checking credits, using --plain/--json output, and handling common API errors (402/403/429).
npx skill4agent add vforsh/flux fluxexport BFL_API_KEY="..."echo "$BFL_API_KEY" | flux config set apiKeyflux gen "a cat astronaut" --model flux-2-pro --width 1024 --height 1024 -o out/flux edit "make it sunset lighting" --model flux-2-pro --input ./in.jpg -o out/flux gen [prompt]-flux edit [prompt] --input <path|url|base64> [--input ...]flux fill [prompt] --image <path|url|base64> [--mask <path|url|base64>]flux expand [prompt] --image <path|url|base64> [--top/--bottom/--left/--right <px>]flux result <id> [--out <path|->]status=Ready--outflux wait <id> [--polling-url <url>] [--out <path|->]Readyflux creditsflux modelsflux config path|get|set|unset--json--plain-q, --quiet-v, --verbose--endpoint <host>api.bfl.ai--region <us|eu|global>--timeout <ms>--retries <n>--out-dir <dir>--model <key>flux models--seed <n>--safety <n>--format <jpeg|png>-o, --out <path|->---no-waitidpollingUrl--json--poll-interval <ms>--body <json|@file>flux models| Model key | Best for | Pricing tier | Notes |
|---|---|---|---|
| quick drafts; high-volume generation | cheap | MP-based |
| better drafts; still fast iteration | cheap-to-balanced | MP-based |
| default pick; production workflows; general-purpose gen/edit | balanced | MP-based; edits typically cost more than T2I |
| maximum quality with control knobs | premium | MP-based; supports |
| final assets; quality-first; grounding search | premium/most expensive | MP-based |
| controlled edits/variations with multiple references | balanced | credits per call |
| stronger Kontext edits; quality-first | expensive | credits per call |
| FLUX 1.1 behavior; compatibility workflows | balanced | credits per call |
| Ultra mode; aspect-ratio driven generation; optional raw look | expensive | credits per call |
| inpainting (mask/alpha) | expensive | credits per call (tool endpoint) |
| outpainting (extend canvas) | mid-to-expensive | tool endpoint; check returned |
| passthrough via | cheap | credits per call; check returned |
| passthrough via | varies | check returned |
result.sample234034402542967