This setup allows you to integrate and access BFL's API directly from within your ComfyUI workflow.
- Clone this repo in your
ComfyUI/custom_nodes
directory.
-
To authenticate your requests, you need to provide your BFL API key from the Black Forest Labs API.
There are two ways to provide your key to ComfyUI:
- Environment Variable Method (Recommended)
- Export your BFL API key as an environment variable:
export BFL_API_KEY=<your_api_key_here>
- Export your BFL API key as an environment variable:
- Text File Method
- Alternatively, insert your API key into a file named
bfl_api_key.txt
. - Ensure that the
bfl_api_key.txt
file is placed in the same directory asbfl_api.py
.
- Alternatively, insert your API key into a file named
- Environment Variable Method (Recommended)
- Restart ComfyUI if already open
- Once ComfyUI has restarted, you can now insert a FLUX API Node such as FLUX 1.1 [pro] into your workflow.
- To get started quickly, drag and drop the following node image into your workflow:
- Invalid API Key Error: Ensure your API key is correctly set either in the environment variable or the
bfl_api_key.txt
file. - Node Not Appearing: Confirm that
bfl_api.py
is placed somewhere inComfyUI/custom_nodes
and restart ComfyUI.
For more information about the Black Forest Labs API, visit the Black Forest Labs API.