Generate images via webhook with Sublyx image generation API

Go to Workflow
0 views
Built by jal jal
Created on September 01, 2026

Description

Quick overview
This workflow exposes a webhook that accepts an image prompt and optional parameters, sends them to the Sublyx Images Generation API, and returns the generated image back in the webhook response as a PNG file.

How it works
Receives a POST webhook request containing an image prompt plus optional model and size parameters.
Calls the Sublyx AI Images Generations API to generate one image using the provided prompt and settings.
Extracts the returned image URL or base64 image data from the Sublyx API response.
Converts base64 image data into a PNG binary file.
Responds to the original webhook request with the generated image as a binary download.

Setup
Create a Sublyx API credential in n8n (HTTP templated custom auth) and add your Sublyx API key.
Activate the workflow and copy the webhook URL, then configure your client/application to send POST requests to it.
Ensure your webhook payload includes a prompt field, and optionally pass model (default gpt-image-2) and size (default 1024x1024).

Requirements
An n8n instance, a Sublyx account, a valid Sublyx API key, and an n8n HTTP templated custom auth credential configured with the API key. The webhook request must include a prompt field.

Customization
Customize the image model, output size, prompt, and response format. You can also connect the webhook response to Telegram, Discord, Google Drive, Notion, or another application.

Additional info
The workflow uses the Sublyx AI Images Generation API and returns the generated image as a PNG binary response. New users can register and receive available trial credits according to the current promotion.

Get started with the Sublyx AI API Gateway.

Nodes Used (2)

Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest