Create Image
POST
https://picnie.com/api/v1/create-imageGenerate a single image by customizing a template JSON object. Change image/text values to generate images at any scale.
Headers
| Name | Type | Description |
|---|---|---|
Authorization* | string | Pass api key in the authorization field Example: |
Body Parameters
| Name | Type | Description |
|---|---|---|
project_id* | string | The ID of the project. Create one using Picnie's dashboard if needed. Example: |
template_id* | integer | The ID of the template. Example: |
template_name* | string | Name of the template. Example: |
type* | string | Must be 'image'. Example: |
output_image_quality | string | Quality of output image. Values: Maximum, High, Medium, Low. Default: Medium. Example: |
output_image_format | string | Format of output image. Values: jpg, png, gif, webp. Default: jpg. Example: |
details* | array | JSON array of objects specifying image and text elements. Example: |
Notes
⚠️ Authentication required
curl -X POST "https://picnie.com/api/v1/create-image"
-H "Authorization: YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{
"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://picnie.com/data/api_raw_assets/image_bg_0_20240108213254.png"
},
{
"name": "Title_0",
"text": "@reallygreatsite"
},
{
"name": "Title_1",
"text": "One step at a time, Youll get there"
}
]
}'Responses
200200 OK
{
"error": false,
"message": "Success",
"url": "https://picnie.s3.ap-south-1.amazonaws.com/user_3/project_1/new_7813_230921112106.png"
}