Text-Guided Image Editing with Bytedance Seededit 3.0 (Replicate Polling) - n8n Workflow

This powerful n8n workflow automates text-guided image editing using the Bytedance Seededit 3.0 model on Replicate. Learn how to build reliable polling loops in n8n templates.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

AI Developers needing reliable asynchronous job handling.
Marketing professionals generating specialized image assets.
Users looking for advanced examples of flow control within an n8n node setup.
Anyone interested in integrating Bytedance Seededit 3.0 into their larger n8n automation strategy.

Overview

Integrating with modern AI services like Replicate often requires handling asynchronous API calls. Unlike simple synchronous requests, image generation takes time, meaning the initial request only returns a prediction ID, not the final image. This n8n workflow solves this by implementing a robust polling mechanism. The entire n8n workflow initiates the generation, extracts the prediction ID, and then enters a tight loop using the Wait n8n node and the If n8n node to repeatedly check the status until the job succeeds. This approach ensures that your n8n automation reliably captures the final generated image URL without requiring external hooks or complex infrastructure, making this one of the most useful n8n templates for generative AI.

How it Works

The process begins with the Manual n8n trigger node, allowing immediate execution for testing or deployment.


  1. Setup & Trigger: The workflow starts when the n8n trigger runs. Immediately following, the 'Set API Key' n8n node securely stores the Replicate API key, making it accessible to subsequent HTTP Request n8n nodes.

  2. Create Prediction: The first 'Create Prediction' HTTP Request n8n node sends a POST request to Replicate to initiate the Bytedance Seededit 3.0 image generation job. It includes the prompt, input image URL, and required configuration.

  3. Extract ID: The 'Extract Prediction ID' Code n8n node captures the unique prediction ID and constructs the necessary API endpoint URL for checking the job status.

  4. Polling Loop Initiation: The flow enters a loop starting with the 'Wait' n8n node, which pauses execution for 2 seconds (to prevent overwhelming the API) before the next check.

  5. Check Status: The 'Check Prediction Status' HTTP Request n8n node uses the prediction ID to poll Replicate for the job status.

  6. Flow Control: The 'Check If Complete' If n8n node evaluates the status. If the status equals 'succeeded', the flow proceeds to process the result. If the status is still 'running' or 'starting', the workflow loops back to the 'Wait' n8n node, repeating the check until completion. This careful structuring demonstrates best practices in n8n workflow design.

  7. Process Result: Upon success, the 'Process Result' Code n8n node extracts the final image URL and relevant metadata, concluding the n8n workflow.

Installation Guide

To use this n8n template, follow these steps:


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

  2. API Key Setup: Locate the 'Set API Key' n8n node. Replace the placeholder value YOURREPLICATEAPIKEY with your actual Replicate API key. While this n8n node uses a Set operation for simplicity, we recommend moving this key to an actual n8n credential for production security.

  3. Configuration: Review the 'Create Prediction' HTTP Request n8n node. Modify the input JSON body to define your desired prompt and the image URL you wish to edit. The default settings include critical parameters like seed and guidancescale.

  4. Execution: Use the Manual n8n trigger to test the n8n workflow.

Node Details

On clicking 'execute' (Manual Trigger): Serves as the starting n8n trigger for the automation, useful for manual runs and testing the n8n workflow structure.
Set API Key (Set): Defines the replicateapikey variable used for authorization headers in the subsequent Replicate API calls.
Create Prediction (HTTP Request): Initiates the text-guided image editing job using the Bytedance Seededit 3.0 model (version 2c4be22e...). Key configuration includes setting the request method to POST and using Bearer Token authentication derived from the set API key.
Extract Prediction ID (Code): Essential for polling. This custom n8n node takes the initial response and isolates the id field, constructing the predictionUrl needed for status checks.
Wait (Wait): Halts the n8n workflow execution for a defined period (2 seconds) before the next status check, managing API request frequency.
Check Prediction Status (HTTP Request): Polls the Replicate API using a GET request to retrieve the current status of the prediction job.
Check If Complete (If): The core flow control n8n node. It checks if the $json.status equals 'succeeded'. If true, it proceeds; if false, it routes the execution back to the 'Wait' n8n node to continue polling.
Process Result (Code): If successful, this final Code n8n node structures the output, extracting the final image_url and job metadata for downstream use within your 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*