Automating AI Image Creation with Replicate Settyan Flash - n8n Workflow

This advanced n8n workflow uses the Replicate Settyan Flash model for asynchronous AI image generation. Configure this n8n template to automate content creation efficiently.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Markdown-formatted text defining user personas.

Users looking for robust n8n templates for AI art generation.
Developers needing to integrate asynchronous Replicate API calls into their n8n workflow designs.
Content creators automating the production of visual assets using an n8n workflow.
Anyone requiring an efficient, poll-based n8n node structure for managing long-running generation tasks.

Overview

This powerful n8n workflow addresses the challenge of handling asynchronous AI generation tasks, which are common when using resource-intensive models like Settyan Flash on Replicate. Since generation can take several seconds, this n8n template implements a sophisticated polling mechanism. The workflow first triggers the generation job using an n8n node dedicated to API requests, and then employs a structured loop using the Wait and If n8n nodes to continuously check the job status. This design pattern ensures reliable execution and successful retrieval of the final output URL, making this a highly valuable n8n workflow solution for scalable content generation.

How it Works

Markdown-formatted step-by-step logic explanation.


  1. Start Trigger: The process begins with the manual n8n trigger, On clicking 'execute', initiating the entire n8n workflow.

  2. Configuration: The Set API Key n8n node is executed to define the necessary Replicate credential (the replicateapikey) as an internal variable.

  3. Initiation: The Create Prediction n8n node sends a critical POST request to the Replicate API to start the image generation job, providing the prompt, size, and model parameters.

  4. ID Extraction: The Extract Prediction ID n8n node (a Code n8n node) parses the immediate API response, securely grabbing the unique predictionId and the corresponding polling URL required for status checks.

  5. Polling Loop Entry: The n8n workflow enters a polling loop starting with a Wait n8n node that pauses execution for 2 seconds.

  6. Status Check: The Check Prediction Status n8n node uses the dynamically constructed URL to query Replicate for the current job status.

  7. Condition Check: The Check If Complete n8n node evaluates if the status returned is succeeded. If the condition is false (e.g., status is 'processing'), the n8n node loops back to the Wait n8n node to re-poll.

  8. Result Processing: If the job succeeded, the Process Result n8n node extracts the final generated image URL (output) and all associated metadata, concluding the n8n workflow execution successfully.

Installation Guide

Markdown-formatted instructions for setup.


  1. Import the n8n Workflow: Copy the provided JSON code and import it into your n8n instance using the 'New' menu and selecting 'Import from JSON'.

  2. Replicate API Key Setup: Locate the Set API Key n8n node. Replace the placeholder YOURREPLICATEAPI_KEY with your actual Replicate API key.

  3. Initial Configuration: Review the Create Prediction HTTP Request n8n node. Here you can adjust the input prompt, seed, width, and height parameters for the Settyan Flash model.

  4. Credentials: Ensure you have configured a Generic Credential within your n8n setup, or verify that the Authorization header in the HTTP Request n8n node correctly uses the API key defined in the preceding Set n8n node.

  5. Execution: Run the n8n workflow manually by clicking 'Execute Workflow' or use the 'Test Workflow' button on the n8n trigger node to test the generation process.

Node Details

Markdown-formatted list of nodes.

On clicking 'execute' (Manual Trigger n8n trigger): Starts the n8n workflow on demand.
Set API Key (Set n8n node): Stores the Replicate API key securely as an internal variable (replicateapikey) for use in subsequent HTTP Request n8n nodes.
Create Prediction (HTTP Request n8n node): Sends the initial request to api.replicate.com/v1/predictions to launch the AI image generation job using the Settyan Flash model. Crucial configuration includes setting the Authorization header using the variable defined by the previous n8n node.
Extract Prediction ID (Code n8n node): Extracts the unique identifier (predictionId) and constructs the dedicated polling URL for the running task. Essential for the polling loop of this n8n workflow.
Wait (Wait n8n node): Pauses the n8n workflow for 2 seconds to manage API rate limits and wait for intermediate processing.
Check Prediction Status (HTTP Request n8n node): Periodically polls the Replicate API using the generated URL to check the current job status.
Check If Complete (If n8n node): The core control flow n8n node, directing the workflow to either loop back and wait (if status is not 'succeeded') or proceed to process the final result.
Process Result (Code n8n node): Extracts the finished output URL and relevant metadata (e.g., timestamps, status) once the image generation is successfully completed by 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*