How-to guide
How to Connect Ideogram to n8n and Save Generated Images
Connect Ideogram to n8n with the built-in HTTP Request node. One request generates the image and returns a link to it, a second request downloads the file, and a file node saves it.

Manual Trigger, Generate image and Has image URL?

Download image and Save image to disk
We built this workflow in n8n 2.48.8 and ran it on November 23, 2026. It generated a poster, downloaded it as a 5.99 MB PNG and saved it to disk in about eight seconds. The screenshots below come from that run, with the test endpoint and signed links hidden.
Overview: What we ran
The workflow has five nodes:
Manual Trigger → Generate image → Has image URL? → Download image → Save image to disk
- Environment: self-hosted n8n 2.48.8 on Node.js 24, installed from npm, with n8n's
default file-access setting. Our sandbox needed two changes to start n8n: the legacy expression
engine (
N8N_EXPRESSION_ENGINE=legacy), because the default engine could not start there, and a workaround for the sandbox's open-file limit. We don't expect either to change how these nodes behave, but your setup may differ. - API: the Ideogram 4.6 generate endpoint. Our test sent the same requests to Ideogram's staging API, which uses the public API's request format; the public address is shown below.
- Runs: two full runs succeeded. Two earlier runs generated and downloaded the image but failed to save it: the first named a folder that didn't exist, and the second hit n8n's file-access rule described below. One price check ran without generating.
The first request waits for the result. The API returns JSON with a link to the image, not the image itself. That link expires after 24 hours, so the workflow downloads the file straight away.
Setup: Before you start
- An n8n instance where you can create workflows and credentials.
- An Ideogram API key. The API setup guide shows where to create one under Settings, API, and how billing works.
- An API balance. The request in this guide costs $0.06 at medium quality; see API pricing.
- A place n8n is allowed to write, or a storage service, for the saved file.
An API key can use every endpoint its workspace can reach and spend its balance. Keep it in an n8n credential and out of any workflow you share. Authentication explains how to revoke a key.
Step 1: Create the workflow and credential
- Create a workflow and add a Manual Trigger.
- Add an HTTP Request node after it and name it Generate image.
- Under Authentication, choose Generic Credential Type, then Header Auth, and create a credential.
-
Set Name to
Api-Keyand Value to your key, then save.
Ideogram reads the key from an Api-Key header, not from an
Authorization: Bearer header. You can also set Allowed HTTP Request Domains so the credential
only works with api.ideogram.ai. n8n's HTTP Request credentials guide covers Header Auth.

Header Auth credential
Step 2: Configure the image request
| Field | Value |
|---|---|
| Method | POST |
| URL | https://api.ideogram.ai/v2/image/generate/ideogram-4-6 |
| Authentication | Generic Credential Type, then Header Auth, then your credential |
| Send Body | On |
| Body Content Type | JSON |
| Specify Body | Using JSON |
| Options, Response | Leave Include Response Headers and Status off |
Enter this JSON body:
{
"prompt": "A letterpress poster with the words OPEN STUDIO in bold serif type on warm paper. No other text.",
"magic_prompt": "off",
"quality": "medium",
"num_images": 1
}
Our first successful run used a shorter prompt and left out magic_prompt, and
Ideogram rewrote the prompt with extra detail before generating. The poster came back with a
date, an address and an invented studio name that we never asked for. Turning magic_prompt off and adding “No other text” gave us only the two words. With no size set, the image was 2048
by 2048 pixels.
Leave Include Response Headers and Status off so the response body stays at the top level for the expressions below. The model guide lists the other fields and models.
Step 3: Check the price first
To get a quote without generating anything, add dry_run=true to the URL:
https://api.ideogram.ai/v2/image/generate/ideogram-4-6?dry_run=true
Run the node with the same body. Our quote came back as 60,000 micro-dollars, which is $0.06,
with the qualifier exact. Nothing is generated or billed. A quote doesn't check
your balance or limits, so the real request can still be rejected. Remove ?dry_run=true
before you continue. See Price Quotes.

Output of the price check
Step 4: Generate once and check the response
Run the workflow. Our response held generation_id and a data array. Its
first item had the image url, resolution, is_image_safe,
seed, and a prompt field with the model's structured version of our prompt.

