API Reference
Overview
The PixPerfectAI API provides a simple interface for enhancing product images using advanced AI models. This reference documentation covers all available endpoints, parameters, and response formats.
Authentication
All API requests require authentication using your API key. Include your API key in the Authorization header as a Bearer token:
Authorization: Bearer YOUR_API_KEY
You can find your API key in the API Keys section of your dashboard.
Endpoints
Generate Enhanced Image
Enhances a product image using AI-powered image generation.
POST /v1/generate
Accepts a prompt and an optional image to enhance.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
prompt | string | Yes | Description of how to enhance the image |
image | file | No | PNG image file to enhance (max 5MB) |
format | string | No | Output format: "png" or "jpeg" (default: "png") |
Response Format
A successful response will return a JSON object with the following properties:
{ "success": true, "imageUrl": "https://api.pixperfectai.com/generated/image-123456.png" }
Error Responses
In case of an error, the API will return a JSON object with an error message:
{ "error": "Error message describing what went wrong" }
Code Examples
curl -X POST https://api.pixperfectai.com/v1/generate \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "prompt=Enhance this product with professional lighting" \ -F "image=@product.png"
Rate Limits
API requests are subject to rate limiting based on your subscription plan:
Plan | Rate Limit |
---|---|
Free | 5 requests per minute |
Basic | 10 requests per minute |
Premium | 30 requests per minute |
Enterprise | Custom |
Support
If you have any questions or need assistance, please contact our support team at support@pixperfectai.com.