Header Ads Widget

How to Connect the Pollo AI API to n8n Automations (Step‑by‑Step)




If you already use n8n for automation, connecting the Pollo AI API lets you auto‑generate videos and images from any workflow: new leads, new blog posts, product updates, you name it.

In this guide, you’ll learn how Pollo’s API works, how to call it from n8n using the HTTP Request node, and how to build a simple “auto‑generate video” flow you can customize. I’ll also share how to get access to Pollo AI if you want to follow along.


Why Use Pollo AI with n8n?

Pollo AI is an all‑in‑one AI video and image API that wraps many top models (Kling, Veo, Runway, and others) behind a single interface. Credits are cheaper than calling many of these models directly, which makes it a good fit for automated workflows where cost and scale matter.

n8n, on the other hand, is a visual automation tool that can call any REST API through its HTTP Request node. When you connect both, you can:

  • Generate videos automatically whenever an event happens (e.g., a new product in your store or a new blog post).

  • Batch‑create content by looping through a list of prompts or items.

  • Trigger video generation from webhooks, CRMs, or databases—all without writing a full backend.

If you don’t have a Pollo AI account yet, you can start here and support my work at no extra cost: Try Pollo AI.


Step 1: Get Your Pollo AI API Key and Understand the Basics

First, you need API access. After you create a Pollo AI account and choose a plan, you’ll find your API key in the developer or API dashboard.

Pollo AI’s API is a typical REST API where you:

  • Send authenticated HTTP requests (usually with an Authorization header or an x-api-key header).

  • POST a JSON body describing the model, prompt, duration, and other parameters.

  • Receive a response with a job ID or a generated asset URL, depending on the endpoint.

The docs highlight that Pollo AI exposes a unified API across multiple models like Kling and others, so you can swap models by changing parameters rather than rewriting your whole integration.

For pricing, Pollo AI uses a credit system: different models and durations cost different amounts of credits per generation, with credits starting around 0.08–0.06 dollars each depending on volume.


Step 2: Choose the Right Endpoint for Your Use Case

You’ll want to pick an endpoint from the Pollo AI docs based on what you want to automate.

Examples:

  • Text‑to‑video: Convert a prompt into a short clip using a model like Kling or Pollo’s own video model.

  • Image‑to‑video: Take an input image URL and generate motion around it.

  • Image generation: Create still images or thumbnails from text prompts.

The docs provide model names, parameters (like duration, resolution, aspect ratio), and sample requests with JSON bodies. For this tutorial, we’ll assume a text‑to‑video endpoint that accepts JSON similar to:

json
{ "model": "kling-2.1-text-to-video", "prompt": "A dynamic product showcase video of a running shoe in neon colors", "duration": 5, "aspect_ratio": "9:16" }

Refer to the official API docs for the exact endpoint path and parameter names you should use.


Step 3: Create a New Workflow in n8n

In your n8n instance:

  1. Click “New Workflow.”

  2. Add a Trigger node that fits your use case, for example:

    • Webhook (to generate videos from an external app).

    • Cron (to batch‑generate content on a schedule).

    • App‑specific node (like Airtable, Notion, Shopify, etc.).

This trigger will produce the data you’ll feed into Pollo AI (e.g., a product name, a description, or a text prompt).


Step 4: Add an HTTP Request Node to Call the Pollo AI API

The HTTP Request node in n8n is the core of your integration, because it can call any REST API.

  1. Add a new node and choose “HTTP Request.”

  2. Set the Method to POST.

  3. Set the URL to the Pollo AI API endpoint you want (for example, the text‑to‑video endpoint from the docs).

  4. Under Authentication, choose the method Pollo AI requires, usually:

    • Header Auth: Add an Authorization: Bearer YOUR_API_KEY header or an x-api-key header.

  5. Set Content Type to JSON and build the Body with the fields you need:

    • model (e.g., kling-2.1-text-to-video)

    • prompt (from the trigger node or a static string)

    • duration

    • aspect_ratio

    • Any other required fields listed in the docs.

