Skip to content
FoodPhoto.ai
← Back to Developer Hub

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.ai

All API requests must be made to this base URL with HTTPS.

Authentication

Authorization: Bearer YOUR_API_KEY

Include your API key in the Authorization header of every request.

API Endpoints

All endpoints accept and return JSON

POST/v1/photos/enhanceAuth required

Upload and enhance a food photo with AI

GET/v1/photos/:idAuth required

Retrieve details and download URLs for a photo

GET/v1/photosAuth required

List all photos for your account

DELETE/v1/photos/:idAuth required

Delete a photo and free up storage

GET/v1/presets

List all available enhancement presets

GET/v1/account/creditsAuth required

Get current credit balance and usage

Example: Enhance a Photo

Upload and enhance a food photo with AI

Request

cURL
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

ParameterTypeRequiredDescription
imageUrlstringYesPublicly accessible URL to the image
presetstringNoEnhancement style (default: "balanced")
formatsarrayNoOutput formats to generate
removeBackgroundbooleanNoRemove background (default: false)
upscalebooleanNoUpscale to 4K (default: true)

Response (200 OK)

JSON
{
  "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

TierRequests/minuteBurstMonthly limit
Free10 per minute20100 photos
Starter30 per minute60500 photos
Growth60 per minute1202,000 photos
Pro120 per minute240Unlimited

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

400

Bad Request

Invalid request parameters or malformed image

401

Unauthorized

Missing or invalid API key

402

Payment Required

Insufficient credits

429

Too Many Requests

Rate limit exceeded

500

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

API Reference | FoodPhoto.ai Developer Documentation