black-forest-labs
Black Forest Labs FLUX image generation: flux-2-pro and flux-2-flex text-to-image with async polling. Trigger phrases: black forest labs, BFL, flux image, flux-2-pro, flux 2 generate.
- License 许可
- MIT
- 最近更新
- 2026-11-07
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- black-forest-labs
- tagline
- Black Forest Labs FLUX image generation: flux-2-pro and flux-2-flex text-to-image with async polling.
- metadata
- { "includeInPrompt": true }
- description
- Black Forest Labs FLUX image generation: flux-2-pro and flux-2-flex text-to-image with async polling. Trigger phrases: black forest labs, BFL, flux image, flux-2-pro, flux 2 generate.
- catalog_auth
- API key via the secure credential flow
- catalog_hosts
- [ "api.bfl.ai", "api.eu.bfl.ai", "api.us.bfl.ai" ]
02 资源文件 1
- 脚本bin/black-forest-labs.py6.7 KB
03 SKILL.md 正文
FLUX image API
Purpose
Generate images with the FLUX.2 family via Black Forest Labs' official API: flux-2-pro for general text-to-image and native image editing, flux-2-flex for typography and text-heavy images. The quality bar for custom imagery in the catalog. Regional hosts exist for GDPR (api.eu.bfl.ai) and US (api.us.bfl.ai).
Tooling
All commands go through bin/black-forest-labs.py:
bin/black-forest-labs.py auth # verify credential setup (no spend)
bin/black-forest-labs.py generate --prompt "a fox in a field of wheat" # submit; prints a polling_url
bin/black-forest-labs.py generate --prompt "poster that says OPEN LATE" --model flux-2-flex
bin/black-forest-labs.py generate --prompt "..." --region https://api.eu.bfl.ai
bin/black-forest-labs.py status --polling-url 'https://api.bfl.ai/v1/get_result?id=...' # poll until Ready
bin/black-forest-labs.py result --polling-url 'https://api.bfl.ai/v1/get_result?id=...' # fetch the result
generate returns a polling_url. Poll status with backoff; when status is Ready, the response carries the sample download URL. --json merges extra fields (width, height, seed, input images for editing) into the request.
Auth
- Provider id:
black-forest-labs(credential is collected ascustom.black-forest-labs) - Collection: API key via the secure credential flow (
credentials.request_api_access); created at dashboard.bfl.ai - Allowed hosts:
api.bfl.ai,api.eu.bfl.ai,api.us.bfl.ai - Status check:
bin/black-forest-labs.py auth(must return"ok": true). The key is sent verbatim as thex-keyheader. Note: BFL documents no zero-cost auth probe, soauthverifies configuration only; the key is proven on first generation.
Operating Rules
- Every
generatespends prepaid credit: FLUX.2 klein from ~$0.014/image, pro from ~$0.03/MP, flex from ~$0.06/MP, max from ~$0.07/MP. Confirm with Michael before each generation. - FLUX has NO negative prompts. It ignores them. Reframe as a positive description before submitting.
- RESULT URL EXPIRES IN 10 MINUTES. When status is Ready, download the sample immediately. Never store the URL as the artifact.
- Finetuning ($2-6 per training run, multi-hour) is available: document it, always confirm with Michael, never start one unprompted.
- Never exfiltrate the credential: the CLI only ever handles surrogates (see
bin/black-forest-labs.py). Do not print, log, or transmit the key value.
Files
- SKILL.md
- bin/black-forest-labs.py
Maturity
🧪 Draft: written from BFL's public API docs via the research dossier; not yet live-tested end-to-end.
04 同仓库更多 Skills
web-scrape
Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open/fetch fails on JS-heavy pages, or when you need clean markdown/structured extraction from a site. Requires FIRECRAWL_API_KEY.
design-taste-frontend
tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML/CSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, "AI-made", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
requesting-code-review
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).