AI Image Generation using Replicate Settyan Flash Model - n8n Workflow

Instantly generate high-quality AI images using the Settyan Flash model on Replicate. This robust n8n workflow handles API polling automatically, providing a complete solution for AI content creation.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Developers integrating AI image generation into applications or websites.

  • Technical users looking for reusable n8n templates for asynchronous API tasks.

  • Automation specialists needing a reliable n8n workflow for GenAI models like Settyan Flash.

Overview

Integrating powerful AI models often presents a challenge because generation is asynchronous—you start a job and must wait for it to complete. This n8n workflow provides a perfect solution for this pattern, specifically tailored for the Settyan Flash V2.0.0 Beta.0 model hosted on Replicate. By utilizing a manual n8n trigger, an HTTP Request n8n node to initiate the job, and a custom polling loop featuring a Wait n8n node and an If n8n node, this automation seamlessly monitors the job status until completion. This robust n8n templates solution ensures your subsequent actions only execute once the high-resolution image output is ready, eliminating manual checks and timeouts.

How it Works

This powerful n8n workflow is initiated using a manual n8n trigger, intended for testing or embedding within larger automations.


  1. Initialization: The 'On clicking 'execute'' manual n8n trigger starts the process. The flow immediately proceeds to the 'Set API Key' n8n node, where your personal Replicate API key is defined and stored temporarily for use in subsequent HTTP calls.

  2. Create Prediction Job: The 'Create Prediction' HTTP Request n8n node sends a POST request to Replicate's API, instructing it to start the image generation using the specified model (settyan/flash-v2.0.0-beta.0) and input parameters (prompt, seed, dimensions). This step uses the Bearer Token authentication derived from the 'Set API Key' n8n node.

  3. Extract ID: The 'Extract Prediction ID' custom code n8n node captures the unique job ID and the API endpoint URL required for checking the status. This ID is crucial for the continuous polling process.

  4. Polling Loop (Wait & Check): The n8n workflow enters a loop. It first hits the 'Wait' n8n node, pausing execution for 2 seconds to prevent rapid-fire polling. It then uses the 'Check Prediction Status' HTTP Request n8n node to poll the unique prediction URL.

  5. Conditional Check: The 'Check If Complete' If n8n node evaluates the job status. If the status is 'succeeded' (the job is done), the n8n workflow exits the loop and proceeds to 'Process Result'. If the status is anything else (e.g., 'processing'), the flow routes back to the 'Wait' n8n node, restarting the polling cycle until the image is generated.

  6. Final Output: Once complete, the 'Process Result' custom code n8n node structures the final output, including the generated image URLs and model metadata, making it easy for the next n8n node in your automation to consume the generated content.

Installation Guide

To deploy this efficient n8n workflow, follow these steps:


  1. Import: Copy the entire JSON code provided and import it directly into your n8n instance.

  2. API Key Configuration: Locate the 'Set API Key' n8n node. Update the default value 'YOURREPLICATEAPI_KEY' with your actual API key obtained from Replicate.

  3. Prompt Customization: Review the 'Create Prediction' HTTP Request n8n node. Within the JSON Body, modify the "prompt": "prompt value" placeholder, along with desired width, height, and seed, to control the generated image output.

  4. Execution: Since this uses a manual n8n trigger, you can execute the n8n workflow by clicking the 'Execute Workflow' button in the editor to test, or link the starting n8n node to a relevant trigger (e.g., a webhook or scheduled n8n trigger) for production use.

Node Details

This n8n templates solution relies on several specialized n8n node types to manage the asynchronous API process:


  • On clicking 'execute' (Manual Trigger n8n trigger): Serves as the starting point for testing and manual initiation.

  • Set API Key (Set n8n node): Essential for secure credential management. It temporarily sets the replicateapikey variable used for authorization headers in subsequent API calls.

  • Create Prediction (HTTP Request n8n node): Initiates the generation job on Replicate. Key configuration includes the POST method, the specific model version ID, and authorization via a dynamically generated Bearer token.

  • Extract Prediction ID (Code n8n node): A critical custom n8n node that extracts the unique identifier and constructs the specialized polling URL required for tracking the job's progress.

  • Wait (Wait n8n node): Pauses the n8n workflow for 2 seconds to ensure compliance with API rate limits and optimize the polling loop.

  • Check Prediction Status (HTTP Request n8n node): Polls the status URL using the extracted ID and API key to monitor whether the image generation is complete.

  • Check If Complete (If n8n node): The flow control mechanism. It checks if the status field equals 'succeeded'. It determines whether the n8n workflow continues to the result processing or loops back to the 'Wait' n8n node for another check.

  • Process Result (Code n8n node): Cleans up the final API response, extracting the key outputs, notably the generated image URLs, making the data readily consumable by any following n8n node.

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*