Skip to main content
POST
/
image
/
canvas
Generate image from FabricJS canvas
curl --request POST \
  --url https://api.pictify.io/image/canvas \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fabricJSData": {},
  "variables": {},
  "variableDefinitions": [
    {
      "name": "<string>",
      "type": "text",
      "defaultValue": "<string>",
      "description": "<string>",
      "validation": {
        "required": true,
        "minLength": 123,
        "maxLength": 123
      }
    }
  ],
  "width": 123,
  "height": 123,
  "fileExtension": "png"
}
'
{
  "url": "https://cdn.pictify.io/renders/abc123.png",
  "userStorageUrl": "<string>",
  "id": "img_abc123",
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key obtained from the Pictify dashboard

Body

application/json
fabricJSData
object
required

FabricJS canvas JSON

variables
object
variableDefinitions
object[]
width
integer
height
integer
fileExtension
enum<string>
Available options:
png,
jpg,
jpeg,
webp

Response

200 - application/json

Canvas image generated

url
string<uri>

URL of the generated image

Example:

"https://cdn.pictify.io/renders/abc123.png"

userStorageUrl
string<uri>

URL in user's configured storage (if configured)

id
string

Unique image identifier

Example:

"img_abc123"

createdAt
string<date-time>

Timestamp when image was created