Skip to main content

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

info

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 when you have created an API key. Each element of your design will show a layer id which can be modified. Click on an element and the text field is bottom left.

caution

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.

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",
"background": "#FFA500",
"color": "#0000FF",
}
]
}

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
}
]
}