API Reference
ProductAI REST API
Generate professional product photos and videos programmatically. Async job-based flow: submit a generation, then poll the job or receive a webhook.
Base URL
Base URL
https://api.productai.photo/v1/apiAuthentication
Every request needs your API key in the x-api-key header. Get your key from the API Access page in the Studio, then verify it with key-check:
cURL
curl "https://api.productai.photo/v1/api/key-check" \
-H "x-api-key: YOUR_API_KEY"
# Response
{ "status": "OK" }Endpoints
POST
/v1/api/generateGenerate AI product imagesPOST/v1/api/generate-videoGenerate AI product videosPOST/v1/api/upload-assetUpload an image, get a hosted URLGET/v1/api/job/{job_id}Get job status and resultPOST/v1/api/upscalePrecision-upscale an imageGET/v1/api/key-checkVerify your API keyQuick example
Generate an image with the Nano Banana 2 model. The response contains a job ID — poll GET /v1/api/job/{id} until it's COMPLETED.
cURL
curl -X POST "https://api.productai.photo/v1/api/generate" \
-H "x-api-key: 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"
}'Image models & credit costs
nanobanana25 creditsnanobananapro8 creditsnanobanana3 creditsseedream-5-pro8 creditsseedream-5-lite3 creditsseedream3 creditskontext-pro2 creditskontext-max3 creditsgpt-210 creditsgpt-1.510 creditsgpt-high8 creditsgpt-medium3 creditsgpt-low2 credits
Video (Seedance, Gemini Omni) is billed per second — see video pricing.
Rate limits
| Endpoint | Limit |
|---|---|
/generate, /generate-video | 15 requests / minute per IP |
/upload-asset | 1 request / second per account |
Error handling
The API uses standard HTTP status codes. Successful calls return 200 with { "status": "OK", "data": … }.
200Success — body is { "status": "OK", "data": … }400Bad request — invalid parameters, not enough credits (OUT_OF_TOKENS), or job not found401Unauthorized — missing x-api-key header403Forbidden — invalid or inactive API key429Too many requests — rate limit exceeded500Internal server errorError formats
// Validation and credit errors (HTTP 400)
{
"name": "ApiError",
"message": "prompt is required",
"details": "No description was given."
}
// Auth errors (HTTP 401 / 403)
{ "error": "API key is required" }
// Rate limiting (HTTP 429)
{
"error": "Too many generation requests from this IP,
please try again after a minute."
}