{"slug": "generate-ai-videos-in-n8n-with-plain-http-request-nodes-quote-create-wait", "title": "Generate AI videos in n8n with plain HTTP Request nodes: quote, create, wait, download", "summary": "A developer working on the Revana pay-as-you-go image and video generation API published an n8n workflow, built entirely from stock HTTP Request, IF, Wait and Stop and Error nodes, that quotes a generation job's cost before spending, enforces a per-run budget, submits the job with an idempotency key, then polls and downloads the finished video. The workflow targets Revana's REST endpoints, where a quote call is free and returns a quoted price plus a reserved maximum, and the author reports that Seedance 2.5 at 720p, 5 seconds, 9:16 with audio quoted $1.05 on November 5, 2026, versus $0.68 for Kling 4.0 and $0.35 for Wan 3.0.", "body_md": "Disclosure: I work on [Revana](https://revana.si?utm_source=devto&utm_medium=article&utm_campaign=crosspost-4), a pay-as-you-go API for image and video models. The workflow below calls its REST API, but the shape (price first, cap the spend, one idempotency key per job, wait without hammering the API) is what you want around any paid generation API in n8n.\n\nMost \"AI video in n8n\" tutorials stop at one HTTP Request node that fires a prompt at a model. That works once in a demo. In a real workflow it breaks in three ways:\n\nThis post builds a workflow out of stock n8n nodes (HTTP Request, IF, Wait, Stop and Error) that handles all three. No community node is required, though there is one at the end if you prefer it.\n\n``` php\nManual Trigger\n  -> Settings (Set)\n  -> Quote (HTTP Request, free)\n  -> Within budget? (IF) --no--> Stop and Error\n  -> Create generation (HTTP Request, Idempotency-Key)\n  -> Wait 20 s\n  -> Get generation (HTTP Request)\n  -> Succeeded? (IF) --yes--> Download video (HTTP Request, file)\n                     --no---> Failed? (IF) --yes--> Stop and Error\n                                           --no---> back to Wait\n```\n\nEvery Revana model goes through the same two endpoints, so the workflow is the same for Seedance 2.5, Kling 4.0, Wan 3.0, Veo 3.1 Fast and the rest. Only the `model` value and its options change.\n\nCreate an API key at [revana.si/dashboard](https://revana.si/dashboard?utm_source=devto&utm_medium=article&utm_campaign=crosspost-4). In n8n, go to **Credentials > Add credential > Header Auth**:\n\n`Authorization`\n`Bearer sr_live_...`\nCall it `Revana API`. On each HTTP Request node below, set **Authentication** to *Generic Credential Type*, **Generic Auth Type** to *Header Auth*, and pick that credential.\n\nA **Set** node holds everything you'd want to change per run:\n\n| Field | Example | \n|---|---|\n| `model` | `seedance-2.5` | \n| `prompt` | `a paper boat drifting down a rainy street at night, neon reflections, rain sounds` | \n| `resolution` | `720p` | \n| `duration` | `5` | \n| `aspect_ratio` | `9:16` | \n| `audio` | `true` | \n| `budget_usd` | `2` | \n\nValid values differ by model. `GET https://api.revana.si/v1/models` (no key needed) lists each model's resolutions, durations and aspect ratios, for example Seedance 2.5 takes 4 to 30 seconds and Kling 4.0 takes 3 to 30. A value a model doesn't offer is refused with `422 invalid_input` before anything is charged, so a typo costs nothing.\n\n`POST /v1/generations/quote` takes exactly the body you're about to send and answers what it will cost. It's free: nothing is created, held or charged.\n\n**Quote** node (HTTP Request):\n\n`POST`\n`https://api.revana.si/v1/generations/quote`\n\n```\n={{ JSON.stringify({\n  model: $json.model,\n  input: {\n    prompt: $json.prompt,\n    resolution: $json.resolution,\n    duration: $json.duration,\n    aspect_ratio: $json.aspect_ratio,\n    audio: $json.audio\n  }\n}) }}\n```\n\nThe answer has two numbers worth knowing:\n\n`quoted_usd`: the price on the first route tried. This is what a successful job normally costs.`reserved_usd`: the most it could cost if the first provider fails and a dearer backup delivers instead. That amount is held from your balance while the job runs.\nWith the settings above (Seedance 2.5, 720p, 5 s, 9:16, audio), the quote on November 5, 2026 was **$1.05** ($0.21 per second), with up to $4.05 reserved if every backup were allowed. The same settings on Kling 4.0 quoted $0.68, on Wan 3.0 $0.35, and Veo 3.1 Fast at 6 seconds (it takes 4, 6 or 8) $0.60. Re-quote rather than copying these: prices change, and some inputs cost more than the model's headline rate. Seedance 2.5 with a first frame quoted $0.25 a second instead of $0.21.\n\n**Within budget?** (IF node), Number condition:\n\n```\n{{ $json.quoted_usd }}   is less than or equal to   {{ $('Settings').item.json.budget_usd }}\n```\n\nThe false branch goes to a **Stop and Error** node with a message like `Costs ${{ $json.quoted_usd }}, over the budget`.\n\n**Create generation** (HTTP Request):\n\n`https://api.revana.si/v1/generations`\n`Idempotency-Key` = `n8n-{{ $execution.id }}`\n\n```\n={{ JSON.stringify({\n  model: $('Settings').item.json.model,\n  input: {\n    prompt: $('Settings').item.json.prompt,\n    resolution: $('Settings').item.json.resolution,\n    duration: $('Settings').item.json.duration,\n    aspect_ratio: $('Settings').item.json.aspect_ratio,\n    audio: $('Settings').item.json.audio\n  },\n  max_cost_usd: $json.quoted_usd\n}) }}\n```\n\nTwo things make this node safe to retry:\n\n`200`) instead of starting a second one. Sending the same key with a `409 idempotency_conflict`, which is what you want if someone edits the node between attempts. If you loop over many items in one execution, make the key per item, for example `n8n-{{ $execution.id }}-{{ $itemIndex }}`.` max_cost_usd` is a hard ceiling.\nThe response is `202` with a generation object: `id`, `status` (`queued`), `quoted_usd`, `reserved_usd`, and `cost_usd` (`null` until it finishes).\n\nA 5-second 720p clip usually takes one to a few minutes, sometimes longer. Polling every second wastes executions and can hit the per-second burst guard (`429 rate_limited`). A loop with a Wait node is enough:\n\n`GET https://api.revana.si/v1/generations/{{ $('Create generation').item.json.id }}`\n`{{ $json.status }}` equals `succeeded` → download.`failed` → Stop and Error with `{{ $json.error.code }}: {{ $json.error.message }}`. Otherwise connect the false branch back to Two details:\n\n`$0` (`cost_usd: 0`). `error.retryable` tells you whether sending the same request later can work (`model_busy`, `timeout`, `all_routes_failed`) or whether the request itself has to change (` content_policy`, `invalid_input`, `max_cost_exceeded`).`{{ $runIndex }}` is greater than `60` (about 20 minutes at 20 s per lap). `$runIndex` counts how many times that node has run in this execution.\n**Download video** (HTTP Request):\n\n`GET https://api.revana.si/v1/generations/{{ $json.id }}/content`\nThe API redirects to a short-lived file link, and n8n follows it. The video arrives as binary data, ready for a Google Drive, S3, Slack or Write Binary File node. Result files expire, so store them; don't keep the link.\n\nIf your n8n is reachable on public HTTPS (n8n Cloud, or self-hosted behind a domain), you can drop the loop. Revana's queue endpoint accepts a completion webhook, and n8n's Wait node can pause until a URL is called.\n\n`{model, input}` wrapper, with `fal_webhook` query parameter:\n\n```\nPOST https://api.revana.si/v1/queue/revana/{{ $('Settings').item.json.model }}?fal_webhook={{ encodeURIComponent($execution.resumeUrl) }}\nIdempotency-Key: n8n-{{ $execution.id }}\n\n{ \"prompt\": \"...\", \"resolution\": \"720p\", \"duration\": 5, \"aspect_ratio\": \"9:16\", \"audio\": true, \"max_cost_usd\": 1.05 }\n```\n\n`GET https://api.revana.si/v1/queue/revana/{model}/requests/{{ $('Create generation').item.json.request_id }}/status`, and when it's `COMPLETED` without an `error`, download `.../requests/{request_id}/content` with Response Format: File.\nThe callback URL must be public HTTPS on port 443 with no redirects, so this won't work against `localhost:5678`. For local development, keep the polling loop.\n\n`minimax-h3-free` is a free model in the same catalog (5 to 15 seconds, 480p/720p/768p, sound always on). Set `model` to it in **Settings**, and the quote comes back `$0.00`. The account needs one top-up first (the smallest pack is $10, an anti-abuse rule), but free jobs never spend it. It's a good way to run the whole workflow end to end before you point it at a paid model.\n\n`n8n import:workflow --input=seedance-2.5-video-generator.json`.` n8n-nodes-revana` (Settings > Community Nodes > Install, if your instance allows community nodes) wraps this into Nothing here is n8n-specific. Make's HTTP module, Zapier's Webhooks by Zapier, Pipedream or a cron job can run the same sequence: `POST /v1/generations/quote`, `POST /v1/generations` with an `Idempotency-Key` and `max_cost_usd`, then `GET /v1/generations/{id}` on an interval and `GET /v1/generations/{id}/content` at the end. The full API is in [the docs](https://revana.si/docs?utm_source=devto&utm_medium=article&utm_campaign=crosspost-4) and [openapi.json](https://revana.si/openapi.json?utm_source=devto&utm_medium=article&utm_campaign=crosspost-4), and every model and price is at [revana.si/pricing](https://revana.si/pricing?utm_source=devto&utm_medium=article&utm_campaign=crosspost-4).\n\n*Prices and quotes in this post are from Revana's live API on November 5, 2026.*", "url": "https://wpnews.pro/news/generate-ai-videos-in-n8n-with-plain-http-request-nodes-quote-create-wait", "canonical_source": "https://dev.to/arib_khan_ba8305927b74917/generate-ai-videos-in-n8n-with-plain-http-request-nodes-quote-create-wait-download-56c", "published_at": "2026-11-05 11:46:05+00:00", "updated_at": "2026-11-05 11:49:29.234321+00:00", "lang": "en", "topics": ["ai-tools", "generative-ai", "ai-products", "developer-tools"], "entities": ["Revana", "n8n", "Seedance 2.5", "Kling 4.0", "Wan 3.0", "Veo 3.1 Fast"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/generate-ai-videos-in-n8n-with-plain-http-request-nodes-quote-create-wait", "markdown": "https://wpnews.pro/news/generate-ai-videos-in-n8n-with-plain-http-request-nodes-quote-create-wait.md", "text": "https://wpnews.pro/news/generate-ai-videos-in-n8n-with-plain-http-request-nodes-quote-create-wait.txt", "jsonld": "https://wpnews.pro/news/generate-ai-videos-in-n8n-with-plain-http-request-nodes-quote-create-wait.jsonld"}}