Integrate AIPhoto's AI image generation into your own apps and workflows with our simple REST API.
All API requests must include your API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
X-Requested-With: XMLHttpRequest
API keys are issued with the Pro plan. Join the waitlist →
Generate a new AI image from a text prompt. Returns a URL to the generated image.
curl -X POST https://aiphoto.io/api/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A serene mountain lake at golden hour, photorealistic",
"model": "flux-pro",
"style": "Photorealistic",
"ratio": "16:9"
}'
{
"success": true,
"url": "https://cdn.openrouter.ai/generated/abc123.png",
"model": "flux-pro",
"ratio": "16:9",
"usage": 2,
"remaining": 3
}
Enhance or upscale an uploaded photo using AI. Accepts multipart form data with the image file.
curl -X POST https://aiphoto.io/api/enhance \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "image=@photo.jpg" \
-F "strength=7"
{
"success": true,
"url": "https://cdn.openrouter.ai/enhanced/xyz789.png",
"original_size": "512x512",
"enhanced_size": "2048x2048"
}
Check API status and your current rate limit usage.
curl https://aiphoto.io/api/status \
-H "Authorization: Bearer YOUR_API_KEY"
# Response:
{
"status": "ok",
"version": "1.0",
"usage_today": 2,
"limit_today": 5,
"remaining": 3,
"reset_at": "2026-05-10T00:00:00Z"
}
All endpoints are rate-limited. Limits vary by plan:
Rate limit headers are included in every response: X-RateLimit-Remaining, X-RateLimit-Reset.