Developer Documentation

Quick Start

Get up and running with PixelPanda API in under 5 minutes

1

Get Your API Key

Sign up for a free account and get your API key from the dashboard

2

Make Your First Request

Use our simple REST API to process your first image with authentication headers

3

Go to Production

Scale with confidence using our reliable infrastructure and monitoring tools

Your First API Call

curl -X POST https://pixelpanda.ai/api/process \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@/path/to/image.jpg" \
  -F "processing_type=background_removal"
import requests

response = requests.post(
    "https://pixelpanda.ai/api/process",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    files={"image": open("image.jpg", "rb")},
    data={"processing_type": "background_removal"}
)

print(response.json())
const formData = new FormData();
formData.append('image', imageFile);
formData.append('processing_type', 'background_removal');

const response = await fetch('https://pixelpanda.ai/api/process', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
    },
    body: formData
});

const result = await response.json();
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://pixelpanda.ai/api/process",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => [
        'image' => new CURLFile('/path/to/image.jpg'),
        'processing_type' => 'background_removal'
    ],
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_API_KEY"
    ],
]);

$response = curl_exec($curl);

Authentication

All API requests require authentication using a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Keep your API key secure

Never expose your API key in client-side code or public repositories. Always make API calls from your backend server.

Remove Background

POST /api/process 100 requests/min

Remove the background from any image with stunning accuracy. Perfect for product photos, portraits, and more.

Request Parameters

Parameter Type Required Description
image file Required The image file to process (JPEG, PNG, max 10MB)
processing_type string Required Set to "background_removal"
output_format string Optional Output format: "png" (default) or "webp"
quality integer Optional Output quality (1-100, default: 95)

Example Request

curl -X POST https://pixelpanda.ai/api/process \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@/path/to/image.jpg" \
  -F "processing_type=background_removal"
import requests

response = requests.post(
    "https://pixelpanda.ai/api/process",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    files={"image": open("image.jpg", "rb")},
    data={"processing_type": "background_removal"}
)
result = response.json()
const formData = new FormData();
formData.append('image', imageFile);
formData.append('processing_type', 'background_removal');

const response = await fetch('https://pixelpanda.ai/api/process', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
    },
    body: formData
});

Response

{
    "success": true,
    "processing_id": "550e8400-e29b-41d4-a716-446655440000",
    "result_url": "https://pixelpanda.ai/results/550e8400.png",
    "credits_used": 1,
    "credits_remaining": 49,
    "processing_time": 1.23,
    "metadata": {
        "original_size": [1920, 1080],
        "result_size": [1920, 1080],
        "format": "png"
    }
}
{
    "success": false,
    "error": "Invalid image format",
    "error_code": "INVALID_FORMAT",
    "details": "Supported formats: JPEG, PNG"
}

Upscale Image

POST /api/process 50 requests/min

Enhance image resolution up to 4x while preserving quality and details. Perfect for turning low-resolution images into high-quality assets.

Parameters

Parameter Type Required Description
image file Yes Image file to upscale (JPEG, PNG)
processing_type string Yes Set to "upscale"
scale integer No Upscale factor (2 or 4, default: 2)
face_enhance boolean No Enhance faces in the image (default: false)

Example Request

curl -X POST https://pixelpanda.ai/api/process \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@/path/to/image.jpg" \
  -F "processing_type=upscale" \
  -F "scale=4"
import requests

response = requests.post(
    "https://pixelpanda.ai/api/process",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    files={"image": open("image.jpg", "rb")},
    data={"processing_type": "upscale", "scale": 4}
)
result = response.json()
const formData = new FormData();
formData.append('image', imageFile);
formData.append('processing_type', 'upscale');
formData.append('scale', '4');

const response = await fetch('https://pixelpanda.ai/api/process', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
    },
    body: formData
});

Remove Text

POST /api/process 75 requests/min

Intelligently detect and remove text from images while preserving the background. Ideal for cleaning up screenshots, removing watermarks, or preparing images for redesign.

Parameters

Parameter Type Required Description
image file Yes Image file containing text to remove
processing_type string Yes Set to "text_removal"

Example Request

curl -X POST https://pixelpanda.ai/api/process \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@/path/to/image.jpg" \
  -F "processing_type=text_removal"
