Images are generated from Placid templates by filling its layers
with your data.
Method | URI |
---|---|
POST | https://api.placid.app/api/rest/{template_uuid} |
Get your {template_uuid}
from the template overview in the Templates
tab of your Placid API project.
{
"webhook_success": "https://webhook.url",
"create_now": false,
"passthrough": null,
"errors": [],
"layers": {
"img": {
"image": "https://imageurl.jpg"
},
"subtitle": {
"hide": true
},
"title": {
"text": "Lorem Ipsum"
}
...
},
"modifications": {
"width": "<width>",
"height": "<height>",
"filename": "<filename>"
},
"transfer": {
"to": "s3",
"key": "<your key>",
"secret": "<your secret>",
"region": "<region name>",
"bucket": "<bucket name>",
"visibility": "public",
"path": "images/image.jpg",
"endpoint": "https://exampleendpoint.com"
}
}
Field | Values | Description |
---|---|---|
webhook_success |
Webhook URL | After the image is created Placid will POST the response to this Webhook URL |
create_now |
true or false |
Process the image instantly instead of queueing it. This might fail if your worker is too busy or if you start too many simultaneous requests (check the rate limit) |
passthrough |
string or array |
Any data added to this parameter will be saved and sent in any subsequent webhooks and requests for this image (max-length is 1024 characters) |
layers |
Dynamically change the content and properties of your image layers | |
transfer |
Additionally transfer the generated image to your storage |
The content of your image will be defined by the data in the layers
object. See layer properties for possible modifications.
To transfer the generated image to your storage use the transfer
object.
Field | Values |
---|---|
transfer.to |
s3 |
transfer.key , transfer.secret |
Your credentials (Placid never stores them) |
transfer.bucket |
Your bucket name |
transfer.visibility |
public or private |
transfer.path |
File path (Define the full image path starting from the root directory of your bucket, including filename and file extension. Placid will overwrite existing files in the specified directory!) |
To modify the generated image use the modifications
object.
Field | Values |
---|---|
modifications.width |
Image width Aspect ratio of template will always be kept to fit into your modifications |
modifications.height |
Image height Aspect ratio of template will always be kept to fit into your modifications |
modifications.filename |
Filename for the generated image |
By default all images are created async. Define a webhook_success
URL or poll the polling_url
of the response until the status of the response is finished
.
{
"id": 1,
"status": "queued",
"image_url": null,
"polling_url": null
}
Field | Values |
---|---|
id |
Unique image id for internal reference |
status |
queued The request has been put into the queue. finished The image has been created successfully. error There was an error. |
image_url |
URL to created image or null |
polling_url |
Endpoint that you can GET poll for status updates |
{info} We recommend storing created images on your servers, as we only store them for a limited time.