Usar APImage para reemplazar y realzar automáticamente el fondo de cualquier imagen

Intermedio

Este es unMiscellaneous, Multimodal AIflujo de automatización del dominio deautomatización que contiene 10 nodos.Utiliza principalmente nodos como FormTrigger, GoogleDrive, HttpRequest. Reemplazar y realzar automáticamente el fondo de cualquier imagen usando APImage

Requisitos previos
  • Credenciales de API de Google Drive
  • Pueden requerirse credenciales de autenticación para la API de destino
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "meta": {
    "instanceId": "47d295a7329d3547e0e6b56de9e439dc1a0a49c6d827b2320629f54300c47e41"
  },
  "nodes": [
    {
      "id": "15ab6203-2c77-45ac-b5dd-79f404e090fa",
      "name": "Nota adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -140
      ],
      "parameters": {
        "width": 1220,
        "height": 300,
        "content": "\n\n##  🡫 How To Get Started \n\n1. Double-click the **APImage API** node to open it.\n2. Replace \"_YOUR_API_KEY_\" with your API Key.\n3. Use the **Replace Background** node to submit a request.\n\nNote: You can find your API Key inside the Dashboard of your APImage account. \n\n[Open the Dashboard 🡥](https://apimage.org/dashboard) \n\nNeed support with your API key? ✉ [ask@support.apimage.org](mailto:ask@support.apimage.org)"
      },
      "typeVersion": 1
    },
    {
      "id": "8cb25cf6-2de1-4a8a-b39f-dd3d277ef96e",
      "name": "Nota adhesiva2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        180
      ],
      "parameters": {
        "color": 4,
        "width": 300,
        "height": 1160,
        "content": "### Output Images  \n\nYou can store or upload the processed images to any platform of your choice.  \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSimply connect nodes for the service where you want the images saved, for example:  \n\n- SQLite, MySQL, PostgreSQL, and other databases  \n- Google Drive, Dropbox, OneDrive, or Box  \n- S3 object storage, FTP servers, or WebDAV  \n- Airtable, Notion, Coda, or Smartsheet  \n- And many other services  \n\nBe sure to place these nodes **after the \"Download Image\" node**.  \nBy default, the output image files are named **`data`**. "
      },
      "typeVersion": 1
    },
    {
      "id": "1024a4b1-eecb-4fbd-8740-5ce45f238df0",
      "name": "Nota adhesiva1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        180
      ],
      "parameters": {
        "color": 4,
        "width": 280,
        "height": 1160,
        "content": "### Input Image  \n\nThe **Replace Background** node can be substituted with any service that provides an input image URL along with a description of the desired background.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nYou can either use the **Form node** to manually enter image URLs for background removal, or connect nodes to any data source that provides image links, for example:\n\n- SQLite, MySQL, PostgreSQL, and other databases  \n- Google Drive, Dropbox, OneDrive, Box, and similar storage services  \n- S3 object storage, FTP servers, or WebDAV  \n- Airtable, Notion, Coda, or Smartsheet  \n- Google Sheets, Excel Online, or CSV files  \n- CRM systems like HubSpot, Pipedrive, or Salesforce  \n- CMS platforms like WordPress, Strapi, or Contentful  \n- Or virtually any other service that supplies image URLs"
      },
      "typeVersion": 1
    },
    {
      "id": "daaec5d9-342d-4f2f-85d2-0ca1a072dd4c",
      "name": "Descargar imagen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        700,
        380
      ],
      "parameters": {
        "url": "={{ $json.data.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "3f76cef0-807e-42e7-9a6f-4d078e86aada",
      "name": "APImage API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        380
      ],
      "parameters": {
        "url": "https://apimage.org/api/ai-replace-background",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "image_url",
              "value": "={{ $json[\"Image URL\"] }}"
            },
            {
              "name": "background_prompt",
              "value": "={{ $json[\"Background Description\"] }}"
            },
            {
              "name": "preserve_subject",
              "value": "0.8"
            },
            {
              "name": "light_direction",
              "value": "above"
            },
            {
              "name": "light_strength",
              "value": "0.6"
            },
            {
              "name": "output_format",
              "value": "png"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY_HERE"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ad8c0911-3d2b-4acb-ad4c-8b96e556e0d0",
      "name": "Nota adhesiva3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        180
      ],
      "parameters": {
        "color": 4,
        "width": 280,
        "height": 460,
        "content": "### Replace + Relight Background\n\nThis is where the image processing happens. **APImage** removes the original background, applies the new one, and optimizes the overall lighting for a natural look.  \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nOpen the **APImage API** node above and replace \"_YOUR_API_KEY_\" with your API Key. [Get your API Key here 🡥](https://apimage.org/dashboard) \n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ad068051-dcbe-49f9-8345-f42f1edc754c",
      "name": "Nota adhesiva4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        180
      ],
      "parameters": {
        "color": 4,
        "width": 300,
        "height": 460,
        "content": "### Download Image  \n\nThis step downloads the processed image and makes it available for storage, sharing, or further processing.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "07ef7110-3d9e-4773-96f2-6f6c2143a012",
      "name": "Nota adhesiva5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        660
      ],
      "parameters": {
        "width": 600,
        "height": 680,
        "content": "### Fequently Asked Questions \n\n**Q: How is background replacement different from background removal?**  \nA: Background removal makes the background transparent, while background replacement swaps it with a new one and adjusts lighting for a natural look.\n\n**Q: What types of images are supported?**  \nA: APImage works with standard image formats such as JPG, PNG, and WebP.  \n\n**Q: Can I choose a custom background?**  \nA: Yes. You can provide a description of the desired background, or integrate APImage into workflows that supply predefined background images.  \n\n**Q: What is the default filename for processed images?**  \nA: The default filename is **`data`**, unless you rename the file in your workflow.  \n\n**Q: Do I need to store the images locally?**  \nA: No. You can connect APImage to any supported service (databases, cloud storage, CMS platforms, APIs, etc.) and store images directly.  \n\n**Q: Can APImage be used in automated workflows?**  \nA: Absolutely. It integrates with n8n and can process images automatically from sources like databases, cloud storage, or APIs.  \n\n**Q: Does it also enhance image quality?**  \nA: APImage adjusts lighting and contrast to make background replacements look natural, but it does not perform full image upscaling.  \n\n**Q: Is there a limit to the number of images I can process?**  \nA: Processing limits depend on your subscription plan and allocated credits.  \n\n\n\n[APImage API Reference 🡥](https://apimage.org/docs/api) | [APImage Customer Support 🡥](https://apimage.org/support) | [Get your API Key 🡥](https://apimage.org/dashboard)"
      },
      "typeVersion": 1
    },
    {
      "id": "3d8afd28-2752-4145-bfdf-29c64e59af3b",
      "name": "Reemplazar fondo (nodo intercambiable)",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        80,
        380
      ],
      "webhookId": "b7487db2-4581-4fd6-b4e0-afac3d8466fb",
      "parameters": {
        "options": {},
        "formTitle": "APImage Replace Background",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Image URL",
              "placeholder": "https://example.com/product-image.png",
              "requiredField": true
            },
            {
              "fieldLabel": "Background Description",
              "placeholder": "a modern office with natural lighting",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Replaces the background of images"
      },
      "typeVersion": 2.2
    },
    {
      "id": "2f066144-49d7-4f26-8278-fc778e4f37d4",
      "name": "Almacenar la imagen de salida (nodo intercambiable)",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1020,
        380
      ],
      "parameters": {
        "name": "data",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        }
      },
      "typeVersion": 3
    }
  ],
  "pinData": {},
  "connections": {
    "3f76cef0-807e-42e7-9a6f-4d078e86aada": {
      "main": [
        [
          {
            "node": "daaec5d9-342d-4f2f-85d2-0ca1a072dd4c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "daaec5d9-342d-4f2f-85d2-0ca1a072dd4c": {
      "main": [
        [
          {
            "node": "2f066144-49d7-4f26-8278-fc778e4f37d4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3d8afd28-2752-4145-bfdf-29c64e59af3b": {
      "main": [
        [
          {
            "node": "3f76cef0-807e-42e7-9a6f-4d078e86aada",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Intermedio - Varios, IA Multimodal

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Flujos de trabajo relacionados recomendados

Usar APImage para generar imágenes de IA y subir a Google Drive
Usar APImage para generar imágenes de AI y subir a Google Drive
Form Trigger
Google Drive
Http Request
+
Form Trigger
Google Drive
Http Request
8 NodosGegenfeld
Creación de contenido
Usar generación de imágenes y revisión manual para crear contenido de redes sociales impulsado por IA para LinkedIn y Facebook
Usar generación de imágenes y revisión manual para crear contenido de redes sociales impulsado por IA para LinkedIn y Facebook
If
Set
Slack
+
If
Set
Slack
63 NodosDidac Fernandez
Varios
Descargar videos de TikTok sin marca de agua a Google Drive y registrar automáticamente en una hoja de cálculo
Descargar videos de TikTok sin marca de agua a Google Drive y registrar automáticamente el historial en una hoja de cálculo
If
Wait
Form Trigger
+
If
Wait
Form Trigger
19 NodosEvoort Solutions
Creación de contenido
Descarga de videos de Instagram a Google Drive a través de un formulario y registro en una hoja de cálculo
Descarga de videos de Instagram a Google Drive, activada por formulario, y registro en una hoja de cálculo
If
Wait
Form Trigger
+
If
Wait
Form Trigger
19 NodosEvoort Solutions
Varios
Generar imágenes publicitarias creativas a partir de múltiples imágenes de referencia
Usar Seedream v4 para generar imágenes publicitarias creativas para Instagram y Facebook a partir de imágenes de referencia
If
Set
Code
+
If
Set
Code
20 NodosDavide
Varios
演示 - 分享模板 - desde职位描述构建候选人短名单
AI招聘流程:usoApolloyAirtabledesde职位a候选人短名单
Set
Limit
Switch
+
Set
Limit
Switch
40 NodosFabian Herhold
Varios
Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos10
Categoría2
Tipos de nodos4
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Autor
Gegenfeld

Gegenfeld

@gegenfeld

We at Gegenfeld are an EdTech platform dedicated to delivering high-quality on-demand courses and interactive training sessions for professional development at all skill levels. With our commitment to "Accelerate your future," we empower professionals to enhance their expertise through engaging, industry-focused learning experiences. On n8n, we share some of the workflows used in our interactive training to provide deeper insights and practical applications.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34