Fluxpoint API

  • Info

  • Image generation

    You can use GET or POST requests and any http lib to generate images and get image bytes as a response back.

    If the API is not a success response you can parse the json body to get basic info on what happened.


  • Get Test Image

  • You can use our test image gen endpoint to get a basic response and also test how to get/download the image data bytes using whatever lib you use.

    /test/image
    Get the test image.

    Image

    [Image Bytes Response]
    

  • Get Custom Image

  • Use the information and examples below on how to generate your own image which can be used as a template for stuff like, welcome messages, profiles, memes or other funny stuff.

    /gen/custom
    Get the created image gen image.

    [Image Bytes Response]
    

    Example Request
    Here is an example on what you should send in your request.

    {
    	"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
    		}
    	]
    }
    

  • Image Types

  • Add these types into the Images list to generate them.

    Square

    type: bitmap - (Required)
    width: 100 - Set the width of the shape. (Required)
    height: 100 - Set the height of the shape. (Required)
    color: blue - Set the shape to be a color from name/hex/rgb/rgba use rgba for transparency.
    round: 60 - Make the borders of the shape round. (Default 0)
    x: 20 - Position the element on the X axis horizontally (Default 0)
    y: 20 - Position the element on the Y axis vertically (Default 0)


    Image Url

    url: https://website.com/image.png
    cache: true - Cache the image server-side so it can be easily loaded again such as background images. (Not Recommended for Avatars) (Default false)
    width: 100 - Set the width of the image. (No default)
    height: 100 - Set the height of the image. (No default)
    maxwidth: 100 or maxheight: 100 - Set the max width/height so the image can scale properly. (No default)
    round: 60 - Make the borders of the image round for stuff like circle avatars. (Default 0)
    x: 20 - Position the element on the X axis horizontally (Default 0)
    y: 20 - Position the element on the Y axis vertically (Default 0)


    Circle

    type: circle - (Required)
    color: blue - Set the shape to be a color from name/hex/rgb/rgba use rgba for transparency.
    radius: 20 - Set the size of the circle from the center point
    x: 20 - Position the element on the X axis horizontally (Default 0)
    y: 20 - Position the element on the Y axis vertically (Default 0)


    Triangle

    type: triangle - (Required)
    color: blue - Set the shape to be a color from name/hex/rgb/rgba use rgba for transparency.
    width: 100 - Set the width of the shape. (Required)
    height: 100 - Set the height of the shape. (Required)
    cut: topleft/topright/bottomleft/bottomright - Choose where the missing peice of the triangle is. (Required)
    x: 20 - Position the element on the X axis horizontally (Default 0)
    y: 20 - Position the element on the Y axis vertically (Default 0)


  • Text Format

  • Add these into the Texts list to generate them.
    text: "Hello" or texts: [ "Hello", "User" ] - Set the text (Required)

    Main options

    size: 30 - Set the font size of the text. (Default 16)
    font: Comic Sans - Set the font to use for the text. (Default Sans Serif)
    color: blue - Set the text color from name/hex/rgb/rgba use rgba for transparency. (Default white)
    back: black - Set the background color for the text box from name/hex/rgb/rgba use rgba for transparency. (Default none)

    Position

    x: 20 - Position the text 20 pixels from the left. (Default 0)
    x: 20 - Position the text 20 pixels from the top. (Default 0)
    align: l/m/r - Align the text from left/center/right (Default left)

    Styles

    bold: true - Set the text to bold style. (Default false)
    italics: true - Set the text to italics style. (Default false)
    underline: true - Set the text to underline style. (Default false)
    line: 1.2 - Set the line spacing for multiline text. (Default 1)
    weight: 700 - Increase the boldness of the text. (Default 500)

    Text box width/height

    width: 100 - Set the max width of the text box before it wraps to a newline. (Default none)
    height: 100 - Set the max height of the text box to clip extra text. (Default none)

    Outline

    outline: true - Show text outline with default options.
    outlinewidth: 9 - Set the outline size from the text. (Default 5)
    outlinecolor: blue - Set the outline color from name/hex/rgb/rgba use rgba for transparency. (Default black)
    outlineblur: 5 - Make the outline transparency less visible for a cool effect. (Default 1 solid)


    An error has occurred. This application may no longer respond until reloaded. Reload 🗙