This library provides Griptape Nodes for interacting with Black Forest Labs' FLUX APIs, enabling high-quality image generation and editing capabilities directly within your Griptape workflows.
- FLUX Text-to-Image: Generate images using FLUX Pro, Dev, and Ultra models
- FLUX.1 Kontext Text-to-Image: Generate high-quality images from text prompts with Kontext models
- FLUX.1 Kontext Image Editing: Edit existing images with text instructions, including:
- Object modifications (colors, shapes, elements)
- Text editing within images
- Smart, natural-looking changes
- Iterative editing with character consistency
- Clone this repository into your Griptape Nodes workspace directory:
# Navigate to your workspace directory
# On Mac or Linux you can use the command below to print your workspace directory
cd $(gtn config show | grep workspace_directory | cut -d'"' -f4)
# On Windows, the default workspace directory is a directory named GriptapeNodes in your home directory.
# Usually this is C:\Users\<username>\GriptapeNodes
# Clone the repository
git clone https://github.com/griptape-ai/griptape-nodes-library-blackforestlabs.git- Install dependencies:
cd griptape-nodes-library-blackforestlabs
uv syncYou'll need a Black Forest Labs API key to use these nodes.
- Visit Black Forest Labs Documentation
- Create an account and navigate to your API settings
- Generate a new API key
Configure your API key through the Griptape Nodes IDE:
- Open the Settings menu.
- Navigate to the API Keys & Secrets panel.
- Add a new secret configuration for the service named
BlackForest Labs. - Enter your
BFL_API_KEYin the respective field.
If you haven't already installed your Griptape Nodes engine, follow the installation steps HERE. After you've completed those and you have your engine up and running:
- Copy the path to your
griptape_nodes_library.jsonfile within thegriptape_nodes_library_blackforestlabsdirectory. Right click on the file, andCopy Path(NotCopy Relative Path).
- Start up the engine!
- Navigate to settings.

- Open your settings and go to the App Events tab. Add an item in Libraries to Register.

- Paste your copied
griptape_nodes_library.jsonpath from earlier into the new item.
- Exit out of Settings. It will save automatically!
- Open up the Libraries dropdown on the left sidebar.

- Your newly registered library should appear! Drag and drop nodes to use them!

Generate high-quality images using general FLUX models with advanced control options:
- Model: Choose from:
flux-pro-1.1-ultra(highest quality)flux-pro-1.1(balanced, default)flux-pro(standard)flux-dev(open-source)
- Prompt: Text description of the desired image
- Aspect Ratio: Wide range from 21:9 to 9:21 (ultra-wide to tall formats)
- Seed: For reproducible generation
- Raw Mode: Generate less processed, more natural-looking images
- Safety Tolerance: Content moderation level (1-6)
- Output Format: JPEG or PNG
Generate images from text descriptions using specialized Kontext models:
- Model: Choose between:
flux-kontext-pro(faster generation, default)flux-kontext-max(higher quality)
- Prompt: Text description of the desired image
- Aspect Ratio: Choose from 3:7 to 7:3 ratios (supports portrait, landscape, square)
- Seed: For reproducible generation
- Prompt Upsampling: Enhanced prompt processing
- Safety Tolerance: Content moderation level (0-2)
- Output Format: JPEG or PNG
Modify existing images using text instructions with Kontext models:
- Model: Choose between
flux-kontext-proorflux-kontext-max - Input Image: Accepts both ImageArtifact and ImageUrlArtifact
- Prompt: Edit instructions (use quotes for text replacement:
Replace '[old text]' with '[new text]') - Aspect Ratio: Choose from 3:7 to 7:3 ratios
- Seed: For reproducible edits
- Prompt Upsampling: Enhanced prompt processing
- Safety Tolerance: Content moderation level (0-6, wider range than text-to-image)
- Output Format: JPEG or PNG
Use FLUX Text-to-Image for:
- Traditional text-to-image generation
- Ultra-high quality with FLUX Pro Ultra
- Open-source workflows with FLUX Dev
- Wide aspect ratios (21:9 to 9:21)
- Raw, natural-looking images
Use FLUX.1 Kontext for:
- Advanced image editing workflows
- Iterative editing with consistency
- Text replacement in images
- Character preservation across edits
- Add a FLUX Text-to-Image node
- Choose your model (flux-pro-1.1 for balanced quality/speed)
- Set your prompt:
"A small furry elephant pet looks out from a cat house" - Choose your aspect ratio (default: 1:1)
- Run the workflow
- The generated image will be available as an ImageArtifact output
- Use FLUX Text-to-Image with
flux-pro-1.1-ultramodel - Enable Raw Mode for natural-looking results
- Use wide aspect ratios for cinematic shots
- Generate Base Image: Use FLUX.1 Kontext Text-to-Image to create your starting image
- Edit the Image: Connect the output to FLUX.1 Kontext Image Edit node
- Add Edit Instructions:
- Object changes:
"Change the car color to red" - Text replacement:
Replace 'Hello' with 'Welcome' - Style changes:
"Make it look like a painting"
- Object changes:
For precise text editing, use the quote syntax with Kontext Image Edit:
Replace 'Choose joy' with 'FLUX Rocks'
This works particularly well for:
- Signs and posters
- Labels and captions
- Brand text replacement
FLUX.1 Kontext excels at maintaining consistency across multiple edits. You can chain multiple Image Edit nodes to make progressive changes while preserving character and scene consistency.
Use the seed parameter to generate consistent results:
- Same prompt + same seed = same image
- Useful for A/B testing different prompts
- Essential for collaborative workflows
All nodes include safety tolerance settings:
- FLUX Text-to-Image: 1-6 (2 = default)
- FLUX.1 Kontext Text-to-Image: 0-2 (2 = least restrictive)
- FLUX.1 Kontext Image Edit: 0-6 (6 = least restrictive)
Higher values allow more creative freedom but may generate content that requires review.
For detailed API information and advanced usage:
- Black Forest Labs API Documentation
- FLUX.1 Kontext Text-to-Image Documentation
- FLUX.1 Kontext Image Editing Documentation
- Black Forest Labs API Reference
"API key not found"
- Ensure your
BFL_API_KEYis configured in the Griptape Nodes IDE Settings → API Keys & Secrets - Check the API key is valid and active
"404 Not Found"
- Verify you're using the latest version of the library
- Check your internet connection
"Generation failed with status 'Pending'"
- This should resolve automatically - the node polls until completion
- Large images or complex edits may take longer
Image connection errors
- Image Edit node accepts both ImageArtifact and ImageUrlArtifact
- Ensure the input image is properly connected
If you encounter issues:
- Check the Black Forest Labs Documentation
- Verify your API key and account status
- Review the node's status output for detailed error messages
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.

