n8n + ApexApi

How to Generate Images with GPT Image 2 in n8n

POST a prompt to this workflow's webhook and it returns a freshly generated GPT Image 2 image. It is a clean, three-node endpoint: a webhook in, the ApexApi image node in the middle, and a response out. Call it from any app, or drop it into a larger workflow as a reusable image sub-workflow. One API key covers it.

What you'll build

  • A webhook that turns a prompt into an image, no glue code
  • GPT Image 2 by default, with its strong text rendering
  • Reusable as a sub-workflow inside a bigger automation
  • Pay per image on one ApexApi key; swap the model with one field

Set it up in 4 steps

1

Get a free ApexApi key

Create a key at apexapi.dev, no card required. It starts with ak-.
2

Install the community node

In n8n: Settings → Community Nodes → Install n8n-nodes-apexapi (0.2.0+).
3

Import this template

Download the workflow, then in n8n use Workflows → Import from File. It uses the ApexApi Context node's Image generation operation.
4

Add your key and run

Open any ApexApi node, create an ApexApi account credential, paste your key, then click Test workflow.

FAQ

How do I call it?

Activate the workflow, then POST to the webhook URL with a JSON body like { "prompt": "a red bicycle leaning on a blue wall" }. The response contains the generated image.

Can I use a different image model?

Yes. Open the Generate image node and change the model field to any image model in the catalog, for example black-forest-labs/flux-2-pro.

What does it cost?

You pay per image, billed to your ApexApi credit balance. GPT Image 2 pricing scales with size and quality; see the model page for live rates.

More n8n templates

See all node operations in the n8n integration docs.