Available Models
| Model | Description |
|---|---|
| FLUX.2 [pro] | Latest model with t2i & i2i (up to 9 images) - Recommended |
| FLUX.2 [flex] | Customizable generation and editing (up to 10 images, up to 14 MP total input) |
| FLUX.1.1 [pro] | Fast, high-quality generation |
| FLUX.1.1 [pro] Ultra | Maximum quality up to 4MP resolution |
| FLUX.1 Kontext [pro] | Context-aware generation and editing |
| FLUX.1 Kontext [max] | Advanced context editing |
| FLUX.1 Fill [pro] | Intelligent inpainting |
| FLUX.1 Expand [pro] | Smart outpainting |
Setup Instructions
Claude Desktop
1
Get your BFL API key
Sign up at Black Forest Labs to obtain your API key.
2
Open Claude Desktop configuration
Locate your configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
3
Add MCP server configuration
Add the following configuration to your
claude_desktop_config.json file:4
Restart Claude Desktop
Quit and restart Claude Desktop to load the new MCP server configuration. The FLUX tools will appear automatically in Claudeâs tool list.
Claude.ai
1
Get your BFL API key
Sign up at Black Forest Labs to obtain your API key.
2
Access Custom Connectors
Navigate to Claude.ai and go to Settings â Custom Connectors.
3
Add a new connector
Configure the connector with the following details:
- URL:
https://flux-mcp-bfl-e21faf2e.koyeb.app/ - Headers: Add a custom header
- Name:
x-key - Value: Your BFL API key
- Name:
4
Save and start using
Save the connector configuration and start a new conversation. You can now ask Claude to generate images using FLUX models.
Usage
Once configured, ask Claude to generate or edit images using natural language:- âGenerate an image of a sunset over mountainsâ
- âCreate a portrait of a robot in cyberpunk styleâ
- âEdit this image to change the sky to a dramatic sunsetâ
- âExpand this image to make it widerâ
Pricing
You are billed directly by Black Forest Labs based on your API usage. Each user uses their own API key for full cost control. Standard BFL API pricing applies - see bfl.ai/pricing.Technical Details
Authentication
Your API key is passed via thex-key header with each request. This provides secure per-user authentication.
Available Tools
| Tool Name | Endpoint |
|---|---|
| Generate images with FLUX 2 Pro (recommended) | /v1/flux-2-pro |
| Generate images with FLUX 2 Flex | /v1/flux-2-flex |
| Generate images with FLUX 1.1 Pro | /v1/flux-pro-1.1 |
| Generate images with FLUX 1.1 Ultra | /v1/flux-pro-1.1-ultra |
| Generate & Edit with FLUX Kontext Pro | /v1/flux-kontext-pro |
| Generate & Edit with FLUX Kontext Max | /v1/flux-kontext-max |
| Inpainting with FLUX Fill Pro | /v1/flux-pro-1.0-fill |
| Outpainting with FLUX Expand Pro | /v1/flux-pro-1.0-expand |
| get_result | /v1/get_result |
| wait_for_result | Custom polling tool |
Troubleshooting
Tools not appearing in Claude Desktop
Tools not appearing in Claude Desktop
- Verify your
claude_desktop_config.jsonis formatted correctly (valid JSON) - Ensure youâve fully restarted Claude Desktop (quit and reopen)
- Check that your API key is set correctly in the
envsection - Look for error messages in Claude Desktopâs developer console
Authentication errors
Authentication errors
- Verify your BFL API key is valid and active
- Ensure the API key is correctly entered without extra spaces or quotes
- Check that your key has sufficient credits for generation
- Confirm youâre using the correct header name:
x-key
Generation timeouts
Generation timeouts
- The default timeout is 300 seconds (5 minutes)
- Check the BFL API status at status.bfl.ai
- Try again with a simpler prompt or lower resolution
- Verify your network connection is stable
Image quality issues
Image quality issues
- Use more detailed and specific prompts
- Try FLUX.2 [flex]
- Refer to the Prompting Guide for best practices
- Experiment with different aspect ratios and parameters
Best Practices
- Use specific prompts: Include details about style, lighting, composition, and subject for best results
- Start with FLUX.2 [pro]: Offers the best balance of quality, speed, and capabilities
- Iterate on results: Refine your prompt if the first generation isnât perfect
- Monitor usage: Track API usage through the BFL dashboard

