ByteDance/Seedream-3 - Générateur d'images

Intermédiaire

Ceci est unContent Creation, Multimodal AIworkflow d'automatisation du domainecontenant 15 nœuds.Utilise principalement des nœuds comme If, Set, Code, Wait, HttpRequest. ByteDance Seedream 3 : Modèles de conversion texte en image

Prérequis
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "meta": {
    "instanceId": "1f5a2fec-39f4-4349-9b27-e2102cbed9ac",
    "model_name": "seedream-3",
    "model_type": "image",
    "version_id": "e97385a576173b08a6a87546457582b01f65bf29a4dc00f1191e884894e0bc73",
    "model_owner": "bytedance",
    "generated_at": "2025-08-01T14:47:17.107003"
  },
  "name": "bytedance/seedream-3 - Image Generator",
  "nodes": [
    {
      "id": "7c70a742-ad5c-41fe-b67a-3789fa4e092f",
      "name": "Déclencheur Manuel",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -896,
        -176
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "286c2748-4d2f-4302-b9d1-9351b0d770f1",
      "name": "Définir le Jeton API",
      "type": "n8n-nodes-base.set",
      "position": [
        -608,
        -80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "api_token",
              "name": "api_token",
              "type": "string",
              "value": "YOUR_REPLICATE_API_TOKEN"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "65c18fb5-2bb6-41a5-85ac-f6797899ba89",
      "name": "Définir les Paramètres d'Image",
      "type": "n8n-nodes-base.set",
      "position": [
        -288,
        -128
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "api_token",
              "name": "api_token",
              "type": "string",
              "value": "={{ $('Set API Token').item.json.api_token }}"
            },
            {
              "id": "seed",
              "name": "seed",
              "type": "number",
              "value": -1
            },
            {
              "id": "size",
              "name": "size",
              "type": "string",
              "value": "regular"
            },
            {
              "id": "width",
              "name": "width",
              "type": "number",
              "value": 2048
            },
            {
              "id": "height",
              "name": "height",
              "type": "number",
              "value": 2048
            },
            {
              "id": "prompt",
              "name": "prompt",
              "type": "string",
              "value": "A beautiful landscape with mountains and a lake at sunset"
            },
            {
              "id": "aspect_ratio",
              "name": "aspect_ratio",
              "type": "string",
              "value": "16:9"
            },
            {
              "id": "guidance_scale",
              "name": "guidance_scale",
              "type": "number",
              "value": 2.5
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "e4b14fdf-9aa5-4afb-8757-e7ba31de4f7a",
      "name": "Créer une Prédiction d'Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -64,
        -128
      ],
      "parameters": {
        "url": "https://api.replicate.com/v1/predictions",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "jsonBody": "={\n  \"version\": \"bytedance/seedream-3:e97385a576173b08a6a87546457582b01f65bf29a4dc00f1191e884894e0bc73\",\n  \"input\": {\n    \"seed\": {{ $json.seed }},\n    \"size\": \"{{ $json.size }}\",\n    \"width\": {{ $json.width }},\n    \"height\": {{ $json.height }},\n    \"prompt\": \"{{ $json.prompt }}\",\n    \"aspect_ratio\": \"{{ $json.aspect_ratio }}\",\n    \"guidance_scale\": {{ $json.guidance_scale }}\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $json.api_token }}"
            },
            {
              "name": "Prefer",
              "value": "wait"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "c69c73eb-3ffc-4ff5-90b1-c1dba7973284",
      "name": "Attendre 5s",
      "type": "n8n-nodes-base.wait",
      "position": [
        160,
        -128
      ],
      "webhookId": "d2c4ca16-0eb2-45b4-8a2d-eec2f99df89c",
      "parameters": {
        "unit": "seconds",
        "amount": 5
      },
      "typeVersion": 1
    },
    {
      "id": "635fba91-6137-40bc-9673-8aab72fc69c8",
      "name": "Vérifier le Statut",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        384,
        -128
      ],
      "parameters": {
        "url": "=https://api.replicate.com/v1/predictions/{{ $('Create Image Prediction').item.json.id }}",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Set API Token').item.json.api_token }}"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "30a253aa-9d94-40ea-93e0-af414ff57c75",
      "name": "Est Terminé ?",
      "type": "n8n-nodes-base.if",
      "position": [
        528,
        -240
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c93d7ba1-0ef9-4087-aa10-389cb2a2c6bd",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "succeeded"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "ae00258b-253b-450f-b220-6c4c5ba4901b",
      "name": "A Échoué ?",
      "type": "n8n-nodes-base.if",
      "position": [
        848,
        -80
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d1bfd044-3a07-4c18-b55f-72d192596139",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "failed"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "0f401c8d-582b-444b-abe5-c9fef92c0d20",
      "name": "Attendre 10s",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        128
      ],
      "webhookId": "51a05aef-e220-406d-8c2c-e59c82c3e26e",
      "parameters": {
        "unit": "seconds",
        "amount": 10
      },
      "typeVersion": 1
    },
    {
      "id": "07a12655-16fd-43d7-9cf7-a2f4651bd711",
      "name": "Réponse de Succès",
      "type": "n8n-nodes-base.set",
      "position": [
        832,
        -320
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "success-response",
              "name": "response",
              "type": "object",
              "value": "={{ { success: true, image_url: $json.output, prediction_id: $json.id, status: $json.status, message: 'Image generated successfully' } }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "5762b602-866b-4d7c-8ae9-4bb51cb22f5c",
      "name": "Réponse d'Erreur",
      "type": "n8n-nodes-base.set",
      "position": [
        1344,
        144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "error-response",
              "name": "response",
              "type": "object",
              "value": "={{ { success: false, error: $json.error || 'Image generation failed', prediction_id: $json.id, status: $json.status, message: 'Failed to generate image' } }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "156f1f5a-9bdc-4663-a9f4-4d0d473bb756",
      "name": "Afficher le Résultat",
      "type": "n8n-nodes-base.set",
      "position": [
        1552,
        -144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "final-result",
              "name": "final_result",
              "type": "object",
              "value": "={{ $json.response }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "fcf1219b-7956-4afd-af9e-25051b535276",
      "name": "Journaliser la Requête",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        -320
      ],
      "parameters": {
        "jsCode": "// Log generation details for monitoring\nconst data = $input.all()[0].json;\n\nconsole.log('bytedance/seedream-3 Request:', {\n  timestamp: new Date().toISOString(),\n  prediction_id: data.id,\n  model_type: 'image'\n});\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "991b2f2b-ae9d-4c33-a53a-f174826b115a",
      "name": "Note Adhésive9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        -304
      ],
      "parameters": {
        "color": 4,
        "width": 580,
        "height": 320,
        "content": "=======================================\n        SEEDREAM-3 GENERATOR\n=======================================\nFor any questions or support, please contact:\n    Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n======================================="
      },
      "typeVersion": 1
    },
    {
      "id": "51cf2652-514e-415c-821b-100d550dd209",
      "name": "Note Adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        48
      ],
      "parameters": {
        "color": 4,
        "width": 589,
        "height": 1958,
        "content": "## 🤖 **BYTEDANCE/SEEDREAM-3 - IMAGE GENERATION WORKFLOW**\n\n**🔥 Powered by Replicate API and n8n Automation**\n\n---\n\n### 📝 **Model Overview**\n\n- **Owner**: bytedance\n- **Model**: seedream-3\n- **Type**: Image Generation\n- **API Endpoint**: https://api.replicate.com/v1/predictions\n\n**🎯 What This Model Does:**\nA text-to-image model with support for native high-resolution (2K) image generation\n\n---\n\n### 📋 **Parameter Reference**\n\n**🔴 Required Parameters:** prompt\n**🔵 Optional Parameters:** seed, size, width, height, aspect_ratio, guidance_scale\n\n**📖 Detailed Parameter Guide:**\n- **seed** (integer): Random seed. Set for reproducible generation\n- **size** (string): Big images will have their longest dimension be 2048px. Small images will have their shortest dim... (Default: regular)\n- **width** (integer): Image width (Default: 2048)\n- **height** (integer): Image height (Default: 2048)\n- **prompt** (string): Text prompt for image generation\n- **aspect_ratio** (string): Image aspect ratio. Set to 'custom' to specify width and height. (Default: 16:9)\n- **guidance_scale** (number): Prompt adherence. Higher = more literal. (Default: 2.5)\n\n---\n\n### 🔧 **Workflow Components Explained**\n\n**🎯 Manual Trigger**\n- Starts the workflow execution\n- Click to begin image generation process\n\n**🔐 Set API Token** \n- Configures your Replicate API authentication\n- Replace 'YOUR_REPLICATE_API_TOKEN' with your actual token\n- Essential for accessing the bytedance/seedream-3 model\n\n**⚙️ Set Image Parameters**\n- Configures all input parameters for the model\n- Includes both required and optional parameters\n- Pre-filled with sensible defaults for testing\n\n**🚀 Create Image Prediction**\n- Sends the generation request to Replicate API\n- Uses the image parameters you configured\n- Returns a prediction ID for status tracking\n\n**⏳ Wait & Status Checking Loop**\n- Waits 5 seconds then checks prediction status\n- Continues checking until completion or failure\n- Implements intelligent retry logic with 10-second delays\n\n**✅ Success/Error Handling**\n- Routes successful completions to success response\n- Handles failures gracefully with error details\n- Returns structured JSON response with URLs/errors\n\n**📊 Logging & Monitoring**\n- Logs all requests for debugging and monitoring\n- Tracks timestamps and prediction IDs\n- Helps identify issues during development\n\n---\n\n### 🌟 **Key Benefits**\n\n- **🎨 Instant Image Generation**: Transform ideas into images using state-of-the-art AI\n- **🔄 Automated Workflow**: Handles the complete generation pipeline automatically\n- **🛡️ Error Resilience**: Built-in retry logic and comprehensive error handling\n- **📈 Production Ready**: Includes logging, monitoring, and structured responses\n- **🔧 Customizable**: Easy to modify parameters and extend functionality\n- **⚡ Efficient Processing**: Optimized API calls with intelligent status checking\n\n---\n\n### 🚀 **Quick Start Instructions**\n\n1. **🔑 Get Your API Key**\n   - Sign up at https://replicate.com\n   - Navigate to your account settings\n   - Copy your API token\n\n2. **🔧 Configure the Workflow**\n   - Replace 'YOUR_REPLICATE_API_TOKEN' with your actual token\n   - Adjust parameters in the 'Set Image Parameters' node\n   - Customize the prompt or other inputs as needed\n\n3. **▶️ Execute the Workflow**\n   - Click the 'Manual Trigger' to start\n   - Monitor the execution in the n8n interface\n   - Check logs for detailed execution information\n\n4. **📥 Get Your Results**\n   - Successful generations return a URL to your image\n   - Download or use the generated content as needed\n   - Results are available immediately upon completion\n\n---\n\n### 🔍 **Troubleshooting Guide**\n\n**Common Issues:**\n- **Invalid API Token**: Ensure your Replicate token is valid and has sufficient credits\n- **Parameter Validation**: Check that required parameters match expected types\n- **Generation Timeout**: Some images take longer - monitor the logs\n- **Output Format**: Verify the model returns the expected output format\n\n**Best Practices:**\n- Test with default parameters first\n- Monitor your Replicate usage and billing\n- Keep API tokens secure and never commit them to code\n- Use appropriate parameter values for your use case\n\n---\n\n**🔗 Additional Resources:**\n- Model Documentation: https://replicate.com/bytedance/seedream-3\n- Replicate API Docs: https://replicate.com/docs\n- n8n Documentation: https://docs.n8n.io\n\n---"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "versionId": "1",
  "connections": {
    "c69c73eb-3ffc-4ff5-90b1-c1dba7973284": {
      "main": [
        [
          {
            "node": "635fba91-6137-40bc-9673-8aab72fc69c8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0f401c8d-582b-444b-abe5-c9fef92c0d20": {
      "main": [
        [
          {
            "node": "635fba91-6137-40bc-9673-8aab72fc69c8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ae00258b-253b-450f-b220-6c4c5ba4901b": {
      "main": [
        [
          {
            "node": "5762b602-866b-4d7c-8ae9-4bb51cb22f5c",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "0f401c8d-582b-444b-abe5-c9fef92c0d20",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fcf1219b-7956-4afd-af9e-25051b535276": {
      "main": [
        [
          {
            "node": "c69c73eb-3ffc-4ff5-90b1-c1dba7973284",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "635fba91-6137-40bc-9673-8aab72fc69c8": {
      "main": [
        [
          {
            "node": "30a253aa-9d94-40ea-93e0-af414ff57c75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "30a253aa-9d94-40ea-93e0-af414ff57c75": {
      "main": [
        [
          {
            "node": "07a12655-16fd-43d7-9cf7-a2f4651bd711",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ae00258b-253b-450f-b220-6c4c5ba4901b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "286c2748-4d2f-4302-b9d1-9351b0d770f1": {
      "main": [
        [
          {
            "node": "65c18fb5-2bb6-41a5-85ac-f6797899ba89",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5762b602-866b-4d7c-8ae9-4bb51cb22f5c": {
      "main": [
        [
          {
            "node": "156f1f5a-9bdc-4663-a9f4-4d0d473bb756",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7c70a742-ad5c-41fe-b67a-3789fa4e092f": {
      "main": [
        [
          {
            "node": "286c2748-4d2f-4302-b9d1-9351b0d770f1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "07a12655-16fd-43d7-9cf7-a2f4651bd711": {
      "main": [
        [
          {
            "node": "156f1f5a-9bdc-4663-a9f4-4d0d473bb756",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "65c18fb5-2bb6-41a5-85ac-f6797899ba89": {
      "main": [
        [
          {
            "node": "e4b14fdf-9aa5-4afb-8757-e7ba31de4f7a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e4b14fdf-9aa5-4afb-8757-e7ba31de4f7a": {
      "main": [
        [
          {
            "node": "fcf1219b-7956-4afd-af9e-25051b535276",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Création de contenu, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds15
Catégorie2
Types de nœuds7
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
Yaron Been

Yaron Been

@yaron-nofluff

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

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34