Generate image settings
When is_image_safe is false, the URL is empty. Add an IF node named Has image URL? so
only a response with a URL continues. Set its left value to this expression and choose the string
condition is not empty:
{{ $json.data?.[0]?.url || '' }} Connect the true output to the next step, and use the false output for your own alert or review.
Step 5: Download the image as binary data
Add another HTTP Request node to the true output and name it Download image.
| Field | Value |
|---|---|
| Method | GET |
| URL | Expression: {{ $json.data[0].url }} |
| Authentication | None |
| Options, Response, Response Format | File |
| Put Output in Field | data |
The link is already in the previous response, so this request needs no credential. In our run,
the Binary tab showed a data field holding a 5.99 MB PNG. n8n's HTTP Request documentation describes the File response format.
![The node settings: Method GET, URL expression {{ $json.data[0].url }}, Authentication None, Response Format File.](https://storage.googleapis.com/ideogram-static/website/images/3c9fc1b0c907a45f.webp)
Download image settings

Download image binary output
If you change the URL field by hand, use this expression: {{ $json.data[0].url }}.
Step 6: Save the downloaded file
On a self-hosted instance, add Read/Write Files from Disk after Download image:
- Choose Write File to Disk.
- Set Input Binary Field to
data. -
Set File Path and Name to a path inside the
.n8n-filesfolder in the home directory of the user that runs n8n. For a user whose home is/home/node, that looks like this:
/home/node/.n8n-files/poster-{{ $execution.id }}.png
Since n8n 2.0, the file node may only write inside ~/.n8n-files unless an admin changes
N8N_RESTRICT_FILE_ACCESS_TO. Our second run wrote to another folder and failed with
“Access to the file is not allowed.” The $execution.id in the name gives each run its
own file, so a later run doesn't overwrite an earlier one.

Save image to disk, file-access error
In Docker, the path is inside the container unless you mount a folder. On n8n Cloud, files on disk may not persist, so send the binary field to a storage service node instead. See Read/Write Files from Disk.

The saved file
Once one image works, replace the Manual Trigger, or take the prompt from an earlier node. Keep
the generation_id alongside the saved file.
Reference: Troubleshooting
| What you see | What to check |
|---|---|
| 401 | The header name must be Api-Key, and the value must be a valid key. |
| 402 | The balance is too low or a plan limit was reached. Retrying won't add funds. |
| 400 | Read the error body; a field or value isn't supported by the endpoint. |
| 422 | The prompt failed the safety check. This request is not billed. |
| 429 | Too much work is in progress. The default limit is 10 images and videos at once, not 10 requests, and a rejected request is not billed. |
| Empty image URL | Check is_image_safe. An image blocked after it was generated returns an empty URL and is still billed. The IF node sends it to the false branch. |
| A link that no longer works | Result links expire after 24 hours. Download the file in the same run. |
| A timeout | Don't resend at once. The generation keeps running and is billed when it completes. See the retry guidance. |
| “Access to the file is not allowed.” | The save path is outside the folder n8n may write to. Use ~/.n8n-files or ask an admin to change it. |
Sources: Ideogram's errors and billing and rate limits pages, and our run for the file-access message.
Tested Our run covered a successful generation, the price check and the blocked save path. The error codes in the table come from Ideogram's documentation; we did not trigger them.
Reference: For longer jobs: polling and webhooks
The workflow above waits for one image. For longer work, the API can return a
generation_id before the result is ready. Store it and check the generation endpoint
until the job is completed or failed, respecting Retry-After. Checking is limited
to 1,000 requests per 10 seconds.
A supported endpoint can instead deliver the result to a public HTTPS webhook, such as an n8n Webhook node. Verify each signature against the raw request bytes, make duplicate deliveries safe, and keep polling as a fallback: delivery is not guaranteed, and a failed generation sends nothing. The webhook guide has the current rules. We did not test webhooks for this guide.
For spreadsheet-based batches inside Ideogram, see bulk image generation.
Reference: FAQs
Is there an Ideogram node for n8n?
There is no built-in Ideogram node. The HTTP Request node calls the API directly, which is what this guide uses. A third-party community node for the v2 API also exists; it is not made by Ideogram, so review its code, maintenance and installation rules for your n8n setup before you rely on it.
Where should I keep my Ideogram API key in n8n?
Keep it in a Header Auth credential, never in the workflow's parameters. A key can spend its whole workspace's balance. n8n stores credentials separately, so the key does not travel with an exported workflow. You can also limit the credential to the api.ideogram.ai domain.
Can I save images to disk on n8n Cloud?
Not reliably. n8n's file node documentation says Cloud files aren't guaranteed to persist. Send the binary data field to a storage service node instead.
Does the Ideogram endpoint accept a JSON body?
Yes. Our run sent a JSON body to the Ideogram 4.6 generate endpoint and it succeeded. The endpoint also accepts a multipart form, which you need when you upload a source image.
Get an Ideogram API key
Start with the API quickstart, then paste your key into an n8n Header Auth credential.

