AutomationFlowsWeb Scraping › Generate AI Images From Text with Fire Flux Model on Replicate API

Generate AI Images From Text with Fire Flux Model on Replicate API

ByYaron Been @yaron-nofluff on n8n.io

This workflow provides automated access to the Fire Flux AI model through the Replicate API. It saves you time by eliminating the need to manually interact with AI models and provides a seamless integration for image generation tasks within your n8n automation workflows.

Event trigger★★★★☆ complexity15 nodesHTTP Request
Web Scraping Trigger: Event Nodes: 15 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #6792 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "model_name": "flux",
    "model_type": "image",
    "version_id": "da7b098b70c3e52d56a04c2b7f3632eb63dfb0f26941a0934bf223157a7c5245",
    "model_owner": "fire",
    "generated_at": "2025-08-01T14:50:46.332054"
  },
  "name": "fire/flux - Image Generator",
  "nodes": [
    {
      "id": "345630cd-8a1d-4415-823b-507128c68d53",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -896,
        -176
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "cdcec4fd-3606-4f47-ac79-358b5c984735",
      "name": "Set API Token",
      "type": "n8n-nodes-base.set",
      "position": [
        -608,
        -80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "api_token",
              "name": "api_token",
              "type": "string",
              "value": "YOUR_REPLICATE_API_TOKEN"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "cd76e179-fb38-4afd-a5fd-eeb52a4ff3a8",
      "name": "Set Image Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -288,
        -128
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "api_token",
              "name": "api_token",
              "type": "string",
              "value": "={{ $('Set API Token').item.json.api_token }}"
            },
            {
              "id": "seed",
              "name": "seed",
              "type": "number",
              "value": 0
            },
            {
              "id": "prompt",
              "name": "prompt",
              "type": "string",
              "value": "A beautiful landscape with mountains and a lake at sunset"
            },
            {
              "id": "go_fast",
              "name": "go_fast",
              "type": "boolean",
              "value": true
            },
            {
              "id": "megapixels",
              "name": "megapixels",
              "type": "string",
              "value": "1"
            },
            {
              "id": "num_outputs",
              "name": "num_outputs",
              "type": "number",
              "value": 1
            },
            {
              "id": "aspect_ratio",
              "name": "aspect_ratio",
              "type": "string",
              "value": "2:1"
            },
            {
              "id": "output_format",
              "name": "output_format",
              "type": "string",
              "value": "png"
            },
            {
              "id": "output_quality",
              "name": "output_quality",
              "type": "number",
              "value": 80
            },
            {
              "id": "num_inference_steps",
              "name": "num_inference_steps",
              "type": "number",
              "value": 4
            },
            {
              "id": "disable_safety_checker",
              "name": "disable_safety_checker",
              "type": "boolean",
              "value": false
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "b763d90e-c845-4123-9826-1fbf6650e568",
      "name": "Create Image Prediction",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -64,
        -128
      ],
      "parameters": {
        "url": "https://api.replicate.com/v1/predictions",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "jsonBody": "={\n  \"version\": \"fire/flux:da7b098b70c3e52d56a04c2b7f3632eb63dfb0f26941a0934bf223157a7c5245\",\n  \"input\": {\n    \"seed\": {{ $json.seed }},\n    \"prompt\": \"{{ $json.prompt }}\",\n    \"go_fast\": {{ $json.go_fast }},\n    \"megapixels\": \"{{ $json.megapixels }}\",\n    \"num_outputs\": {{ $json.num_outputs }},\n    \"aspect_ratio\": \"{{ $json.aspect_ratio }}\",\n    \"output_format\": \"{{ $json.output_format }}\",\n    \"output_quality\": {{ $json.output_quality }},\n    \"num_inference_steps\": {{ $json.num_inference_steps }},\n    \"disable_safety_checker\": {{ $json.disable_safety_checker }}\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $json.api_token }}"
            },
            {
              "name": "Prefer",
              "value": "wait"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "bb2dc67a-df8d-4c81-8c2a-237a4e19c2f0",
      "name": "Wait 5s",
      "type": "n8n-nodes-base.wait",
      "position": [
        160,
        -128
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 5
      },
      "typeVersion": 1
    },
    {
      "id": "6586983d-ff95-4d65-b155-055225641d2e",
      "name": "Check Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        384,
        -128
      ],
      "parameters": {
        "url": "=https://api.replicate.com/v1/predictions/{{ $('Create Image Prediction').item.json.id }}",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Set API Token').item.json.api_token }}"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "17b921e4-67e3-4b1f-9090-10e5268c503d",
      "name": "Is Complete?",
      "type": "n8n-nodes-base.if",
      "position": [
        528,
        -240
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c93d7ba1-0ef9-4087-aa10-389cb2a2c6bd",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "succeeded"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "bfc32dd6-7aa3-43de-9f47-eb5e240361bd",
      "name": "Has Failed?",
      "type": "n8n-nodes-base.if",
      "position": [
        848,
        -80
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d1bfd044-3a07-4c18-b55f-72d192596139",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "failed"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d993d4c5-0314-4d51-800d-26a1014c43e9",
      "name": "Wait 10s",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        128
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 10
      },
      "typeVersion": 1
    },
    {
      "id": "f0fe0fa4-f7ce-4016-b2d2-22327af6125f",
      "name": "Success Response",
      "type": "n8n-nodes-base.set",
      "position": [
        832,
        -320
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "success-response",
              "name": "response",
              "type": "object",
              "value": "={{ { success: true, image_url: $json.output, prediction_id: $json.id, status: $json.status, message: 'Image generated successfully' } }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "d9db9079-28eb-4e8e-b570-be8758b3bad6",
      "name": "Error Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1344,
        144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "error-response",
              "name": "response",
              "type": "object",
              "value": "={{ { success: false, error: $json.error || 'Image generation failed', prediction_id: $json.id, status: $json.status, message: 'Failed to generate image' } }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "62fb74d4-1ed5-4c0c-82a6-e94c9f165094",
      "name": "Display Result",
      "type": "n8n-nodes-base.set",
      "position": [
        1552,
        -144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "final-result",
              "name": "final_result",
              "type": "object",
              "value": "={{ $json.response }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "b41506c1-09de-4eb0-8769-13ea59d9df92",
      "name": "Log Request",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        -320
      ],
      "parameters": {
        "jsCode": "// Log generation details for monitoring\nconst data = $input.all()[0].json;\n\nconsole.log('fire/flux Request:', {\n  timestamp: new Date().toISOString(),\n  prediction_id: data.id,\n  model_type: 'image'\n});\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "f594bf07-62dd-4054-92dd-beb993f07428",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        -304
      ],
      "parameters": {
        "color": 4,
        "width": 580,
        "height": 320,
        "content": "=======================================\n        FLUX GENERATOR\n=======================================\nFor any questions or support, please contact:\n    Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n======================================="
      },
      "typeVersion": 1
    },
    {
      "id": "e529a7dc-0bcd-4bb7-9017-5e1b1ec1dccb",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        48
      ],
      "parameters": {
        "color": 4,
        "width": 589,
        "height": 1958,
        "content": "## \ud83e\udd16 **FIRE/FLUX - IMAGE GENERATION WORKFLOW**\n\n**\ud83d\udd25 Powered by Replicate API and n8n Automation**\n\n---\n\n### \ud83d\udcdd **Model Overview**\n\n- **Owner**: fire\n- **Model**: flux\n- **Type**: Image Generation\n- **API Endpoint**: https://api.replicate.com/v1/predictions\n\n**\ud83c\udfaf What This Model Does:**\nThe image generation model tailored for local development and personal use\n\n---\n\n### \ud83d\udccb **Parameter Reference**\n\n**\ud83d\udd34 Required Parameters:** prompt\n**\ud83d\udd35 Optional Parameters:** seed, go_fast, megapixels, num_outputs, aspect_ratio, output_format, output_quality, num_inference_steps (and 1 more)\n\n**\ud83d\udcd6 Detailed Parameter Guide:**\n- **seed** (integer): Random seed. Set for reproducible generation (Default: 0)\n- **prompt** (string): Prompt for generated image\n- **go_fast** (boolean): Run faster predictions with model optimized for speed (currently fp8 quantized); disable to run i... (Default: True)\n- **megapixels** (string): Approximate number of megapixels for generated image (Default: 1)\n- **num_outputs** (integer): Number of outputs to generate (Default: 1)\n- **aspect_ratio** (string): Aspect ratio for the generated image (Default: 2:1)\n- **output_format** (string): Format of the output images (Default: png)\n- **output_quality** (integer): Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. N... (Default: 80)\n- *...and 2 more parameters*\n\n---\n\n### \ud83d\udd27 **Workflow Components Explained**\n\n**\ud83c\udfaf Manual Trigger**\n- Starts the workflow execution\n- Click to begin image generation process\n\n**\ud83d\udd10 Set API Token** \n- Configures your Replicate API authentication\n- Replace 'YOUR_REPLICATE_API_TOKEN' with your actual token\n- Essential for accessing the fire/flux model\n\n**\u2699\ufe0f Set Image Parameters**\n- Configures all input parameters for the model\n- Includes both required and optional parameters\n- Pre-filled with sensible defaults for testing\n\n**\ud83d\ude80 Create Image Prediction**\n- Sends the generation request to Replicate API\n- Uses the image parameters you configured\n- Returns a prediction ID for status tracking\n\n**\u23f3 Wait & Status Checking Loop**\n- Waits 5 seconds then checks prediction status\n- Continues checking until completion or failure\n- Implements intelligent retry logic with 10-second delays\n\n**\u2705 Success/Error Handling**\n- Routes successful completions to success response\n- Handles failures gracefully with error details\n- Returns structured JSON response with URLs/errors\n\n**\ud83d\udcca Logging & Monitoring**\n- Logs all requests for debugging and monitoring\n- Tracks timestamps and prediction IDs\n- Helps identify issues during development\n\n---\n\n### \ud83c\udf1f **Key Benefits**\n\n- **\ud83c\udfa8 Instant Image Generation**: Transform ideas into images using state-of-the-art AI\n- **\ud83d\udd04 Automated Workflow**: Handles the complete generation pipeline automatically\n- **\ud83d\udee1\ufe0f Error Resilience**: Built-in retry logic and comprehensive error handling\n- **\ud83d\udcc8 Production Ready**: Includes logging, monitoring, and structured responses\n- **\ud83d\udd27 Customizable**: Easy to modify parameters and extend functionality\n- **\u26a1 Efficient Processing**: Optimized API calls with intelligent status checking\n\n---\n\n### \ud83d\ude80 **Quick Start Instructions**\n\n1. **\ud83d\udd11 Get Your API Key**\n   - Sign up at https://replicate.com\n   - Navigate to your account settings\n   - Copy your API token\n\n2. **\ud83d\udd27 Configure the Workflow**\n   - Replace 'YOUR_REPLICATE_API_TOKEN' with your actual token\n   - Adjust parameters in the 'Set Image Parameters' node\n   - Customize the prompt or other inputs as needed\n\n3. **\u25b6\ufe0f Execute the Workflow**\n   - Click the 'Manual Trigger' to start\n   - Monitor the execution in the n8n interface\n   - Check logs for detailed execution information\n\n4. **\ud83d\udce5 Get Your Results**\n   - Successful generations return a URL to your image\n   - Download or use the generated content as needed\n   - Results are available immediately upon completion\n\n---\n\n### \ud83d\udd0d **Troubleshooting Guide**\n\n**Common Issues:**\n- **Invalid API Token**: Ensure your Replicate token is valid and has sufficient credits\n- **Parameter Validation**: Check that required parameters match expected types\n- **Generation Timeout**: Some images take longer - monitor the logs\n- **Output Format**: Verify the model returns the expected output format\n\n**Best Practices:**\n- Test with default parameters first\n- Monitor your Replicate usage and billing\n- Keep API tokens secure and never commit them to code\n- Use appropriate parameter values for your use case\n\n---\n\n**\ud83d\udd17 Additional Resources:**\n- Model Documentation: https://replicate.com/fire/flux\n- Replicate API Docs: https://replicate.com/docs\n- n8n Documentation: https://docs.n8n.io\n\n---"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "versionId": "1",
  "connections": {
    "Wait 5s": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 10s": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Failed?": {
      "main": [
        [
          {
            "node": "Error Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 10s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Request": {
      "main": [
        [
          {
            "node": "Wait 5s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Status": {
      "main": [
        [
          {
            "node": "Is Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Complete?": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Has Failed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set API Token": {
      "main": [
        [
          {
            "node": "Set Image Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Response": {
      "main": [
        [
          {
            "node": "Display Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Set API Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success Response": {
      "main": [
        [
          {
            "node": "Display Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Image Parameters": {
      "main": [
        [
          {
            "node": "Create Image Prediction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Image Prediction": {
      "main": [
        [
          {
            "node": "Log Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow provides automated access to the Fire Flux AI model through the Replicate API. It saves you time by eliminating the need to manually interact with AI models and provides a seamless integration for image generation tasks within your n8n automation workflows.

Source: https://n8n.io/workflows/6792/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. A multi-form setup guides you through the entire process At the beginning you have t

Execute Command, Read Write File, HTTP Request +3
Web Scraping

[n8n] Advanced URL Parsing and Shortening Workflow - Switchy.io Integration. Uses splitInBatches, stickyNote, httpRequest, html. Event-driven trigger; 56 nodes.

HTTP Request, GitHub, Stop And Error +1
Web Scraping

[](https://youtu.be/c7yCZhmMjtI)

HTTP Request, GitHub, Stop And Error +1
Web Scraping

This automation organizes your n8n workflows files into categorizes (Active, Template, Done, Archived) and uploads them directly to a categorized Google Drive folders. It is designed to help users man

Google Drive, HTTP Request, Time Saved
Web Scraping

Create Animated Stories using GPT-4o-mini, Midjourney, Kling and Creatomate API. Uses httpRequest. Event-driven trigger; 51 nodes.

HTTP Request