Print text on custom background
Returns a new image (custom background)
Input
{
"height": 1000,
"width": 1000,
"backgroundColor": "#000000",
"data": [
{
"text": "Alice",
"x": 0,
"y": 0,
"maxWidth": 500,
"maxHeight": 400,
"textColor": "#fff123"
},
{
"text": "Bob",
"x": 0,
"y": 200,
"maxWidth": 500,
"maxHeight": 400,
"textColor": "#fff123"
}
]
}Output · HTTP 200
{
"statusCode": 200,
"headers": {
"content-type": "image/png"
}
}Show curl command
curl -X POST 'https://api.1001fx.com/images/text2image' \
-H 'X-API-KEY: YOURSECRETAPIKEY' \
-H 'Content-Type: application/json' \
-d '{"height":1000,"width":1000,"backgroundColor":"#000000","data":[{"text":"Alice","x":0,"y":0,"maxWidth":500,"maxHeight":400,"textColor":"#fff123"},{"text":"Bob","x":0,"y":200,"maxWidth":500,"maxHeight":400,"textColor":"#fff123"}]}'