{
	"info": {
		"_postman_id": "mayapix-api-v1",
		"name": "MayaPix API v1",
		"description": "MayaPix Image Processing API\n\n## Quick Start\n1. Set the `base_url` variable (default: https://mayapix.io)\n2. Set your `api_key` in the collection variables\n3. Start testing!\n\n---\n\n## \u2b50 MayaAI (Recommended - start here)\nOne call does everything: tight-crop \u2192 scale \u2192 pad \u2192 smart-compress.\n\nCore params (4 only):\n- `remove_bg` (bool, default TRUE) - BG removal on by default. Free plan: silently skipped. Set false to disable\n- `size` (int, optional) - square canvas e.g. 1000 \u2192 1000\u00d71000. Omit for natural size\n- `background` (string, default ffffff) - canvas fill color or \"transparent\" for alpha PNG output\n- `format` (string, default webp) - output format\n\nCommon scenarios:\n  {\"type\": \"mayaai\"}                                    \u2192 BG removed, natural size, WebP\n  {\"type\": \"mayaai\", \"size\": 1000}                      \u2192 1000\u00d71000 catalog\n  {\"type\": \"mayaai\", \"background\": \"transparent\"}       \u2192 transparent PNG cut-out\n  {\"type\": \"mayaai\", \"remove_bg\": false}                 \u2192 skip BG removal (already clean)\n\nAdvanced params: upscale, padding, model, width+height (non-square), tolerance, face_center, target_size_kb, quality_floor, watermark\n\n---\n\n## Advanced Operations\n\n### Compress\n- `quality` (default 85), `format` (default = keep original), `preset`\n- \u26a0\ufe0f Preset notes: social=cover-crops to 1200\u00d7630, ecommerce=scales down to 1200px, thumbnail=300px\n\n### Resize\n- `fit` modes: contain (default, no crop), cover (crops), fill, max, stretch\n- `upscale` default = false (small images stay small)\n\n### Crop\n- Standard: width, height, position, x, y, aspect_ratio\n- Smart Pad: mode=\"smart_pad\", padding (default 10%), background (auto-detect), tolerance\n\n### Remove Background\n- Default model: isnet-general-use\n- Fashion: u2net_cloth_seg | Portraits: u2net_human_seg | Max quality: birefnet-general",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"variable": [
		{
			"key": "base_url",
			"value": "https://mayapix.io",
			"type": "string"
		},
		{
			"key": "api_key",
			"value": "mpx_YOUR_API_KEY.YOUR_SECRET",
			"type": "string"
		},
		{
			"key": "salla_token",
			"value": "v4.public.XXXXXX",
			"type": "string"
		}
	],
	"auth": {
		"type": "apikey",
		"apikey": [
			{
				"key": "value",
				"value": "{{api_key}}",
				"type": "string"
			},
			{
				"key": "key",
				"value": "X-API-Key",
				"type": "string"
			},
			{
				"key": "in",
				"value": "header",
				"type": "string"
			}
		]
	},
	"item": [
		{
			"name": "Health & Status",
			"item": [
				{
					"name": "Health Check",
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/health",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"health"
							]
						},
						"description": "Check API status. No authentication required."
					}
				},
				{
					"name": "Get Usage Stats",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/usage",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"usage"
							]
						},
						"description": "Get current month usage statistics and plan info."
					}
				},
				{
					"name": "Get Usage History",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/usage/history?months=6",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"usage",
								"history"
							],
							"query": [
								{
									"key": "months",
									"value": "6"
								}
							]
						},
						"description": "Get usage history for the past N months."
					}
				}
			]
		},
		{
			"name": "Image Processing",
			"item": [
				{
					"name": "Process Image (URL)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800\",\n    \"operations\": [\n        {\"type\": \"resize\", \"width\": 1200, \"height\": 1200, \"fit\": \"contain\"},\n        {\"type\": \"compress\", \"quality\": 85, \"format\": \"webp\"}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Process an image from URL with resize and compression."
					}
				},
				{
					"name": "Process Image (Base64)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD...\",\n    \"operations\": [\n        {\"type\": \"mayaai\", \"size\": 1000}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Process an image sent as a base64-encoded string. Accepts raw base64 or a data URI (data:image/png;base64,...). Max 20 MB after decoding."
					}
				},
				{
					"name": "\u2b50 MayaAI - Clean Whitespace (natural size)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=1200\",\n    \"operations\": [\n        {\"type\": \"mayaai\"}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Default MayaAI call. BG removal is ON by default (silently skipped on free plan). Tight-crops subject, keeps natural size + 5% breathing room, WebP output."
					}
				},
				{
					"name": "\u2b50 MayaAI - Full E-commerce (BG removal + 1000\u00d71000)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=1200\",\n    \"operations\": [\n        {\n            \"type\": \"mayaai\",\n            \"size\": 1000,\n            \"background\": \"ffffff\"\n        }\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Full e-commerce pipeline in one call: removes background, tight-crops to subject, scales to fill 1000\u00d71000 white canvas (5% breathing room), outputs WebP. Replaces 4 separate operations. Starter plan+."
					}
				},
				{
					"name": "\u2b50 MayaAI - Transparent Cut-out PNG",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=1200\",\n    \"operations\": [\n        {\n            \"type\": \"mayaai\",\n            \"background\": \"transparent\"\n        }\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "MayaAI with transparent background: removes BG, tight-crops subject, adds 5% breathing room on transparent canvas, outputs PNG with alpha channel. Add size:1000 to normalize dimensions."
					}
				},
				{
					"name": "MayaAI - Smart Auto-Detect",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=1200\",\n    \"operations\": [\n        {\"type\": \"mayaai\", \"smart\": true}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "MayaAI smart mode: analyzes the image and auto-selects the best background model, padding, background color, and compression settings. Add explicit parameters to override any smart default."
					}
				},
				{
					"name": "MayaAI Compression Only (no resize)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800\",\n    \"operations\": [\n        {\"type\": \"compress\", \"preset\": \"mayaai\"}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "MayaAI as compress preset only: content-aware quality selection + always WebP, no dimension change. Use when you only want smart compression without resize. Samples luminance grid to pick q65-85 dynamically."
					}
				},
				{
					"name": "MayaAI - Skip Already Compressed",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800\",\n    \"operations\": [\n        {\"type\": \"mayaai\", \"skip_compressed_threshold\": 0.3}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Skip images already compressed below 0.3 bytes-per-pixel. Returns original image unchanged to avoid quality degradation."
					}
				},
				{
					"name": "Process with Preset",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800\",\n    \"operations\": [\n        {\"type\": \"compress\", \"preset\": \"ecommerce\"}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Process using a preset (mayaai, ecommerce, thumbnail, highquality, social, mobile, catalog). Use mayaai for AI-powered content-aware compression."
					}
				},
				{
					"name": "Resize Keep Aspect Ratio",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800\",\n    \"operations\": [\n        {\"type\": \"resize\", \"width\": 800, \"height\": 600, \"keep_aspect_ratio\": true},\n        {\"type\": \"compress\", \"preset\": \"ecommerce\"}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Resize while preserving the original aspect ratio (fits within bounds)."
					}
				},
				{
					"name": "Remove Background (Default)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800\",\n    \"operations\": [\n        {\"type\": \"remove_background\"},\n        {\"type\": \"compress\", \"preset\": \"ecommerce\"}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Remove background using the default isnet-general-use model (best balance of quality and speed). Requires Starter plan or higher. GIF not supported."
					}
				},
				{
					"name": "Remove Background (Max Quality)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800\",\n    \"operations\": [\n        {\"type\": \"remove_background\", \"model\": \"birefnet-general\"},\n        {\"type\": \"compress\", \"preset\": \"ecommerce\"}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Remove background using birefnet-general (SOTA model, best for hair/fur/glass/fine details). Slower than default but highest quality. Available models: u2net, u2netp, u2net_human_seg, u2net_cloth_seg, silueta, isnet-general-use, isnet-anime, birefnet-general"
					}
				},
				{
					"name": "Full E-commerce Pipeline",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800\",\n    \"operations\": [\n        {\"type\": \"remove_background\"},\n        {\"type\": \"resize\", \"width\": 1200, \"height\": 1200, \"fit\": \"contain\", \"background\": \"ffffff\"},\n        {\"type\": \"compress\", \"preset\": \"ecommerce\"}\n    ],\n    \"webhook_url\": \"https://your-site.com/webhook\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Complete e-commerce pipeline: remove background, resize with white background, compress with ecommerce preset."
					}
				},
				{
					"name": "Crop Image",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800\",\n    \"operations\": [\n        {\"type\": \"crop\", \"aspect_ratio\": \"1:1\", \"position\": \"center\"},\n        {\"type\": \"compress\", \"preset\": \"thumbnail\"}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Crop image to 1:1 aspect ratio from center."
					}
				},
				{
					"name": "Smart Pad (Auto-Center Product)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800\",\n    \"operations\": [\n        {\n            \"type\": \"crop\",\n            \"mode\": \"smart_pad\",\n            \"padding\": 10,\n            \"background\": \"ffffff\",\n            \"tolerance\": 20,\n            \"width\": 800,\n            \"height\": 800\n        },\n        {\"type\": \"compress\", \"preset\": \"ecommerce\"}\n    ]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/process",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"process"
							]
						},
						"description": "Auto-detect product bounding box, trim background, and re-pad with 10% margin on all sides. Centers the product perfectly on an 800x800 canvas. Ideal for uniform product grids.\n\nParameters:\n- padding: % margin on each side (0-50, default 10)\n- background: hex color auto-detected from corners if omitted\n- tolerance: color distance for background detection (raise for off-white backgrounds)\n- width/height: optional output resize after padding"
					}
				},
				{
					"name": "Batch Process",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"images\": [\n        {\n            \"image_url\": \"https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800\",\n            \"operations\": [{\"type\": \"compress\", \"preset\": \"thumbnail\"}]\n        },\n        {\n            \"image_url\": \"https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=800\",\n            \"operations\": [{\"type\": \"compress\", \"preset\": \"thumbnail\"}]\n        }\n    ],\n    \"webhook_url\": \"https://your-site.com/batch-webhook\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/images/batch",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"images",
								"batch"
							]
						},
						"description": "Process multiple images in a single request (max 20)."
					}
				}
			]
		},
		{
			"name": "Jobs",
			"item": [
				{
					"name": "List Jobs",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/jobs?status=completed&per_page=20",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"jobs"
							],
							"query": [
								{
									"key": "status",
									"value": "completed",
									"description": "Filter by status: pending, processing, completed, failed, cancelled"
								},
								{
									"key": "per_page",
									"value": "20"
								}
							]
						},
						"description": "List all processing jobs with optional status filter."
					}
				},
				{
					"name": "Get Job Status",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/jobs/:job_id",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"jobs",
								":job_id"
							],
							"variable": [
								{
									"key": "job_id",
									"value": "YOUR_JOB_UUID"
								}
							]
						},
						"description": "Get detailed status of a specific job."
					}
				},
				{
					"name": "Download Processed Image",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/jobs/:job_id/download",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"jobs",
								":job_id",
								"download"
							],
							"variable": [
								{
									"key": "job_id",
									"value": "YOUR_JOB_UUID"
								}
							]
						},
						"description": "Download the processed image file."
					}
				},
				{
					"name": "Cancel Job",
					"request": {
						"method": "DELETE",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/jobs/:job_id",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"jobs",
								":job_id"
							],
							"variable": [
								{
									"key": "job_id",
									"value": "YOUR_JOB_UUID"
								}
							]
						},
						"description": "Cancel a pending job."
					}
				}
			]
		},
		{
			"name": "API Keys",
			"item": [
				{
					"name": "List API Keys",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/api-keys",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"api-keys"
							]
						},
						"description": "List all API keys for your account."
					}
				},
				{
					"name": "Create API Key",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Production Key\",\n    \"description\": \"Main production API key\",\n    \"allowed_origins\": [\"https://mystore.com\"],\n    \"allowed_ips\": []\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/api-keys",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"api-keys"
							]
						},
						"description": "Create a new API key. Save the returned secret - it won't be shown again!"
					}
				},
				{
					"name": "Update API Key",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Updated Key Name\",\n    \"is_active\": true\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/api-keys/:key_id",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"api-keys",
								":key_id"
							],
							"variable": [
								{
									"key": "key_id",
									"value": "1"
								}
							]
						},
						"description": "Update an existing API key."
					}
				},
				{
					"name": "Delete API Key",
					"request": {
						"method": "DELETE",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/api-keys/:key_id",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"api-keys",
								":key_id"
							],
							"variable": [
								{
									"key": "key_id",
									"value": "1"
								}
							]
						},
						"description": "Delete an API key. Cannot delete the key currently in use."
					}
				}
			]
		},
		{
			"name": "Webhooks",
			"item": [
				{
					"name": "List Webhooks",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/webhooks",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"webhooks"
							]
						},
						"description": "List all registered webhooks."
					}
				},
				{
					"name": "Create Webhook",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Job Notifications\",\n    \"url\": \"https://your-site.com/webhook\",\n    \"events\": [\"job.completed\", \"job.failed\"]\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/webhooks",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"webhooks"
							]
						},
						"description": "Register a new webhook endpoint."
					}
				},
				{
					"name": "Test Webhook",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/webhooks/:webhook_id/test",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"webhooks",
								":webhook_id",
								"test"
							],
							"variable": [
								{
									"key": "webhook_id",
									"value": "1"
								}
							]
						},
						"description": "Send a test webhook to verify your endpoint."
					}
				},
				{
					"name": "Regenerate Webhook Secret",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/webhooks/:webhook_id/regenerate-secret",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"webhooks",
								":webhook_id",
								"regenerate-secret"
							],
							"variable": [
								{
									"key": "webhook_id",
									"value": "1"
								}
							]
						},
						"description": "Rotate the HMAC signing secret for a webhook. Do this if your secret is compromised. Old secret is immediately invalidated."
					}
				},
				{
					"name": "Delete Webhook",
					"request": {
						"method": "DELETE",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/webhooks/:webhook_id",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"webhooks",
								":webhook_id"
							],
							"variable": [
								{
									"key": "webhook_id",
									"value": "1"
								}
							]
						},
						"description": "Delete a webhook."
					}
				}
			]
		},
		{
			"name": "Integrations",
			"item": [
				{
					"name": "List Integrations",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/integrations",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"integrations"
							]
						},
						"description": "List all connected platform integrations (Salla, Shopify)."
					}
				},
				{
					"name": "Connect Salla",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/integrations/salla/auth",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"integrations",
								"salla",
								"auth"
							]
						},
						"description": "Get Salla OAuth authorization URL."
					}
				},
				{
					"name": "Get Salla Settings",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{salla_token}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/integrations/salla/settings",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"integrations",
								"salla",
								"settings"
							]
						},
						"description": "Get Salla embedded app settings, store info, subscription status, and the linked MayaPix plan/usage (remaining monthly images). Requires a Salla bearer token."
					}
				},
				{
					"name": "Save Salla Settings",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{salla_token}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"settings\": {\n    \"auto_process\": true,\n    \"bg_removal\": true,\n    \"bg_model\": \"isnet-general-use\",\n    \"canvas_size\": \"1:1\",\n    \"canvas_width\": null,\n    \"canvas_height\": null,\n    \"output_format\": \"webp\",\n    \"compression_quality\": 85,\n    \"padding_color\": \"#FFFFFF\",\n    \"padding\": 5,\n    \"smart_quality\": true,\n    \"target_size_kb\": 300,\n    \"quality_floor\": 70,\n    \"skip_compressed_threshold\": 0,\n    \"face_center\": false,\n    \"watermark\": false,\n    \"watermark_text\": \"\",\n    \"keep_original\": false\n  }\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/integrations/salla/settings",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"integrations",
								"salla",
								"settings"
							]
						},
						"description": "Save Salla embedded app settings. Requires a Salla bearer token."
					}
				},
				{
					"name": "Recommend Salla Settings with AI",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{salla_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "images[]",
									"type": "file",
									"src": ""
								},
								{
									"key": "images[]",
									"type": "file",
									"src": ""
								}
							]
						},
						"url": {
							"raw": "{{base_url}}/api/v1/integrations/salla/recommend-settings",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"integrations",
								"salla",
								"recommend-settings"
							]
						},
						"description": "Upload sample product images and get AI-recommended Salla settings."
					}
				},
				{
					"name": "Salla Subscription Started Webhook",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "X-Salla-Signature",
								"value": "{{salla_webhook_signature}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"event\": \"app.subscription.started\",\n  \"merchant\": \"123456\",\n  \"data\": {\n    \"item_type\": \"plan\",\n    \"plan_name\": \"Starter\",\n    \"plan_type\": \"recurring\",\n    \"start_date\": \"2026-06-21T00:00:00.000000Z\",\n    \"end_date\": \"2026-07-21T00:00:00.000000Z\",\n    \"subscription_id\": \"123\"\n  }\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/webhooks/salla",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"webhooks",
								"salla"
							]
						},
						"description": "Salla subscription event webhook. Maps the Salla plan_name to a MayaPix plan slug and updates the linked user's plan."
					}
				},
				{
					"name": "Upload Salla Brand Logo",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{salla_token}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "logo",
									"type": "file",
									"src": ""
								}
							]
						},
						"url": {
							"raw": "{{base_url}}/api/v1/integrations/salla/logo",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"integrations",
								"salla",
								"logo"
							]
						},
						"description": "Upload a brand logo for Salla watermark. PNG/JPEG/WebP, max 2MB."
					}
				},
				{
					"name": "Connect Shopify",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/integrations/shopify/auth?shop=your-store.myshopify.com",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"integrations",
								"shopify",
								"auth"
							],
							"query": [
								{
									"key": "shop",
									"value": "your-store.myshopify.com"
								}
							]
						},
						"description": "Get Shopify OAuth authorization URL."
					}
				},
				{
					"name": "Disconnect Integration",
					"request": {
						"method": "DELETE",
						"header": [],
						"url": {
							"raw": "{{base_url}}/api/v1/integrations/:integration_id",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"integrations",
								":integration_id"
							],
							"variable": [
								{
									"key": "integration_id",
									"value": "1"
								}
							]
						},
						"description": "Disconnect a platform integration."
					}
				}
			]
		}
	]
}