The Picnie REST API provides programmatic access to automate the generation and processing of visual media assets using templates and structured data. It is designed for integration into platforms, marketing pipelines, e-commerce systems and internal tools where scalable visual production is needed. Use cases range from generating marketing banners and product visuals to automating certificates, reports, invoices and personalized videos.
Core Capabilities
The API supports a wide range of media operations:
Operation Category | Description |
|---|---|
Template-Based Generation | Use a stored template (image, video or PDF) with variable fields to generate a final file. |
Graphic Utilities | Perform image operations such as resizing, compression, watermarking, framing, background removal and OCR. |
Project Management | Create and manage project workspaces to organize workflows by client, campaign or product line. |
Bulk and Automation Support | Use data arrays, spreadsheets or API loops to generate large volumes of assets in one go. |
Webhook & Real-Time Notifications | Receive callbacks when generation tasks finish, enabling downstream workflows such as publishing, storage or distribution. |
Authentication & Request Format
All endpoints require an API key passed in the Authorization header as a Bearer token. Requests and responses use JSON format.
Example header: Authorization: Bearer YOUR_API_KEY
Requests must specify input parameters such as template_id, data (variable fields), and format (png, jpg, webp, pdf, mp4).
Example request:
POST /generate
{
"template_id": "abc123",
"data": {
"title": "New Product Launch",
"price": "$39.99",
"image_url": "https://cdn.example.com/product.jpg"
},
"format": "png"
}
Endpoint Highlights
Key API endpoints include:
- Create Project: Establish a workspace or campaign folder for media operations.
- Get My Projects: Retrieve a list of existing projects and their metadata.
- Get Template: Fetch template details (fields, format, asset references) for reuse.
- Create Image / Create PDF / Create Video: Submit a payload to generate one or multiple outputs.
- Compress Image / Resize Image: Optimize images for web or mobile distribution.
- Add Watermark: Overlay text or image watermark on existing media.
- Remove Background: AI-powered background removal for cleaner product visuals.
- OCR (Transcribe Image): Extract text from images such as invoices, IDs or receipts.
These endpoints facilitate broad use cases across marketing, e-commerce, SaaS, operations and creative tools.
Best Practices for Developers
- Use descriptive variable names and keep data clean to avoid layout issues.
- Ensure image URLs are publicly accessible or stored in the workspace File Manager.
- For bulk tasks, use asynchronous processing or queueing to avoid timeouts.
- Cache
template_idand metadata to reduce repeated API calls.- Monitor credits and usage, especially for large scale workflows or high-volume asset generation.
- Use webhooks to trigger downstream processes like publishing or storage after generation.
Sample Use Cases
- E-commerce store: Automatically generate product image cards when new SKUs are added.
- SaaS platform: Issue personalized PDF certificates and badges when users complete training.
- Agency workflow: Generate hundreds of ad variations for multiple clients from a spreadsheet.
- Operations team: Auto-create invoices or labels with embedded branding and variable data.
Frequently Asked Questions
Does each API call consume credits?
Yes. Credits are deducted based on the output type and size when generation or processing operations are executed.
Can I change a template through the API?
Templates must be edited via the Picnie editor. The API is used for consumption rather than creation of templates.
Does Picnie support image utilities such as background removal and OCR?
Yes. The API supports utilities like background removal, watermarking, resizing, compression and OCR for advanced image workflows.
Summary
The Picnie REST API equips developers and technical teams with the power to generate and process visual media programmatically using templates, automation, and data-driven workflows. Whether you are building a SaaS platform, managing high-volume e-commerce product visuals, or running agency campaigns at scale, the Picnie API provides the tools to automate creative production, maintain consistency, and save time.