API Access

IMGBun provides free REST API for developers. Sign up for a API key to implement IMGBun into your application. You can generate 100 free images daily.

API Endpoint

https://api.imgbun.com/{gif,jpg,png}
The API supports gif, jpg or png format. Choose a correct endpoint to generate targeted image format.

The API endpoint only accepting GET requests.

Parameters

Please refer the table below for supported parameters.

Name Default Value Description
key
Required
- An unique API key obtained after sign up a IMGBun account.
format
Optional
json The format of the API response. Accepts json, xml, and raw.
text
Required
- A text to convert into image. Maximum length is 500 characters.
color
Optional
000000 The color of the text in 6 digits hexadecimal color code.
size
Optional
10 The font size of the text. Accepts the range of 6 to 40.
background
Optional
FFFFFF The background color in 6 digits hexadecimal color code. Leave blank for transparent background (Only in gif and png format).

Usage

Convert text You are having a laugh into a .png image with red color text and transparent background.

Endpoint
GET https://api.imgbun.com/png?key={API Key}&text=You are having a laugh&color=FF0000&size=16
Response
{
    "status": "OK",
    "message": null,
    "direct_link": "https:\/\/i.imgbun.com\/B73bZ4.png"
}
Endpoint
GET https://api.imgbun.com/png?key={API Key}&text=You are having a laugh&color=FF0000&size=16&format=xml
Response
<result>
    <status>OK</status>
    <message />
    <direct_link>https://i.imgbun.com/B73bZ4.png</direct_link>
</result>
Endpoint
GET https://api.imgbun.com/png?key={API Key}&text=You are having a laugh&color=FF0000&size=16&format=raw
Response
Example response