Skip to main content

Rendering

In Copicake, if you are using our API to generate an image, our server will start to use your template and your changes to render it. The rendering process will be done in background, and you will get a rendering id back. You can use this id to get the final image.

Here are the fields in the response:

Response

FieldSample ValuesExplanations
typeimageThe type of this rendering, currently only image is available
statussuccess | failed | processingEach rendering is with 3 different state and the default one is processing
changes[ ... ]Changes you passed in the request
options{ ... }Options you passed in the request
template_idjfwrFJdR3z1eF8BcEhSnAFyhxgOqYour template id
permanent_url""At first, this field is an empty string, and if the rendering is successfully processed, it will be replaced with the final image url that you can access directly.
created_bytMIe7GOBu9NW017nZIzlJjfnupjWYour user id
idki9ImK39lPRwb1oOpKbROkNWumFzYour rendering id
created_at2022-03-25T07:34:48.309ZThe UTC time when you created the rendering

Sample

{
"error": null,
"data": {
"type": "image",
"status": "processing",
"changes": [
{
"name": "text-9so09m",
"text": "hello world"
},
{
"name": "image-yeavh7",
"src": "https://your_website.com/test.png"
}
],
"options": {
"webhook_url": "https://your_website.com/webhook_url"
},
"template_id": "jfwrFJdR3z1eF8BcEhSnAFyhxgOq",
"permanent_url": "",
"created_by": "tMIe7GOBu9NW017nZIzlJjfnupjW",
"id": "ki9ImK39lPRwb1oOpKbROkNWumFz",
"created_at": "2022-03-25T07:34:48.309Z"
}
}