Skip to main content
POST
/
image
Generate an image
curl --request POST \
  --url https://api.pictify.io/image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "html": "<string>",
  "url": "<string>",
  "template": "<string>",
  "variables": {},
  "width": 1200,
  "height": 630,
  "selector": "<string>",
  "fileExtension": "png"
}
'
{
  "url": "https://cdn.pictify.io/renders/abc123.png",
  "userStorageUrl": "<string>",
  "id": "img_abc123",
  "createdAt": "2023-11-07T05:31:56Z"
}

Image Generation

Generate PNG, JPEG, or WebP images from HTML content, URLs, or saved templates. You can also render FabricJS canvas data directly.
One of html, url, or template is required. See each endpoint page for full request/response details.

Endpoints

MethodEndpointDescription
POST/imageGenerate image from HTML, URL, or template
GET/imageList images
GET/image/{uid}Get image
POST/image/canvasCanvas render from FabricJS data

Input Sources

SourceParameterDescription
HTMLhtmlRender raw HTML/CSS content
URLurlScreenshot a publicly accessible URL
TemplatetemplateRender a saved template with variables
CanvasfabricJSDataRender FabricJS canvas JSON export

Output Formats

FormatExtensionBest For
PNGpngDefault, lossless, supports transparency
JPEGjpg / jpegSmaller file size, photos
WebPwebpModern format, best compression
Use the fileExtension parameter to change the output format.

Key Parameters

ParameterTypeDefaultDescription
widthinteger1200Output width in pixels (1-4000)
heightinteger630Output height in pixels (1-4000)
selectorstring-CSS selector to capture a specific element
fileExtensionstringpngOutput format
The userStorageUrl response field is only included if you have configured custom storage in your account settings.

Authorizations

Authorization
string
header
required

API key obtained from the Pictify dashboard

Body

application/json
html
string

HTML content to render

url
string<uri>

URL to screenshot (mutually exclusive with html)

template
string

Template UID to render

variables
object

Variables to populate in the template

width
integer
default:1200

Output width in pixels

Required range: 1 <= x <= 4000
height
integer
default:630

Output height in pixels

Required range: 1 <= x <= 4000
selector
string

CSS selector to capture specific element

fileExtension
enum<string>
default:png

Output image format

Available options:
png,
jpg,
jpeg,
webp

Response

Image generated successfully

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