AI Image Generation via Replicate (Flash V2.0 Beta 10) - n8n Workflow

Use this powerful n8n workflow template to automate AI image generation using the settyan/flash-v2.0.0-beta.10 model on Replicate. Features error handling and status polling.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content Creators and Designers needing scalable AI asset generation.

  • Developers looking for robust Replicate API integration examples in n8n.

  • Users wanting ready-to-use n8n templates for generative AI tasks.

  • Automation Specialists requiring a polling loop structure in an n8n workflow.

Overview

This comprehensive n8n workflow addresses the challenge of integrating asynchronous AI generation tasks, such as those provided by Replicate. Since image generation often takes time, this specific n8n workflow template initiates the prediction and then enters a robust polling loop to monitor its status, ensuring the process doesn't time out and delivers the final output URL efficiently. It uses the settyan/flash-v2.0.0-beta.10 model to transform text prompts into generated assets, complete with customizable parameters, logging, and comprehensive success/failure handling, making this a highly valuable n8n automation template.

How it Works

The process begins with the Manual Trigger n8n node, initiating the generation request.


  1. Configuration: The n8n workflow first uses Set n8n nodes to define the Replicate API key and all necessary image generation parameters (prompt, dimensions, seed, etc.).

  2. Prediction Request: The Create Other Prediction n8n node (an HTTP Request) sends a POST request to Replicate, containing the model version and input parameters. This returns a prediction ID.

  3. Polling Kickoff: The Log Request n8n node records the generation details, followed by a Wait 5s n8n node to give the prediction time to start.

  4. Status Check Loop: The Check Status n8n node retrieves the current status of the prediction using the ID.

  5. Decision Logic: The Is Complete? n8n node checks if the status is 'succeeded'. If not, the Has Failed? n8n node checks for a 'failed' status.

  6. Looping/Retry: If the status is neither 'succeeded' nor 'failed' (i.e., 'processing'), the workflow uses the Wait 10s n8n node before returning to the Check Status n8n node, continuing the polling loop until a final state is reached.

  7. Final Response: Upon success, the Success Response n8n node formats the output URL. Upon failure, the Error Response n8n node captures the error message. The final result is passed to the Display Result n8n node.

Installation Guide

To deploy this powerful n8n workflow and start generating AI images, follow these steps:


  1. Import the n8n template: Copy the provided JSON code and import it directly into your n8n instance using the 'New' menu -> 'Import from JSON'.

  2. Acquire Credentials: Obtain a Replicate API token by signing up on their platform.

  3. Configure API Token: Locate the Set API Token n8n node. Replace the placeholder value YOURREPLICATEAPITOKEN with your actual token. This token is crucial for authorization in subsequent HTTP Request n8n nodes.

  4. Customize Parameters: Review the Set Other Parameters n8n node. Here you can change the core input parameters like prompt, width, height, and aspectratio to tailor the generation to your needs.

  5. Activate and Execute: Ensure the n8n workflow is activated and click the 'Execute Workflow' button on the Manual Trigger n8n trigger node to run a test generation.

Node Details

Manual Trigger (n8n trigger): The starting point for this specific n8n workflow. Used to manually initiate the AI image generation process.
Set API Token (n8n node): Securely injects the Replicate API key into the workflow data stream for use in HTTP calls.
Set Other Parameters (n8n node): A central configuration point where all AI model inputs (like prompt: 'Create something amazing', width: 512, height: 512) are defined and made available globally.
Create Other Prediction (HTTP Request n8n node): Sends the initial POST request to api.replicate.com/v1/predictions to start the generation job, using the Bearer token from the setup phase.
Wait 5s / Wait 10s (n8n node): Used to introduce necessary delays, allowing the external Replicate service time to process the prediction before the n8n workflow begins polling.
Check Status (HTTP Request n8n node): Periodically checks the status of the prediction ID. This forms the backbone of the polling loop within the n8n workflow.


  • Is Complete? / Has Failed? (If n8n node): Provides conditional branching logic to determine if the result is 'succeeded', 'failed', or still processing. This logic is essential for the reliability of the n8n workflow.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos

Featured*