Skip to main content

API Overview

The Pictify API is a RESTful JSON API for generating images, GIFs, and PDFs programmatically.

Base URL

https://api.pictify.io

Authentication

All requests require a Bearer token:
curl https://api.pictify.io/image \
  -H "Authorization: Bearer pk_live_your_api_key"
See Authentication for details.

Request Format

  • Content-Type: application/json
  • Request bodies are JSON
  • Dates use ISO 8601 format
curl -X POST https://api.pictify.io/image \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<h1>Hello World</h1>",
    "width": 1200,
    "height": 630
  }'

Response Format

Successful responses return JSON with relevant data:
{
  "url": "https://cdn.pictify.io/renders/abc123.png",
  "id": "img_abc123",
  "width": 1200,
  "height": 630,
  "createdAt": "2026-01-29T10:30:00Z"
}
Error responses follow RFC 9457 Problem Details format:
{
  "type": "https://docs.pictify.io/errors/rate-limit",
  "title": "Rate Limit Exceeded",
  "status": 429,
  "detail": "You have exceeded the rate limit. Please retry after 60 seconds.",
  "instance": "/image"
}

Rate Limits

Rate limits vary by plan:
PlanRequests/MinuteRequests/Day
Free601,000
Pro30010,000
Business1,000100,000
EnterpriseCustomCustom
Rate limit headers are included in every response:
HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRequests remaining in window
X-RateLimit-ResetUnix timestamp when window resets
Retry-AfterSeconds to wait (on 429 responses)

Pagination

List endpoints return paginated results:
curl "https://api.pictify.io/templates?page=2&limit=20" \
  -H "Authorization: Bearer $API_KEY"
Response includes pagination metadata:
{
  "templates": [...],
  "pagination": {
    "page": 2,
    "limit": 20,
    "total": 45,
    "totalPages": 3,
    "hasNext": true,
    "hasPrev": true
  }
}

HTTP Status Codes

CodeDescription
200Success
201Created
202Accepted (async operation started)
400Bad Request (validation error)
401Unauthorized (invalid API key)
403Forbidden (access denied)
404Not Found
422Unprocessable Entity
429Rate Limit Exceeded
500Internal Server Error

Idempotency

POST requests can include an Idempotency-Key header for safe retries:
curl -X POST https://api.pictify.io/image \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: unique-request-id-123" \
  -H "Content-Type: application/json" \
  -d '{"html": "..."}'
The same key with the same request will return the cached response for 24 hours.

Versioning

The API does not currently use URL-based versioning. All endpoints are accessed directly from the base URL. Breaking changes will be communicated in advance via release notes.

SDK Libraries

Official SDKs handle authentication, retries, and error handling:

Endpoints

Generation

EndpointMethodDescription
/imagePOSTGenerate an image
/image/canvasPOSTImage from FabricJS canvas
/image/agent-screenshotPOSTAI-powered screenshot
/templates/{uid}/renderPOSTRender template to image
/gifPOSTGenerate a GIF
/gif/capturePOSTCapture GIF from URL
/pdf/renderPOSTGenerate a PDF
/pdf/multi-pagePOSTMulti-page PDF

Templates

EndpointMethodDescription
/templatesGETList templates
/templatesPOSTCreate template
/templates/{uid}GETGet template
/templates/{uid}PUTUpdate template
/templates/{uid}DELETEDelete template
/templates/{uid}/renderPOSTRender template
/templates/{uid}/variablesGETGet variables

Batch Operations

EndpointMethodDescription
/templates/{uid}/batch-renderPOSTStart batch job
/templates/batch/{id}/resultsGETGet batch results
/templates/batch/{id}/cancelPOSTCancel batch

Webhooks

EndpointMethodDescription
/webhook-subscriptionsGETList subscriptions
/webhook-subscriptionsPOSTCreate subscription
/webhook-subscriptions/{uid}GETGet subscription
/webhook-subscriptions/{uid}PUTUpdate subscription
/webhook-subscriptions/{uid}DELETEDelete subscription

Bindings

EndpointMethodDescription
/bindingsGETList bindings
/bindingsPOSTCreate binding
/bindings/{uid}GETGet binding
/bindings/{uid}PUTUpdate binding
/bindings/{uid}DELETEDelete binding