import requests

response = requests.post(
    "https://pixelpanda.ai/api/process",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    files={"image": open("image.jpg", "rb")},
    data={"processing_type": "text_removal"}
)
result = response.json()
const formData = new FormData();
formData.append('image', imageFile);
formData.append('processing_type', 'text_removal');

const response = await fetch('https://pixelpanda.ai/api/process', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
    },
    body: formData
});

Image-to-Image Transformation

POST /api/process 15 requests/min

Transform existing images using AI with text prompts. Perfect for style changes, color modifications, and creative transformations while preserving the original structure.

Parameters

Parameter Type Required Description
file file Yes Input image file (JPEG/PNG, max 10MB)
processing_type string Yes Must be "image_to_image"
parameters JSON string Yes JSON object with "prompt" and optional "strength" (0-1)

Example Request

curl -X POST https://pixelpanda.ai/api/process \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@image.jpg" \
  -F "processing_type=image_to_image" \
  -F 'parameters={"prompt":"make it a sunset scene","strength":0.75}'

Example Response

{
  "processing_id": "abc123",
  "status": "completed",
  "processing_type": "image_to_image",
  "result_image_url": "data:image/png;base64,...",
  "processing_time": 8.2,
  "credits_used": 2
}

Rate Limits

API rate limits vary by plan. Rate limit information is included in response headers.

Plan Requests/Minute Requests/Day Max File Size
Free 10 50 5 MB
Starter 60 5,000 10 MB
Pro 300 50,000 25 MB
Enterprise Custom Unlimited 100 MB

Rate Limit Headers

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1640995200

Code Examples

Real-world examples to help you get started quickly.

Bulk Background Removal

Process an entire folder of images:

import requests
import os
from pathlib import Path

API_KEY = "YOUR_API_KEY"
API_URL = "https://pixelpanda.ai/api/process"

# Process all images in a directory
input_dir = Path("./input_images")
output_dir = Path("./output_images")
output_dir.mkdir(exist_ok=True)

for image_path in input_dir.glob("*.jpg"):
    with open(image_path, 'rb') as f:
        response = requests.post(
            API_URL,
            headers={"Authorization": f"Bearer {API_KEY}"},
            files={"image": f},
            data={"processing_type": "background_removal"}
        )

    result = response.json()
    if result.get("success"):
        # Download the result image
        result_url = result["result_url"]
        output_path = output_dir / f"{image_path.stem}_nobg.png"
        img_data = requests.get(result_url).content
        with open(output_path, 'wb') as f:
            f.write(img_data)
        print(f"Processed: {image_path.name}")

E-commerce Product Pipeline

Complete product image processing workflow:

const API_KEY = 'YOUR_API_KEY';
const API_URL = 'https://pixelpanda.ai/api/process';

async function processProductImage(imagePath) {
    // 1. Remove background
    const bgFormData = new FormData();
    bgFormData.append('image', await fetch(imagePath).then(r => r.blob()));
    bgFormData.append('processing_type', 'background_removal');

    const bgResponse = await fetch(API_URL, {
        method: 'POST',
        headers: { 'Authorization': `Bearer ${API_KEY}` },
        body: bgFormData
    });
    const noBgResult = await bgResponse.json();

    // 2. Upscale for high-quality display
    const upscaleFormData = new FormData();
    upscaleFormData.append('image', await fetch(noBgResult.result_url).then(r => r.blob()));
    upscaleFormData.append('processing_type', 'upscale');
    upscaleFormData.append('scale', '2');

    const upscaleResponse = await fetch(API_URL, {
        method: 'POST',
        headers: { 'Authorization': `Bearer ${API_KEY}` },
        body: upscaleFormData
    });
    const upscaled = await upscaleResponse.json();

    return {
        original: noBgResult.result_url,
        upscaled: upscaled.result_url
    };
}

Support

We're here to help you succeed with PixelPanda.

Documentation

Comprehensive guides and API reference

View Docs

Technical Support

Get help from our support team

Contact Support

Sales & Enterprise

Custom plans and enterprise solutions

Contact Sales
Response Times: Technical support typically responds within 24 hours. For urgent issues or enterprise customers, please email support@pixelpanda.ai for priority support options.