Skip to main content
POST
/
gif
Generate a GIF
curl --request POST \
  --url https://api.pictify.io/gif \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "html": "<string>",
  "url": "<string>",
  "template": "<string>",
  "variables": {},
  "width": 800,
  "height": 600
}
'
{
  "gif": {
    "url": "<string>",
    "uid": "<string>",
    "width": 123,
    "height": 123,
    "animationLength": 123
  }
}

GIF Generation

Generate animated GIFs from HTML with CSS animations or by recording live web pages.

Endpoints

MethodEndpointDescription
POST/gifCreate GIF from HTML with CSS animations
GET/gifList GIFs
GET/gif/{uid}Get GIF
POST/gif/captureCapture GIF from a live URL

Quality Presets

PresetFrame RateMax DurationBest For
low10 fps10 secondsSmall file size, simple animations
medium15 fps15 secondsBalanced quality and size
high24 fps30 secondsSmooth animations, detailed content
The response is wrapped in a gif object. Higher quality settings produce larger files.

Key Parameters

ParameterTypeDefaultDescription
widthinteger-Output width (1-2000, required)
heightinteger-Output height (1-2000, required)
qualitystringmediumQuality preset
frameDurationSecondsnumber-Animation duration to capture
selectorstring-CSS selector to capture specific element (URL capture only)
waitForSelectorstring-Wait for element before recording (URL capture only)

Tips for Better GIFs

  1. Keep dimensions reasonable — smaller GIFs load faster and compress better
  2. Optimize animations — simple, smooth animations compress better than complex ones
  3. Use solid backgrounds — gradients and transparency increase file size
  4. Limit colors — GIFs are limited to 256 colors per frame
  5. Loop seamlessly — design animations to loop smoothly for better visual appeal

Authorizations

Authorization
string
header
required

API key obtained from the Pictify dashboard

Body

application/json
html
string

HTML content with CSS animations

url
string<uri>

URL to capture

template
string

Template UID

variables
object
width
integer
default:800
Required range: 1 <= x <= 2000
height
integer
default:600
Required range: 1 <= x <= 2000

Response

200 - application/json

GIF generated

gif
object