flux-model
БесплатноБез исполняемых скриптовНе проверенFLUX is Black Forest Labs' family of image generation models (FLUX.2, FLUX 3 Image, and the older FLUX.1 Dev, Schnell and Pro), available through the BFL API…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
FLUX Image Generation Models
Overview
FLUX is made by Black Forest Labs (BFL). The original FLUX.1 trio (Pro, Dev, Schnell) has been superseded; BFL's docs now recommend FLUX.2 for new projects, and FLUX 3 Image is the newest line.
| Model | API endpoint (api.bfl.ai/v1/...) |
Use it for |
|---|---|---|
| FLUX 3 Image | flux-3-image |
Newest image model: text-to-image, editing, up to 10 references, bounding-box layouts |
| FLUX.2 [max] | flux-2-max |
Highest quality, grounded web search for real-world facts |
| FLUX.2 [pro] | flux-2-pro-preview (latest) or flux-2-pro (pinned snapshot) |
Production quality, hex-color control, up to 4MP, multi-reference editing |
| FLUX.2 [flex] | flux-2-flex |
Fine-grained control over generation settings |
| FLUX.2 [klein] | flux-2-klein-4b, flux-2-klein-9b-preview / flux-2-klein-9b |
Sub-second, cheap, open weights (4B Apache 2.0, 9B non-commercial) |
| FLUX.1 [dev] / [schnell] | via fal.ai / Replicate | Legacy; LoRA ecosystem (Dev), 4-step speed (Schnell, Apache 2.0) |
| FLUX1.1 [pro], Kontext | flux-pro-1.1, Kontext endpoints |
Legacy; docs steer new work to FLUX.2 |
Use -preview endpoints for the latest improvements and the unsuffixed ones when you need reproducible output. Prices are in BFL credits (1 credit = $0.01) and change; check bfl.ai/pricing. FLUX.1 [dev] weights and FLUX.2 [klein] 9B / [dev] are non-commercial licensed: commercial use goes through a paid API or license.
Instructions
Provider 1: BFL API (direct, async)
Create a key in the BFL dashboard (dashboard.bfl.ai) and export BFL_API_KEY. Requests are asynchronous: submit, then poll the polling_url from the response (required on api.bfl.ai; use api.eu.bfl.ai or api.us.bfl.ai to keep traffic in a region). The old host api.bfl.ml and the get_result?id= polling URL are legacy.
import os, time, requests
from pathlib import Path
HEADERS = {"x-key": os.environ["BFL_API_KEY"], "accept": "application/json"}
def flux_bfl(prompt: str, endpoint: str = "flux-2-pro-preview", out: str = "output.jpg", **params) -> str:
"""FLUX.2 takes width/height; FLUX 3 Image takes aspect_ratio (and rejects width, height, seed)."""
r = requests.post(f"https://api.bfl.ai/v1/{endpoint}", headers=HEADERS,
json={"prompt": prompt, **params}, timeout=60)
r.raise_for_status()
polling_url = r.json()["polling_url"]
while True:
s = requests.get(polling_url, headers=HEADERS, timeout=60).json()
if s["status"] == "Ready":
break
if s["status"] not in ("Pending", "Reasoning", "Generating"):
# Error, Request Moderated, Content Moderated, Task not found, No Card Generated
raise RuntimeError(f"FLUX request failed: {s}")
time.sleep(1)
img = requests.get(s["result"]["sample"], timeout=60) # result URL expires (10 min on FLUX.2, 1 h on FLUX 3), no CORS
img.raise_for_status()
Path(out).write_bytes(img.content)
return out
flux_bfl("Studio photo of a red running shoe on a white sweep, soft shadow, 85mm lens",
endpoint="flux-2-pro-preview", width=1440, height=1440, out="shoe.jpg")
flux_bfl("Poster with the headline 'Harvest Fair' in #2E7D32 on cream paper, 1950s style",
endpoint="flux-3-image", aspect_ratio="3:4", out="poster.jpg")
Download results immediately: delivery URLs under delivery.*.bfl.ai expire (10 minutes for FLUX.2, 1 hour for FLUX 3 Image) and are not meant to be served to users. Allow *.bfl.ai through firewalls. Hex colors in prompts (#2E7D32) are matched closely by FLUX.2; JSON-structured prompts work for complex scenes. FLUX.2 [klein] does not rewrite prompts, so write them in detail.
Provider 2: fal.ai
pip install fal-client requests
export FAL_KEY=... # key from the fal.ai dashboard
import fal_client, requests
from pathlib import Path
def flux_fal(prompt, model="fal-ai/flux-2-pro", out="output.jpg", **args):
result = fal_client.subscribe(model, arguments={"prompt": prompt, **args})
Path(out).write_bytes(requests.get(result["images"][0]["url"], timeout=60).content)
return out
flux_fal("Minimalist logo of a lighthouse, navy and white, flat vector",
model="fal-ai/flux/schnell", num_inference_steps=4, image_size="square_hd", out="logo.jpg")
flux_fal("Cinematic coffee cup on a wooden desk, morning window light",
model="fal-ai/flux-2-pro", image_size="landscape_16_9", out="coffee.jpg")
Endpoint IDs confirmed on fal.ai: fal-ai/flux-2-pro, fal-ai/flux/dev, fal-ai/flux/schnell, fal-ai/flux-pro/v1.1, fal-ai/flux-lora, fal-ai/flux-2/klein/4b. Parameters differ per endpoint: flux-2-pro accepts image_size, seed, output_format (jpeg/png), safety_tolerance ("1" to "5") and enable_safety_checker, but no step count or guidance. Schnell and flux-lora accept num_inference_steps (defau
Установить flux-model в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл flux-model?
FLUX is Black Forest Labs' family of image generation models (FLUX.2, FLUX 3 Image, and the older FLUX.1 Dev, Schnell and Pro), available through the BFL API, fal.ai and Replicate. Use when generating photorealistic or product images, text-heavy graphics, exact brand colors, image editing with references, fast batch generation, or LoRA styles with FLUX.1 Dev or FLUX.2 klein. Covers model choice, request code for each provider, and licensing.
Как установить скилл flux-model?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл flux-model запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic