Use this comprehensive n8n workflow to automate asynchronous AI image or content generation using Replicate's API. This n8n template implements a robust polling loop for status checks.
Download this n8n workflow template and start using it instantly.
Many generative AI services, including Replicate, operate asynchronously. When you request a resource (like an image), the API returns a prediction ID rather than the final output immediately. The challenge is continually checking that ID until the task is complete—a process known as polling.
This specialized n8n workflow solves this problem by implementing a tight polling loop. It initializes the generation request, captures the unique prediction ID, and then uses a combination of the n8n wait node and the n8n if node to repeatedly check the status URL. This ensures your n8n automation waits efficiently and only proceeds once the result is ready, making it a reliable n8n template for complex AI integrations.
This n8n workflow operates through a structured sequence designed to manage asynchronous API calls:
replicateapikey for subsequent HTTP requests.ligua033/lorealcantara model and input parameters.To deploy this powerful n8n workflow, follow these steps:
replicateapikey with your actual Replicate API key. This key is used dynamically across all subsequent HTTP Request n8n nodes for Bearer token authentication.jsonBody parameters (prompt, seed, width, height, lora_scale) to match your desired content specifications.replicateapikey variable, making it accessible as a Bearer token across various n8n nodes.replicateapikey.ligua033/lorealcantara model.https://api.replicate.com/v1/predictions, Authentication Generic HTTP Header using the dynamically retrieved API key, jsonBody defining the input prompt and model configuration.predictionId and constructs the necessary predictionUrl for polling.predictionId, status, and predictionUrl.predictionUrl to check if the AI generation is finished.={{ $json.predictionUrl }}, authenticated with the API key.$json.status equals succeeded. Routes the execution back to the Wait node if false.Use this robust n8n workflow template to automate AI content generation via the Replicate API. Features dynamic polling, custom code scripting, and secure API key management.

Automate AI image generation using Replicate’s Creativeathive Lemaar Door Blurrred model. This powerful n8n workflow template handles asynchronous generation and status polling.

Use this dynamic n8n workflow to generate images or content using the jhonp4/jhonpiedrahita_ai01 Replicate model. Features a robust polling loop using n8n node logic.

Use this n8n workflow template to reliably generate high-quality images with the Luma Photon Flash AI model via Replicate. Features asynchronous polling logic for long-running tasks.

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







































