MakePhotos Docs
API Reference

POST /generate

Generate an AI photo from an input image — MakePhotos API reference.

POST /api/v1/generate

Generate a studio-quality photo from an input image.

Request

curl -X POST "https://makephotos.ai/api/v1/generate?key=mk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/product.jpg",
    "type": "product",
    "style": "studio"
  }'

Body parameters

ParameterTypeRequiredDescription
image_urlstringYesPublic URL of the input image
typestringYesGeneration type (product)
stylestringYesStyle preset (studio, amazon, luxury, lifestyle)
promptstringNoCustom prompt (overrides the style's default prompt)
aspect_ratiostringNoOutput ratio: 1:1, 4:3, 3:4, 16:9, 9:16 (default: 1:1)
resolutionstringNoOutput resolution: 1K, 2K, 4K (default: 1K)

Response

{
  "result_url": "https://res.cloudinary.com/.../makephotos/outputs/.../abc123.jpg",
  "credits_used": 1,
  "credits_remaining": {
    "monthly": 49,
    "topup": 10,
    "total": 59
  }
}
FieldTypeDescription
result_urlstringPermanent Cloudinary URL of the generated image
credits_usednumberCredits consumed (base cost × resolution multiplier)
credits_remainingobjectUpdated credit balances

Errors

CodeHTTP StatusDescription
missing_api_key401No API key provided
invalid_api_key401API key is invalid or revoked
no_active_subscription403No active subscription
insufficient_credits402Not enough credits
invalid_params400Missing or invalid parameters
generation_failed502AI generation failed (credits refunded)
internal_error500Unexpected server error

Example: 4K lifestyle shot

curl -X POST "https://makephotos.ai/api/v1/generate?key=mk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://res.cloudinary.com/.../sneaker.jpg",
    "type": "product",
    "style": "lifestyle",
    "aspect_ratio": "16:9",
    "resolution": "4K",
    "prompt": "Outdoor patio with warm afternoon light"
  }'

This costs 4 credits (1 base × 4K multiplier). The generation takes 10–20 seconds. The endpoint has a 60-second timeout.

On this page