Automate AI image generation using the Replicate Citoreh Nazanin model. This advanced n8n workflow features asynchronous job initiation and status polling using n8n node logic.
Download this n8n workflow template and start using it instantly.
Developers needing to integrate asynchronous AI image generation into their applications.
Technical users looking for n8n templates that demonstrate robust polling loops for long-running API tasks.
Content creators and designers seeking a repeatable automated process for generating AI art using a specific Replicate model.
n8n automation specialists interested in mastering the HTTP Request n8n node for third-party integrations.
This powerful n8n workflow template provides a reliable solution for running resource-intensive AI generation tasks using the Replicate API. Since complex image generation often requires queuing time, this n8n workflow utilizes an essential asynchronous polling structure.
Instead of making a synchronous call that could time out, the n8n node logic immediately extracts a prediction ID after initiation, pauses execution, and then repeatedly checks the job status until the image generation succeeds. This polling pattern is critical for building reliable n8n workflow automations that interact with job-queued services, ensuring the final output is captured correctly without workflow failures. This specific n8n workflow is tailored to the citoreh/nazanin model.
The entire process of this n8n workflow is designed to manage the asynchronous nature of Replicate's API:
id and constructing the specific URL needed for status checking.succeeded. If the status is not successful (i.e., 'processing' or 'starting'), the n8n workflow cycles back to the 'Wait' n8n node.succeeded, the n8n workflow proceeds to the 'Process Result' Code n8n node, which cleans up and formats the final output, including the URL to the generated image.YOURREPLICATEAPI_KEY with your actual Replicate API token.jsonBody to set your desired image generation prompt and specific input parameters (like width, height, or seed). On clicking 'execute' (Manual Trigger): Serves as the starting point, initiating this specific n8n workflow on command. This is the primary n8n trigger for manual execution.
Set API Key (Set): A crucial n8n node for securely injecting the required Replicate API key into the workflow data stream, which is then utilized for authorization headers.
Create Prediction (HTTP Request): Initiates the long-running task by making a POST request to the Replicate API, defining the use of the citoreh/nazanin model. This core n8n node starts the AI generation.
Extract Prediction ID (Code): This Code n8n node is essential for asynchronous processing. It extracts the job ID from the API response and dynamically creates the polling URL for the next steps in the n8n workflow.
Wait (Wait): Manages the polling interval, pausing the n8n workflow for 2 seconds to prevent rate-limiting issues while waiting for the AI job to finish.
Check Prediction Status (HTTP Request): Polls the dynamically constructed URL using the Replicate API key to retrieve the current status of the prediction job.
Check If Complete (If): The control flow n8n node that determines whether the job is complete (succeeded). If not, it routes the execution back to the 'Wait' n8n node, maintaining the polling loop structure.
Process Result (Code): The final processing n8n node that formats and extracts the generated image output URL and relevant metadata once the job status indicates success.
Generate AI images using the creativeathive Lemaar Doorhandle model via Replicate API. This n8n workflow template includes robust polling logic and HTTP request n8n nodes.

Automate high-quality image generation via Replicate's Flux models (e.g., flux-1.1-pro) and instantly publish the results to WordPress and X (Twitter) using this powerful n8n workflow. Ideal for content marketers.

Use this efficient n8n workflow to generate high-quality images and handle asynchronous polling using the Simbrams Ri AI model via Replicate. A reliable n8n template for complex AI tasks.

Use this powerful n8n workflow to generate images or content instantly with the Settyan Flash model via Replicate. Features robust asynchronous polling logic.

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







































