About Duply

Duply is a web app that provides services to generate image dynamically Out motto is “create once and reuse it“.

Before you can generate image, you need to create a template
Go to dashboard > Click “Create Template Now“ (Like button below) >
Create Template API buttonSelect type or custom size > Start from blank template or Select predefined templates Template API Flow

Template & Editor

"Template" is the image format which you can modify and later you can use to generate the image

After you create a template, you can edit it in the Editor
Template API EditorThere are 5 parts in the editor

Side & nameDescription
Center Template ContainerThe white part in the center is the container where your
Left SideIt's where the elements from, you can drag an element from there to the to the container / template in the center
Right SideIt's where you can modify the selected element like background, border or for text font size, text color, etc
There are 2 tabs in here, Options and Orders
Options is where you can modify the element
Orders is where you can reorder the element and see all elements you've putted
Bottom SideBottom part you can undo or redo your actions, set the zoom for the container or fit the container
Top SideIn here the top left beside "Back to Dashboard" button is the last time the template has been saved
Move to right there is the template name where you can modify
Save button to save the current template
Fill & Generate Image or Video is to generate image from this template, appear where you can choose how you're going to generate the template

Template & Editor

There are several ways to generate image from template

- Form
When you click Fill in template you might see there are Form and Form share, it's actually the same feature except Form Share is where you can generate a public link so your team / friends / marketing can generate image through it. page,

the left side is the image preview and the right side is where the image before create / generate it. (Only the editable elements can be seen here, here, editable can be set on the right side of the editor)

- API
Using API, you can generate your image programatically with HTTP request. More of it on this section

- QueryString
Coming Soon

- Integrations
Coming Soon

- Video
Coming Soon

API Documentation

Duply provides APIs for generate you images. Design a template in Duply editor and you can use this API to generate the image See examples in Image Examples.

BASE URL

https://gen.duply.co/v1

Authentication

When using API, Duply expects the API key and API Secret Key.

Duply is using Basic Authentication for API Request

Basic authentication is a simple authentication You need to sends HTTP requests with the Authorization header that contains the word Basic word followed by a space and a base64-encoded string apiKey:secretKey.

For example:
Your API key is apiKey
Your Secret Key is secretKey

Encoded Key

Then in header it will be

Authorization: Basic

GET /auth

200: OK
{ "status": "true", "message": "" }
401: Unauthorized
{ "status": "true", "message": "" }

GET Usage

Check your currrent usage with this API and see how much image and video rendering quota you have remaining during the current month

Headers

Authorization
* required

string

Your api key and secret key combined as Basic Authorization, more detail in authentication section

GET /usage

200: OK
{ "status": true, "data": { "cycleImageAPIRequest": 100, "cycleImageFormRequest": 100, "cycleImageTotalSize": { "png": "100kb", "jpg": "100kb", "thumb": "100kb" }, "cycleVideoRequest": 100, "cycleVideoTotalLength": { "mp4": 1200, "webm": 1200 }, "subscriptionInfo": { "type": "free", "end": null, "endTrial": null, "isTrial": false }, "subscriptionLimit": { "maxTemplates": 2, "maxImageAPIRequest": 70, "maxFormShare": 2, "maxFormDownloadRequest": 100, "maxVideoLength": 300, "maxBandwidthTotal": 104857600, "isAllowFormShare": true, "isAllowAPI": true, "isAllowAPITransparent": false, "isAllowAPIThumb": false, "isAllowDownloadTransparent": true, "isAllowDownloadCustomSize": false, "isAllowGenerateVideo": true } }, "message": "Successfully fetched usage data" }

GET List all My Template

Templates are the reusable designs that you create for generating your image / with this API you can check all your templates.

Headers

Authorization
* required

string

Your api key and secret key combined as Basic Authorization, more detail in authentication section

GET /template

200: OK
{ "status": true, "data": [ { "id": "xxxxxx-xxxx-xxxxx-xxx", "name": "My Instagram Template", "updated": "2021-08-23T12:04:21.000Z", "created": "2021-08-23T12:02:51.000Z", "variantName": [ "ig-post", "ig-story" ] } ], "message": "Successfully fetched your templates" }

GET Template Detail

Get template detail data

All data including the height, height and all the elements property inside the template will be shown here

By passing the templateId in the url parameter, variantName are not required to be passed. If user not input the variantName, by default it&aposll choose the oldest variant

Headers

Authorization
* required

string

Your api key and secret key combined as Basic Authorization, more detail in authentication section

Path Parameters

templateId
* required

string

Your templateId

Query Parameters

variantName

string

Optional: pass your specific variantName, by default it'll choose the oldest variant

GET /template/:templateId

200: OK
{ "status": true, "data": { "id": "xxxxxx-xxxx-xxxxx-xxx", "name": "My Instagram Template", "updated": "2021-09-19T12:48:55.000Z", "created": "2021-07-23T06:37:31.000Z", "content": { "width": 1080, "height": 1080, "variantName": "ig-post", "elements": [ { "id": "prmmf9", "top": 245, "data": "Subheading Text", "left": 540, "title": "title", "width": 600, "border": { "style": "solid", "radius": 0 }, "height": 200, "rotate": 0, "editable": true, "dataTextConfig": { "fontSize": 51 }, "type": "h2" } ] } }, "message": "Successfully fetched your template" }

POST Generate Image

Generate your image from a template

The POST body contains several parameters

Headers

Authorization
* required

string

Your api key and secret key combined as Basic Authorization, more detail in authentication section

Body Parameters

templateId
* required

string

The ID of the selected template

formats
* required

array

image formats, can be choosed between jpg, png and thumb

fill
* required

