Images
Once you have completed the getting started steps, you can then create new images at runtime based on those designs by sending POST requests.
OKZest offers text on designs along with images, screenshots, and logos.
You can modify text in multiple ways along with the different types of images.
OKZest will return a new JPG based on your request to the initial design.
Creating an image
Please see Create Image.
Examples
The JSON you provide will modify the content of your existing design. It does not permanently change the design. You can include multiple layer types at once.
design_id is found on the share page of your design or from calling Get Designs.
layer_id is found on the design page. Each element of your design has an id which can be modified on the design page. Click on an element and the id is shown on the side panel.
Static image types cannot be modified, create them as a dynamic image instead and set a default image in the UI.
background is a reserved layer id for the background color and background image.
Minimal example
If you want to change the text of a single layer
{
"design_id": "ID HERE",
"layers": [
{
"layer_id": "ID HERE",
"text": "Hello from the API"
}
]
}
Change multiple text layers
{
"design_id": "ID HERE",
"layers": [
{
"layer_id": "ID HERE",
"text": "Hello from the API"
},
{
"layer_id": "ANOTHER ID HERE",
"color": "#0000FF",
}
],
"background" {
"color": "#FFA500"
}
}
Dynamic image
{
"design_id": "ID HERE",
"layers": [
{
"layer_id": "ID HERE",
"image_url": "URL HERE" // http://example.com/hello.jpg
}
]
}
Screenshot image
{
"design_id": "ID HERE",
"layers": [
{
"layer_id": "ID HERE",
"image_url": "URL HERE", // http://example.com
"is_screenshot": true
}
]
}
Logo image
{
"design_id": "ID HERE",
"layers": [
{
"layer_id": "ID HERE",
"image_url": "URL HERE", // http://example.com
"is_logo": true
}
]
}