The HTTP Request node doc explains how to set JSON bodies and headers and how to map input data from previous nodes. You can use n8n’s expression editor ({{$json["fieldName"]}}) to inject dynamic values like product titles or descriptions into the prompt.


Step 5: Handle the Response and Poll for Completion (If Needed)

Depending on the Pollo AI endpoint, the API may:

  • Return a finished asset URL in a single synchronous response.

  • Or return a job ID and require you to poll a status endpoint until the video is ready.

The docs describe the response structure and any separate “status” or “result” endpoints.

If it’s synchronous:

  • The HTTP Request node will output JSON containing fields like video_urlimage_url, or similar.

  • You can then pass that URL to another node to save it to storage, send it via email, or post it somewhere.

If it’s asynchronous with a job ID:

  1. Use the first HTTP Request node to create the job and capture the job ID from the response.

  2. Add a Wait or NoOp plus a second HTTP Request node to call a status endpoint, passing the job ID.

  3. Loop or use a small delay until the status is completed, then get the final asset URL from the response.

n8n’s documentation shows how to set up repeated HTTP calls and handle different response shapes using expressions and conditional nodes.


Step 6: Use the Generated Video in Your Automation

Once you have the URL of the generated video or image, you can wire it into any part of your n8n workflow:

  • Upload to cloud storage: Use nodes for S3, GCS, or other storage services.

  • Send to social media schedulers or webhooks: Push the asset URL and metadata to tools that handle posting.

  • Notify your team or clients: Send a Slack, Discord, or email message with the video link.

This is where Pollo AI + n8n becomes powerful: you can automate not just generation but also distribution.


Example Use Case: Auto‑Generate Promo Videos for New Products

To make it more concrete, imagine this scenario:

  • You store product data in Airtable.

  • Whenever a new product is added, you want to auto‑generate a 5‑second vertical promo video with Pollo AI and drop the URL back into Airtable.

High‑level steps:

  1. Trigger: Airtable node listening for new records (title, description, image URL).

  2. Build prompt: Use a Set or Function node to craft a text prompt like “Create a dynamic promo video for {{productName}} featuring {{shortDescription}} in a modern, high‑energy style.”

  3. HTTP Request to Pollo AI: Call the text‑to‑video or image‑to‑video endpoint with the prompt, desired duration, and aspect ratio.

  4. Check response: Grab the video URL once the job is done.

  5. Write back: Use Airtable node to update the record with the generated video link.

All of this can run without manual intervention once configured.


Best Practices: Credits, Costs, and Reliability

Because Pollo AI uses credits, you should design your n8n workflows with cost control in mind.

Tips:

  • Start with low‑duration, lower‑cost models while building and testing.

  • Use filters and conditions in n8n so you only generate videos when they’re truly needed (for example, only for high‑value products or specific tags).

  • Monitor your Pollo AI credit usage in their dashboard and set alerts or limits where possible.

It’s also wise to handle errors gracefully in n8n:

  • Add error branches or separate workflows for failed API calls.

  • Log failures to a Google Sheet, database, or Slack channel so you can investigate.


To follow this tutorial, you need a Pollo AI account with API access and credits.

You can create an account directly on their site, but if you use my partner link below, you support this blog and encourage more technical tutorials like this—at no extra cost to you:

👉 Get started with Pollo AI here: Pollo AI 

Then:

  1. Generate your API key from the Pollo AI dashboard.

  2. Set up n8n with the HTTP Request node as described above.

  3. Start with a simple one‑off workflow, then expand to full product or content pipelines.


Final Thoughts

Connecting the Pollo AI API to n8n turns AI video and image generation into just another node in your automations. Instead of manually logging into tools and exporting files, you can generate assets on demand from triggers like “new product,” “new blog post,” or “new lead.”

As you get comfortable with the API and n8n’s HTTP Request node, you can build more complex flows—chaining multiple models, generating thumbnails and videos together, or even offering automated AI video generation as a service to your clients.

Post a Comment

0 Comments