object

This is where you fill all your elements data. In the example, you can see the "title" is the element Name, it has object of data: where for text you can fill it with string and for image you can fill with image url.

requestName

string

Name of my request, used for identifier which later can be checked in request list or generated list

transparent

string

his only applicable if format includes png, if the transparent is true then the container background color will be transparent

variantName

string

Your selected variantName, if not passed by default it'll choose the oldest variant

POST /generate/

200: OK
{ "status": true, "data": { "id": "xxxxxx-xxxx-xxxxx-xxx", "name": "My Instagram Template", "updated": "2021-09-19T12:48:55.000Z", "created": "2021-07-23T06:37:31.000Z", "content": { "width": 1080, "height": 1080, "variantName": "ig-post", "elements": [ { "id": "prmmf9", "top": 245, "data": "Subheading Text", "left": 540, "title": "title", "width": 600, "border": { "style": "solid", "radius": 0 }, "height": 200, "rotate": 0, "editable": true, "dataTextConfig": { "fontSize": 51 }, "type": "h2" } ] } }, "message": "Successfully fetched your template" }

GET Generated Image List

Get your generated image list result

Headers

Authorization
* required

string

Your api key and secret key combined as Basic Authorization, more detail in authentication section

GET /generate/

200: OK
{ "status": true, "data": [ { "id": "xxxxxx-xxxx-xxxxx-xxx", "templateId": "xxxxxx-xxxx-xxxxx-xxx", "userApiId": "xxxxxx-xxxx-xxxxx-xxx", "requestName": "Request Test", "filepathPNG": null, "filepathJPG": "https://xxxx.jpg", "filepathTHUMB": null, "filesizePNG": null, "filesizeJPG": 1017998, "filesizeTHUMB": null, "expired": null, "updated": "2021-08-05T07:54:04.000Z", "created": "2021-08-05T07:54:04.000Z" } ], "message": "Successfully fetched your generated image api detail" }

GET Generated Image Detail

Get your generated image Detail result

Headers

Authorization
* required

string

Your api key and secret key combined as Basic Authorization, more detail in authentication section

Query Parameters

generatedId
* required

string

The ID of the generated url

GET /generate/:generateId

200: OK
{ "status": true, "data": { "id": "xxxxxx-xxxx-xxxxx-xxx", "templateId": "xxxxxx-xxxx-xxxxx-xxx", "userApiKey": "xxxxxx-xxxx-xxxxx-xxx", "requestName": "Request Test", "filepathPNG": null, "filepathJPG": "https://xxxxx.jpg", "filepathTHUMB": null, "filesizePNG": null, "filesizeJPG": 985541, "filesizeTHUMB": null, "updated": "2021-08-27T20:12:49.000Z", "created": "2021-08-27T20:12:49.000Z" }, "message": "Successfully fetched your generated image api detail" }

POST Generate Video

Generate your video from a template

The POST body contains several parameters

Headers

Authorization
* required

string

Your api key and secret key combined as Basic Authorization, more detail in authentication section

Body Parameters

templateId
* required

string

The ID of the selected template

formats
* required

array

video formats, currently only mp4

fill
* required

object

This is where you fill all your elements data. In the example, you can see the "title" is the element Name, it has object of data: where for text you can fill it with string and for image you can fill with image url.

requestName

string

Name of my request, used for identifier which later can be checked in request list or generated list

POST /generate-video/

200: OK
{ "status": true, "data": { "id": "xxxxxx-xxxx-xxxxx-xxx" }, "message": "The video is being created" }

GET Generated Video List

Get your generated video list result

Headers

Authorization
* required

string

Your api key and secret key combined as Basic Authorization, more detail in authentication section

GET /generate-video/

200: OK
{ "status": true, "data": [ { "id": "xxxxxx-xxxx-xxxxx-xxx", "templateId": "xxxxxx-xxxx-xxxxx-xxx", "apiKey": "xxxxxx-xxxx-xxxxx-xxx", "requestName": null, "filepathMP4": null, "filesizeMP4": null, "filelengthMP4": null, "progress": 20, "expired": null, "type": 2, "status": null, "server_note": null, "updated": "2021-08-27T03:03:53.000Z", "created": "2021-08-27T03:03:53.000Z" }, { "id": "xxxxxx-xxxx-xxxxx-xxx", "templateId": "xxxxxx-xxxx-xxxxx-xxx", "apiKey": "xxxxxx-xxxx-xxxxx-xxx", "requestName": null, "filepathMP4": "https://....mp4", "filesizeMP4": 223616, "filelengthMP4": 120, "progress": 100, "expired": null, "type": 2, "status": null, "server_note": null, "updated": "2021-08-27T03:03:53.000Z", "created": "2021-08-27T03:03:53.000Z" } ], "message": "Successfully fetched your generated video api list" }

GET Generated Video Detail

Get your generated video detail result

Headers

Authorization
* required

string

Your api key and secret key combined as Basic Authorization, more detail in authentication section

Query Parameters

generatedId
* required

string

The ID of the generated url

GET /generate-video/:generateId

200: OK
{ "status": true, "data": [ { "id": "xxxxxx-xxxx-xxxxx-xxx", "templateId": "xxxxxx-xxxx-xxxxx-xxx", "apiKey": "xxxxxx-xxxx-xxxxx-xxx", "requestName": null, "filepathMP4": null, "filesizeMP4": null, "filelengthMP4": null, "progress": 20, "expired": null, "type": 2, "status": null, "server_note": null, "updated": "2021-08-27T03:03:53.000Z", "created": "2021-08-27T03:03:53.000Z" } ], "message": "Successfully fetched your generated video api detail" }