API Reference

Complete reference documentation for the ProductAI REST API.

Base URL

https://api.productai.photo/v1

Authentication

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

curl -X POST "https://api.productai.photo/v1/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Learn more about authentication →

Quick Example

Generate an image using the Nano Banana 2 model:

curl -X POST "https://api.productai.photo/v1/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nanobanana2",
    "image_url": "https://example.com/product.jpg",
    "prompt": "Place the product on a marble table with soft lighting"
  }'

Available Models

nanobanana2(5 credits)nanobananapro(8 credits)nanobanana(3 credits)kontext-pro(3 credits)kontext-max(3 credits)seedream(3 credits)gpt-high(8 credits)

Endpoints

Rate Limits

API requests are rate limited based on your subscription plan. If you exceed the rate limit, you'll receive a 429 Too Many Requests response.

PlanRate Limit
Free10 requests/minute
Pro60 requests/minute
EnterpriseCustom

Error Handling

The API uses standard HTTP status codes to indicate success or failure.

200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error