Overview
Generate beautiful custom banners or images using simple settings — almost no design skills required. You’ll send a JSON body with your preferences (colors, text, size, etc.). The API will return a link to the final image you can use anywhere.
Endpoint Information
- Method: POST
- Endpoint URL: https://node.nodetrigger.com/api/create-banner
- Content Type: application/json
Example Requests
POST https://node.nodetrigger.com/api/create-banner
Content-Type: application/json
{
"width": 1200,
"height": 630,
"background_color": "#f0f0f0",
"text": "Welcome to the Future of Automation!",
"font_size": 60,
"font_color": "#000000",
"text_area": "center",
"text_align": "center"
}
Example response
{
"url": "https://node.nodetrigger.com/uploads/banner-1711458029123-3932.png"
}
Full Parameters & What They Do
Parameter | Required | Description |
---|---|---|
width | ✅ Yes | Width of the final image in pixels (e.g., 1200) |
height | ✅ Yes | Height of the final image in pixels (e.g., 630) |
background_color | ❌ No | Solid color background (hex code like #ffffff or name like white ) |
background_gradient | ❌ No | Use a color gradient instead of a solid color. See examples below |
image | ❌ No | URL of a background image. If provided, it will cover the background |
image_focus | ❌ No | Choose which part of the background image stays visible if it’s cropped. Values: "x": 0.5, "y": 0.5 (default center) |
text | ✅ Yes | The message you want displayed on the banner |
font_size | ❌ No | Max size of the text. If too big to fit, it will shrink automatically |
font_color | ❌ No | Color of the text, e.g. "#002538" |
font_name | ❌ No | Name of the font (defaults to Questrial-Regular) |
text_area | ❌ No | Where the text is placed: "left" , "center" , "right" |
text_align | ❌ No | Alignment inside the text block: "left" , "center" , "right" |
padding_top | ❌ No | Space between the top of the image and the text block (in pixels) |
padding_bottom | ❌ No | Same, for the bottom |
padding_left | ❌ No | Same, for the left |
padding_right | ❌ No | Same, for the right |
watermark_text | ❌ No | Add a small text watermark (like “© 2025 MyBrand”) |
watermark_fontsize | ❌ No | Size of the watermark text |
watermark_position | ❌ No | Where to place the watermark: "bottom_right" (default), "bottom_left" , "top_right" , "top_left" |
format | ❌ No | "png" (default) or "jpg" output |
Background Options
1. Solid Color
"background_color": "#ffcc00"
2. Gradient
"background_gradient": {
"from": "#ffcc00",
"to": "#ffffff",
"direction": "vertical" // or "horizontal"
}
3. Image Background
"image": "https://example.com/your-background.jpg"
Optional cropping control:
"image_focus": {
"x": 0.5,
"y": 0.2
}
x
is left (0) to right (1)y
is top (0) to bottom (1)
What is this and why should I use it?
When you use a background image, it may not fit perfectly into your desired banner size (e.g. cropping a 16:9 image into a square). To make sure your important part of the image stays visible (like a face, product, or logo), you can tell the system where to “focus” the crop.
x
controls horizontal focus:0
= left side1
= right side0.5
= center (default)
y
controls vertical focus:0
= top1
= bottom0.5
= center (default)
This lets you avoid having your subject accidentally cropped out.
Example:
If your image shows a person near the top of the picture, and you want to crop it square without cutting off their head, use:
"image_focus": {
"x": 0.5,
"y": 0.2
}
This tells the system to crop with more focus on the top area of the image.
What Should I Enter for font_name
?
When calling the API, you should provide the base name of the font file you want to use.
Examples:
What you should enter in "font_name" |
---|
"Questrial-Regular" |
"Lato-BoldItalic" |
"PlayfairDisplay-Bold" |
"JosefinSans-Regular" |
Text Placement & Padding
You can control where the text appears using text_area
, text_align
, and padding.
Example:
"text_area": "right",
"text_align": "left",
"padding_top": 40,
"padding_right": 100
- The text block will be placed on the right side of the image
- Text lines will be left-aligned inside that block
- There will be 40px space at the top and 100px on the right side
Auto Font Resizing
Even if you choose a big font_size
, the system will automatically shrink the text if it doesn’t fit. This ensures:
- No text is cut off
- Words are not broken mid-line
- Text always fits the available space
Clean Watermarking
Add subtle branding with a watermark:
"watermark_text": "© NodeTrigger",
"watermark_fontsize": 16,
"watermark_position": "bottom_right"
Advanced Example
{
"width": 1080,
"height": 1080,
"background_gradient": {
"from": "#1e3c72",
"to": "#2a5298",
"direction": "vertical"
},
"text": "Automate Everything with NodeTrigger",
"font_size": 120,
"font_color": "#ffffff",
"text_area": "center",
"text_align": "center",
"padding_top": 100,
"padding_left": 60,
"padding_right": 60,
"watermark_text": "© 2025 NodeTrigger",
"watermark_fontsize": 20,
"format": "jpg"
}
Notes
- The image will be publicly accessible at the link returned in the response.
- All colors must be valid hex (like
#123456
) or standard CSS names (like"white"
). - Only one main text block is supported (for now).