acestep
AI music generation with ACE-Step 1.5 — background music, vocal tracks, covers, stem extraction for video production. Use when generating music, soundtracks,…
BFL FLUX API integration guide covering endpoints, async polling patterns, rate limiting, error handling, webhooks, and regional endpoints with Python and TypeScript code examples.
$ npx -y skills add calesthio/OpenMontage --skill bfl-api --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/bfl-apiContext preview
The summary Claude sees to decide when to auto-load this skill.
BFL FLUX API integration guide covering endpoints, async polling patterns, rate limiting, error handling, webhooks, and regional endpoints with Python and TypeScript code examples.
name: bfl-api description: BFL FLUX API integration guide covering endpoints, async polling patterns, rate limiting, error handling, webhooks, and regional endpoints with Python and TypeScript code examples. metadata: author: Black Forest Labs version: "1.0.0" tags: flux, bfl, api, integration, webhooks, rate-limiting
Use this skill when integrating BFL FLUX APIs into applications for image generation, editing, and processing.
**Before generating images, verify your API key is set:**
echo $BFL_API_KEY
If empty or you see "Not authenticated" errors, see [API Key Setup](#api-key-setup) below.
Result URLs from the API are temporary. Download images immediately after generation completes - do not store or cache the URLs themselves.
| Region | Endpoint | Use Case | | ------ | ----------------------- | --------------------------- | | Global | `https://api.bfl.ai` | Default, automatic failover | | EU | `https://api.eu.bfl.ai` | GDPR compliance | | US | `https://api.us.bfl.ai` | US data residency |
> **Credit pricing:** 1 credit = $0.01 USD. FLUX.2 uses megapixel-based pricing (cost scales with resolution).
| Model | Path | 1st MP | +MP | 1MP T2I | 1MP I2I | Best For | | ----------------- | --------------------- | ------ | ---- | ------- | ------- | ---------------------------------- | | FLUX.2 [klein] 4B | `/v1/flux-2-klein-4b` | 1.4c | 0.1c | $0.014 | $0.015 | Real-time, high volume | | FLUX.2 [klein] 9B | `/v1/flux-2-klein-9b` | 1.5c | 0.2c | $0.015 | $0.017 | Balanced quality/speed | | FLUX.2 [pro] | `/v1/flux-2-pro` | 3c | 1.5c | $0.03 | $0.045 | Production, fast turnaround | | FLUX.2 [max] | `/v1/flux-2-max` | 7c | 3c | $0.07 | $0.10 | Maximum quality | | FLUX.2 [flex] | `/v1/flux-2-flex` | 5c | 5c | $0.05 | $0.10 | Typography, adjustable controls | | FLUX.2 [dev] | - | - | - | Free | Free | Local development (non-commercial) |
> **Pricing formula:** `(firstMP + (outputMP-1) * mpPrice) + (inputMP * mpPrice)` in cents
| Model | Path | Price/Image | Best For | | -------------------- | ------------------------ | ----------- | ----------------------------- | | FLUX.1 Kontext [pro] | `/v1/flux-kontext` | $0.04 | Image editing with context | | FLUX.1 Kontext [max] | `/v1/flux-kontext-max` | $0.08 | Max quality editing | | FLUX1.1 [pro] | `/v1/flux-pro-1.1` | $0.04 | Standard T2I, fast & reliable | | FLUX1.1 [pro] Ultra | `/v1/flux-pro-1.1-ultra` | $0.06 | Ultra high-resolution | | FLUX1.1 [pro] Raw | `/v1/flux-pro-1.1-raw` | $0.06 | Candid photography feel | | FLUX.1 Fill [pro] | `/v1/flux-pro-1.0-fill` | $0.05 | Inpainting |
> **Tip:** All FLUX.2 models support image editing via the `input_image` parameter - no separate editing endpoint needed. Use [bfl.ai/pricing](https://bfl.ai/pricing) calculator for exact costs at different resolutions.
**Preferred: Use URLs directly** - simpler and more convenient than base64.
**Single image editing:**
curl -X POST "https://api.bfl.ai/v1/flux-2-pro" \
-H "x-key: $BFL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Change the background to a sunset",
"input_image": "https://example.com/photo.jpg"
}'**Multi-reference editing:**
curl -X POST "https://api.bfl.ai/v1/flux-2-pro" \
-H "x-key: $BFL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "The person from image 1 in the environment from image 2",
"input_image": "https://example.com/person.jpg",
"input_image_2": "https://example.com/background.jpg"
}'The API fetches URLs automatically. Both URL and base64 work, but URLs are recommended when available.
FLUX.2 models support multiple input images for combining elements, style transfer, and character consistency:
| Model | Max References | | --------------------- | -------------- | | FLUX.2 [klein] | 4 images | | FLUX.2 [pro/max/flex] | 8 images |
**Parameters:** `input_image`, `input_image_2`, `input_image_3`, ... `input_image_8`
**Prompt pattern:** Reference images by number in your prompt:
> For detailed multi-reference patterns (character consistency, style transfer, pose guidance), see `flux-best-practices/rules/multi-reference-editing.md`
| Tier | Concurrent Requests | | ------------------------- | ------------------- | | Standard (most endpoints) | 24 |
| Approach | Use When | | ------------ | ------------------------------------------------------------------------------------ | | **Polling** | Scripts, CLI tools, local development, single requests, simple integrations | | **Webhooks** | Production apps, high volume, server-to-server, when you need immediate notification |
**Start with p
World's first open-source, agentic video production system. 12 production pipelines, 100+ tools, 700+ agent skill and production-knowledge files. Turn your AI coding assistant into a full video production studio.
Repo: calesthio/OpenMontage
AI music generation with ACE-Step 1.5 — background music, vocal tracks, covers, stem extraction for video production. Use when generating music, soundtracks,…
Build voice AI agents with ElevenLabs. Use when creating voice assistants, customer service bots, interactive voice characters, or any real-time voice…
Generate AI videos from text prompts using multiple provider gateways. Use when: (1) Generating videos from text descriptions, (2) Creating AI-generated video…
Create AI avatar videos with precise control over avatars, voices, scripts, scenes, and backgrounds using HeyGen's v2 API. Use when: (1) Choosing a specific…
Transcribe audio to text using Azure AI Speech (Fast Transcription REST API). Use when converting audio/video to text, generating subtitles, or processing…
Generate neural narration audio using Azure AI Speech (REST text-to-speech). Use when synthesizing voiceovers or narration in OpenMontage. Optional cloud TTS…