REST API

Our REST API has the following endpoints:

  • /generate
  • /screenshot

/generate

You can use the /generate endpoint to create your images from your templates. The endpoint accepts the following GET parameters.

Parameters

Parameter Description
key Your REST API key which you can find here.
template The unique ID for your template. These are displayed on this page.
your_object_name You can provide the name of any of your text/image template objects to override their default values. i.e textbox1=text:When%20something%20is%20important%20enough%2C%20you%20do%20it%20even%20if%20the%20odds%20are%20not%20in%20your%20favor.

Images can be modified by providing the overriding image url, screenshot url or YouTube video URL (default YouTube thumbnails are retreived). The format for images are as follows:

Image URL image_object_name=url:https://website.com/yourimage.png

Screenshot a website URL

image_object_name=screenshot:url:https://website.com/yourimage.png

Grab the thumbnail for YouTube video image_object_name=youtube:url:https://www.youtube.com/watch?v=G1wsCworwWk

Flag Applicable Object Type Description Example
screenshot: Image When provided, the url provided should be the URL of a page you wish to screenshot https://api.socialimage.app?key=xxxx&template=xxxxx&myBackgroundImageExample=screenshot:cover:url:https://yourwebsite.com/about-us/
cover: All Objects The object is resized to cover your template. https://api.socialimage.app?key=xxxx&template=xxxxx&myBackgroundImageExample=cover:url:https://yourwebsite.com/yourimage.png
contain: All Objects The object is scaled but contained to the template. https://api.socialimage.app?key=xxxx&template=xxxxx&myBackgroundImageExample=contain:url:https://yourwebsite.com/yourimage.png
xLeft: All Objects The object is aligned to the left. https://api.socialimage.app?key=xxxx&template=xxxxx&someTextBoxExample=xLeft:text:My%20Text
xCenter: All Objects The object is centered horizontally. https://api.socialimage.app?key=xxxx&template=xxxxx&someTextBoxExample=xCenter:text:My%20Text
xRight: All Objects The object is aligned to the right. https://api.socialimage.app?key=xxxx&template=xxxxx&someTextBoxExample=xRight:text:My%20Text
yTop: All Objects The object is aligned to the top. https://api.socialimage.app?key=xxxx&template=xxxxx&someTextBoxExample=xCenter:yTop:text:My%20Text
yCenter: All Objects The object is centered vertically. https://api.socialimage.app?key=xxxx&template=xxxxx&someTextBoxExample=xCenter:yCenter:text:My%20Text
yBottom: All Objects The object is aligned to the bottom. https://api.socialimage.app?key=xxxx&template=xxxxx&someTextBoxExample=xCenter:yBottom:text:My%20Text

Object Params

Flags

Flags are special values which can be prepended to the value of your object parameters.