π‘ Welcome to the Picnie API documentation! Here, you'll find everything you need to integrate, automate, and extend the capabilities of the Picnie platform. Whether you're a developer or a tech enthusiast, this guide will help you get started step by step.
Letβs unlock limitless potential together!
All API calls are sent in JSON format, and the responses are returned in JSON as well.
To begin, visit Picnie to create your API key. All API endpoints require this key for authentication.
POST Authorization header. https://picnie.com/api/v1/create-projectDescription:
This endpoint allows you to create a project on Picnie. Projects help in managing assets effectively.
Request:
{
"name": "Project with API"
}
Parameters:
name (Required): Name of the project.Response Example:
{
"error": false,
"message": "Success",
"data": {
"id": "32",
"name": "Project with API"
}
}
POST Authorization header. https://picnie.com/api/v1/get-my-projectsDescription:
Retrieve a list of all your Picnie projects.
Response Example:
{
"error": false,
"message": "Success",
"data": [
{
"id": "21",
"name": "Test Project"
},
{
"id": "32",
"name": "Project with API"
}
]
}
POST Authorization header. https://picnie.com/api/v1/get-templateDescription:
Fetch the contents of a template by providing the template_id.
Request:
{
"template_id": "2075"
}
Response Example:
{
"error": false,
"message": "Success",
"complete_object": {
"name": "Simple Template",
"type": "Image",
"details": [
{
"name": "background_image",
"image_url": "https://example.com/image.png"
}
]
}
}
POST Authorization header. https://picnie.com/api/v1/create-imageDescription:
Generate a single image by customizing template JSON objects.
Request:
{
"project_id": "1",
"template_id": 2020,
"template_name": "Daily Motivation",
"type": "image",
"output_image_quality": "High",
"output_image_format": "png",
"details": [
{
"name": "background_image",
"image_url": "https://example.com/image.png"
},
{
"name": "Title_0",
"text": "One step at a time"
}
]
}
Response Example:
{
"error": false,
"message": "Success",
"url": "https://example.com/generated_image.png"
}
POST Authorization header. https://picnie.com/api/v1/add-watermark-imageDescription:
Add a watermark to an image.
Request:
{
"project_id": 1,
"background_image_url": "https://example.com/background.jpg",
"front_image_url": "https://example.com/logo.png",
"position": "br",
"image_max_width": "800",
"image_max_height": "800"
}
Response Example:
{
"error": false,
"message": "Success",
"url": "https://example.com/watermarked_image.jpg"
}
POST Authorization header. https://picnie.com/api/v1/resize-imageDescription:
Resize an image by providing height, width, or percentage.
Request:
{
"project_id": 1,
"image_url": "https://example.com/image.jpg",
"resize_type": "1",
"height": "500",
"width": "800",
"resize_percentage": "50",
"no_enlarge_on_smaller": "1"
}
Response Example:
{
"error": false,
"message": "Success",
"url": "https://example.com/resized_image.jpg"
}
POST Authorization header. https://picnie.com/api/v1/compress-imageDescription:
Compress images without quality loss.
Request:
{
"project_id": 1,
"image_url": "https://example.com/image.jpg",
"image_quality": "65",
"image_output_format": "original"
}
Response Example:
{
"error": false,
"message": "Success",
"url": "https://example.com/compressed_image.jpg"
}
POST Authorization header. https://picnie.com/api/v1/crop-imageDescription:
Crop an image to specific dimensions.
Request:
{
"project_id": 8,
"image_url": "https://example.com/image.jpg",
"height": "720",
"width": "1080"
}
Response Example:
{
"error": false,
"message": "Success",
"url": "https://example.com/cropped_image.jpg"
}
POST Authorization header. https://picnie.com/api/v1/filter-on-imageDescription:
Apply filters like grayscale, emboss, and more to an image.
Supported Filters:
IMG_FILTER_NEGATEIMG_FILTER_GRAYSCALEIMG_FILTER_EDGEDETECTIMG_FILTER_EMBOSSIMG_FILTER_GAUSSIAN_BLURIMG_FILTER_SELECTIVE_BLURIMG_FILTER_MEAN_REMOVALRequest:
{
"project_id": 8,
"image_url": "https://example.com/image.jpg",
"filter": "IMG_FILTER_GRAYSCALE"
}
Response Example:
{
"error": false,
"message": "Success",
"url": "https://example.com/filtered_image.jpg"
}
POST Authorization header. https://picnie.com/api/v1/convert-imageDescription:
Convert an image from one format to another, such as PNG to JPG.
Request:
{
"project_id": 8,
"image_url": "https://example.com/image.jpg",
"output_format": "webp"
}
Response Example:
{
"error": false,
"message": "Success",
"url": "https://example.com/converted_image.webp"
}
POST Authorization header. https://picnie.com/api/v1/create-pdfDescription:
Generate a PDF document from a template.
Request:
{
"project_id": "25",
"template_id": 2020,
"template_name": "Daily Motivation",
"type": "pdf",
"details": [
{
"name": "background_image",
"image_url": "https://example.com/image.png"
},
{
"name": "Title_0",
"text": "@reallygreatsite"
},
{
"name": "Title_1",
"text": "One step at a time, you'll get there"
}
]
}
Response Example:
{
"error": false,
"message": "Success",
"url": "https://example.com/generated_pdf.pdf"
}
These endpoints empower developers to enhance their workflows with Picnie's rich API functionalities. For more, visit the Picnie Dashboard.
2 years ago