Free API Access for All Users

Build with Partr API

Integrate AI-powered image processing into your application with our powerful RESTful API. Upload, process, and retrieve images programmatically.

Quick Start

1. Get Your API Key

Generate your API key from the Developer Settings page.

2. Authentication

Include your API key in the X-API-Key header for all requests.

X-API-Key: pk_your_api_token_here
POST/v1/upload

Upload an image to a specific album. The image will be queued for processing automatically.

cURL
curl -X POST https://partr.ai/api/v1/upload \
  -H "X-API-Key: YOUR_API_TOKEN" \
  -F "file=@/path/to/image.jpg" \
  -F "album_id=your-album-id"
Python
import requests

with open("image.jpg", "rb") as f:
    response = requests.post(
        "https://partr.ai/api/v1/upload",
        headers={"X-API-Key": "YOUR_API_TOKEN"},
        files={"file": f},
        data={"album_id": "your-album-id"}
    )

result = response.json()
print(f"Image ID: {result['image_id']}")
print(f"Status: {result['status']}")
JavaScript
const formData = new FormData();
formData.append("file", imageFile);
formData.append("album_id", "your-album-id");

const response = await fetch("https://partr.ai/api/v1/upload", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_TOKEN" },
  body: formData
});

const { image_id, status } = await response.json();
Response
{
  "image_id": "img_abc123xyz",
  "album_id": "your-album-id",
  "status": "queued",
  "original_url": "https://storage.partr.ai/uploads/img_abc123xyz.jpg",
  "created_at": "2024-01-15T10:30:00Z"
}
GET/v1/albums/:album_id/images

Retrieve all images in a specific album with pagination support.

cURL
curl -X GET "https://partr.ai/api/v1/albums/your-album-id/images?page=1&limit=20" \
  -H "X-API-Key: YOUR_API_TOKEN"
Python
import requests

response = requests.get(
    "https://partr.ai/api/v1/albums/your-album-id/images",
    headers={"X-API-Key": "YOUR_API_TOKEN"},
    params={"page": 1, "limit": 20, "status": "ready"}
)

data = response.json()
for image in data["images"]:
    print(f"{image['id']}: {image['status']}")
JavaScript
const params = new URLSearchParams({ page: 1, limit: 20 });
const response = await fetch(
  `https://partr.ai/api/v1/albums/your-album-id/images?${params}`,
  { headers: { "X-API-Key": "YOUR_API_TOKEN" } }
);

const { images, meta } = await response.json();
console.log(`Total: ${meta.total}, Page: ${meta.page}`);
Response
{
  "images": [
    {
      "id": "img_abc123xyz",
      "status": "ready",
      "original_url": "https://storage.partr.ai/uploads/img_abc123xyz.jpg",
      "processed_url": "https://storage.partr.ai/processed/img_abc123xyz.jpg",
      "thumbnail_url": "https://storage.partr.ai/thumbnails/img_abc123xyz.jpg",
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "total": 150,
    "page": 1,
    "limit": 20,
    "total_pages": 8
  }
}
GET/v1/images/:image_id

Retrieve detailed information about a specific image including processing status and URLs.

cURL
curl -X GET https://partr.ai/api/v1/images/img_abc123xyz \
  -H "X-API-Key: YOUR_API_TOKEN"
Python
import requests

response = requests.get(
    "https://partr.ai/api/v1/images/img_abc123xyz",
    headers={"X-API-Key": "YOUR_API_TOKEN"}
)

image = response.json()
if image["status"] == "ready":
    print(f"Processed: {image['processed_url']}")
    print(f"Thumbnail: {image['thumbnail_url']}")
JavaScript
const response = await fetch(
  "https://partr.ai/api/v1/images/img_abc123xyz",
  { headers: { "X-API-Key": "YOUR_API_TOKEN" } }
);

const image = await response.json();
if (image.status === "ready") {
  console.log("Processed:", image.processed_url);
  console.log("Thumbnail:", image.thumbnail_url);
}
Response
{
  "id": "img_abc123xyz",
  "album_id": "your-album-id",
  "status": "ready",
  "original_filename": "photo.jpg",
  "original_url": "https://storage.partr.ai/uploads/img_abc123xyz.jpg",
  "processed_url": "https://storage.partr.ai/processed/img_abc123xyz.jpg",
  "thumbnail_url": "https://storage.partr.ai/thumbnails/img_abc123xyz.jpg",
  "width": 4000,
  "height": 3000,
  "format": "jpeg",
  "size_bytes": 2456789,
  "processing_duration_ms": 1250,
  "created_at": "2024-01-15T10:30:00Z",
  "processed_at": "2024-01-15T10:30:02Z"
}

Authentication

Secure API key authentication with rate limiting and usage tracking.

RESTful API

Clean, predictable REST endpoints with JSON request/response format.

Webhooks

Real-time notifications when image processing completes or fails.

SDKs & Libraries

Official SDKs for Node.js, Python, and more coming soon.

Documentation

Comprehensive guides, code examples, and interactive API explorer.

Security

Enterprise-grade security with encryption and compliance certifications.

API Endpoints

POST/v1/upload

Upload an image to an album for processing

GET/v1/albums/:album_id/images

Retrieve all images in an album with pagination

GET/v1/images/:image_id

Retrieve image details, processing status, and URLs

Ready to Start Building?

Create a free account and get your API token to start integrating Partr into your applications.