n8n AI agent HTTP Request tool for video jobs
Attach the HTTP Request node to an n8n AI agent as a tool and use Optimize Response to hand the model only a job's status and result URL.

To give an n8n AI agent a video tool through plain HTTPS, attach an HTTP Request node to the agent as a tool and configure two of them: one that POSTs to https://api.sume.com/v1/videos and one that GETs the job. Turn on the tool-only Optimize Response option for the job read, so the model sees the job's status and result URL instead of the whole response.
The n8n facts come from the HTTP Request node docs, read 2026-09-29. The Sume facts come from Video Generation and Jobs and results. Sume has no n8n connector for this; the node is a generic HTTPS call. For the hosted MCP route, see n8n MCP Client Tool with Sume.
Which HTTP Request options only exist on a tool?
The n8n page separates a group of tool-only options that appear only when the node is attached to an AI agent as a tool. The two that matter for a job API:
| Option | What the docs say | Why it matters here |
|---|---|---|
| Optimize Response | Reduces the data passed to the LLM; you pick an expected response type (JSON, HTML, or Text) | A job read returns JSON, so choose JSON |
| Include Fields (JSON) | All, Selected, or Exclude, with dot notation for nested fields | Keep status, unsigned_urls, and error |
| Max Response Characters (HTML, Text) | Limits the response size; the default value is 1000 | Applies to HTML and Text, not JSON field selection |
| Timeout | How long the node waits for the server to send response headers | A submit answers with a 202 at once |
What should the start tool send?
Set Method to POST, the URL to https://api.sume.com/v1/videos, and authentication to a Header Auth credential that carries Authorization: Bearer plus your key (the docs list Header auth among the generic methods). The node sends the equivalent of this request. Send an Idempotency-Key on every submit: a retry with the same key and the same body replays the original job. A new key means a new job, so let the workflow, not the model, generate it.
curl -X POST https://api.sume.com/v1/videos \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: n8n-agent-run-1042" \
-d '{"model": "sume/auto", "prompt": "A desk lamp turning on", "duration": 5}'
# 202: {"id": "job_01HXYZ", "polling_url": "https://api.sume.com/v1/videos/job_01HXYZ",
# "status": "pending", "model": "sume/auto"}What should the job-read tool return to the model?
Point a second HTTP Request tool at the polling_url. Sume's poll response carries id, generation_id, polling_url, status, model, unsigned_urls, and usage, and the docs list five statuses: pending, in_progress, completed, failed, and cancelled. With Optimize Response on JSON and Include Fields set to Selected, list status,unsigned_urls,error, so the agent gets a small, decision-ready object. The agent should keep polling only while the status is pending or in_progress.
How does the file get out of the model's hands?
Do not ask the agent to fetch the video. Sume's docs show the download as a request that sends the same Bearer key, so route unsigned_urls[0] to a normal HTTP Request node after the agent finishes, with Response Format set to File; the n8n docs say File puts the response into a file in the field you name. For a wait that should not burn agent turns, see n8n HTTP Request timeout for long jobs.
Who stops the agent from spending in a loop?
The n8n page lists no spend limit among the tool options, so an agent can call the start tool as often as its instructions allow; each accepted job reserves balance at provider list times 1.25. Keep the start tool on a single-purpose prompt, keep the key in a credential, and add a human approval step before the paid call, as described in n8n human in the loop.
Sources
Related posts
More in Integrations
- n8n error workflow: make it fire when an API job fails
An n8n error workflow runs only when an execution fails. A remote job that ends failed is a normal 200 read, so check its status and throw with Stop And Error.
- n8n Loop Over Items: batch paid API calls under a rate limit
n8n's Loop Over Items node sends items through in batches of Batch Size, then emits all results on done. Pair it with Wait to pace a paid API.
- n8n Retry On Fail: retry paid API calls without paying twice
n8n's Retry On Fail reruns a failed node up to Max Tries. For a paid API call, send the same Idempotency-Key and body on every try.
- Automate video editing with n8n: caption and cut by API
Automate video editing with n8n: an HTTP Request node submits a caption or cut job, a Wait node resumes on the webhook, a last node reads the file.
Written by Sume