Generate a GIF
GIFs
GIF Generation
Create animated GIFs from HTML animations or URL captures
POST
Generate a GIF
GIF Generation
Generate animated GIFs from HTML with CSS animations or by recording live web pages.Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /gif | Create GIF from HTML with CSS animations |
GET | /gif | List GIFs |
GET | /gif/{uid} | Get GIF |
POST | /gif/capture | Capture GIF from a live URL |
Quality Presets
| Preset | Frame Rate | Max Duration | Best For |
|---|---|---|---|
low | 10 fps | 10 seconds | Small file size, simple animations |
medium | 15 fps | 15 seconds | Balanced quality and size |
high | 24 fps | 30 seconds | Smooth animations, detailed content |
The response is wrapped in a
gif object. Higher quality settings produce larger files.Key Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
width | integer | - | Output width (1-2000, required) |
height | integer | - | Output height (1-2000, required) |
quality | string | medium | Quality preset |
frameDurationSeconds | number | - | Animation duration to capture |
selector | string | - | CSS selector to capture specific element (URL capture only) |
waitForSelector | string | - | Wait for element before recording (URL capture only) |
Tips for Better GIFs
- Keep dimensions reasonable — smaller GIFs load faster and compress better
- Optimize animations — simple, smooth animations compress better than complex ones
- Use solid backgrounds — gradients and transparency increase file size
- Limit colors — GIFs are limited to 256 colors per frame
- Loop seamlessly — design animations to loop smoothly for better visual appeal
Authorizations
API key obtained from the Pictify dashboard
Body
application/json
Response
200 - application/json
GIF generated