Skip to content

Generate images in n8n from a template

n8n can generate images by calling an image API from its HTTP Request node. With PostImager you POST your fields to /v1/renders with a template name, and the same request returns a download link to a finished PNG or JPG at an exact size. No AI draws the image, so your text comes out as you sent it.

Set it up in n8n

  1. Create a Header Auth credential: name Authorization, value Bearer followed by your API key.
  2. Add an HTTP Request node: method POST, URL https://postimager.com/v1/renders?wait=60, using that credential.
  3. Send a JSON body that names the template, size and format, and maps your trigger fields into variables.
  4. Add an Idempotency-Key header with something unique per item, such as the RSS item guid, so a retry does not make a second image.
  5. Use output.download.url in the next node. If status is not completed there is no link yet, so stop or read the render again.

A workflow you can import

The n8n and Make setup page has an importable workflow that turns an RSS item into an article card. It was run in a real self-hosted n8n against the hosted service, including the stop when a render has no image yet.

Why a template and not an AI model

AI image models can garble words, and they return a different picture each time. A template puts your exact words in fixed positions, in the bundled fonts. Long text shrinks to fit, and if it still gets cut, the render says so with a warning. The trade-off is that you choose from five ready-made templates; there is no prompt and no custom design yet.

Common questions

Can n8n generate images?
Yes. n8n has no built-in template image generator, but its HTTP Request node can call an image API. PostImager takes your fields as JSON and returns a download link to the finished image.
Do I need a community node?
No. PostImager has no community node. It uses the HTTP Request node that ships with n8n and a header credential.
Which image sizes can it make?
Depending on the template: 1080 by 1080, 1080 by 1350, 1080 by 1920 and 1200 by 630, as PNG, JPG or a one-page PDF.
Is there a free image generation API for n8n?
PostImager is free during its beta: 50 renders a month per account, and a limit shared by everyone. PostImager is an invite-only free beta with no card. Request an invite to get an account.