Custom Image Generation (Donator)

Create custom image formats using the api by adding images/shapes and text onto a canvas with a specific format e.g. welcome images.

This endpoint is for donators only

get
Custom

api.fluxpoint.dev/gen/custom
This will generate a custom image using a json format
Request
Response
Request
Headers
Content-Type
required
string
application/json
Authorization
required
string
Your API token
Body Parameters
Json
required
object
Json body with format
Response
200: OK
Image in raw format/bytes.
[Image]
400: Bad Request
Your json body is not set or invalid.
{
"success": false,
"code": 400,
"message": "This is an error"
}
500: Internal Server Error
A server error occured please contact support.
{
"success": false,
"code": 500,
"message": "This is an error"
}

Body format

{
"base": ImageFormat,
"images": Array<ImageFormat>,
"texts": Array<TextFormat>,
// Optional and default is jpg (png/jpg/webp)
"output": "png"
}

Image format

Square
Image url
Circle
Triangle
Square
{
"type": "bitmap",
"x": 10,
"y": 20,
"width": 100,
"height": 100,
"color": "#aaaaaa",
// Optional
"round": 60
}
Image url
{
"type": "url",
"url": "https://gallery.com/image.png",
"x": 10,
"y": 20,
// Optional resize the image/round corners
"width": 100,
"height": 100,
"round": 60
}
Circle
{
"type": "circle",
"x": 10,
"y": 20,
"radius": 100,
"color": "red"
}
Triangle
{
"type": "triangle",
"x": 10,
"y": 20,
"color": "red",
"cut": "topleft" // TopLeft/TopRight/BottomLeft/BottomRight
}

Text format

{
"text": "Some text to show",
"size": 16,
"color": "black",
"x": 10,
"y": 20,
// Optional
"font": "Sans Serif",
"bold": false,
"unicode": false, // Enable Discord unicode support
"outline": 1,
"outlinecolor": "yellow"
}

Example

{
"Base": {
"type": "bitmap",
"width": 2000,
"height": 2000,
"color": "#7289da"
},
"Images": [
{
"type": "url",
"url": "https://img.fluxpoint.dev/thm/1422436083957760.jpg",
"width": 1000,
"height": 1000
},
{
"type": "bitmap",
"round": 160,
"x": 20,
"y": 240,
"width": 1220,
"height": 360,
"color": "0,0,0,80"
}
],
"Texts": [
{
"text": "Hello",
"size": 120,
"x": 600,
"y": 1060
}
]
}