API Reference
Complete REST API documentation for integrating FoodPhoto.ai into your application. All endpoints return JSON and use standard HTTP authentication.
Base URL
https://api.foodphoto.aiAll API requests must be made to this base URL with HTTPS.
Authentication
Authorization: Bearer YOUR_API_KEYInclude your API key in the Authorization header of every request.
API Endpoints
All endpoints accept and return JSON
/v1/photos/enhanceAuth requiredUpload and enhance a food photo with AI
/v1/photos/:idAuth requiredRetrieve details and download URLs for a photo
/v1/photosAuth requiredList all photos for your account
/v1/photos/:idAuth requiredDelete a photo and free up storage
/v1/presetsList all available enhancement presets
/v1/account/creditsAuth requiredGet current credit balance and usage
Example: Enhance a Photo
Upload and enhance a food photo with AI
Request
curl -X POST https://api.foodphoto.ai/v1/photos/enhance \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/burger.jpg",
"preset": "delivery-optimized",
"formats": ["square", "portrait", "landscape"],
"removeBackground": false,
"upscale": true
}'Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| imageUrl | string | Yes | Publicly accessible URL to the image |
| preset | string | No | Enhancement style (default: "balanced") |
| formats | array | No | Output formats to generate |
| removeBackground | boolean | No | Remove background (default: false) |
| upscale | boolean | No | Upscale to 4K (default: true) |
Response (200 OK)
{
"id": "photo_abc123xyz",
"status": "completed",
"creditsUsed": 1,
"original": {
"url": "https://cdn.foodphoto.ai/originals/abc123.jpg",
"width": 2000,
"height": 1500
},
"enhanced": {
"square": "https://cdn.foodphoto.ai/enhanced/abc123_sq.jpg",
"portrait": "https://cdn.foodphoto.ai/enhanced/abc123_pt.jpg",
"landscape": "https://cdn.foodphoto.ai/enhanced/abc123_ls.jpg"
},
"metadata": {
"preset": "delivery-optimized",
"processedAt": "2025-12-21T20:00:00Z"
}
}Rate Limits
Rate limits scale with your usage and credit purchases
| Tier | Requests/minute | Burst | Monthly limit |
|---|---|---|---|
| Free | 10 per minute | 20 | 100 photos |
| Starter | 30 per minute | 60 | 500 photos |
| Growth | 60 per minute | 120 | 2,000 photos |
| Pro | 120 per minute | 240 | Unlimited |
Rate limit headers
Every API response includes headers showing your current rate limit status:X-RateLimit-Remaining
Error Codes
Standard HTTP status codes with detailed error messages
Bad Request
Invalid request parameters or malformed image
Unauthorized
Missing or invalid API key
Payment Required
Insufficient credits
Too Many Requests
Rate limit exceeded
Internal Server Error
Something went wrong on our end
Example Error Response
{
"error": {
"code": "insufficient_credits",
"message": "You don't have enough credits to complete this request",
"requiredCredits": 1,
"availableCredits": 0
}
}Ready to start building?
Get your API key and start enhancing food photos in minutes