Image enhancement

Image enhancement API

Auto-enhance, perspective correction, sky replacement, and blurring — endpoints for cleaning up real estate photos.

The image enhancement endpoints fix common listing photo issues: dull lighting, tilted perspective, gray skies, and privacy-sensitive content. Each accepts an image URL and returns the processed result.

Auto-enhance

POST/api/enhance

Automatically improves lighting, color balance, sharpness, and contrast. Use this as the default cleanup pass on raw listing photos.

Image enhancement examples
Real listing photos before and after the enhance pass — dim rooms, dull color, soft focus.
See examples →

Parameters

apiKeystringrequired
Your API key.
imageUrlstringrequired
URL of the photo to enhance, or a base64 data URI.
preserveOriginalFramingboolean
Keep the exact original aspect ratio and framing. Set true when feeding into portals with strict image specs.
Default: false

Example request

curl -X POST https://app.pedra.ai/api/enhance \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "YOUR_API_KEY",
    "imageUrl": "https://example.com/listing-photo.jpg",
    "preserveOriginalFraming": true
  }'

Example response

JSON
{
  "message": "Success",
  "output": [
    { "url": "https://pedraimages.s3.eu-west-3.amazonaws.com/<generated-id>" }
  ]
}

Response time: ~10 seconds per image. The response can include multiple URLs when the model produces variants.

Enhance + correct perspective

POST/api/enhance_and_correct_perspective

Same as /api/enhance but with an upstream perspective-warp pass that straightens vertical lines. Use it when listing photos were shot with a phone tilted up or down.

Image enhancement examples
Same gallery as /api/enhance — perspective correction is most visible on tilted exterior shots.
See examples →

Parameters

apiKeystringrequired
Your API key.
imageUrlstringrequired
URL of the photo, or a base64 data URI.
preserveOriginalFramingboolean
When true, the pipeline preserves the input's framing, aspect ratio, and resolution exactly (no edge crop). Designed for verification verticals where the output must legally represent the captured photo.
Default: false

Response shape: same as /api/enhance (array). Response time: ~15 seconds per image.

Sky replacement

POST/api/sky_blue

Replace a gray, overcast, or washed-out sky with a clean blue one. Only affects sky pixels — the rest of the image is untouched.

Image enhancement examples
Overcast exteriors turned into clean blue-sky listing photos.
See examples →

Parameters

apiKeystringrequired
Your API key.
imageUrlstringrequired
URL of the exterior photo, or a base64 data URI.

Example request

curl -X POST https://app.pedra.ai/api/sky_blue \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "YOUR_API_KEY",
    "imageUrl": "https://example.com/exterior-photo.jpg"
  }'

Example response

JSON
{
  "message": "Success",
  "output": {
    "url": "https://pedraimages.s3.eu-west-3.amazonaws.com/<generated-id>"
  }
}

Response time: ~10 seconds per image. Note: output is a single object here, not an array.

Blur objects

POST/api/blur

Auto-blurs sensitive content like faces, license plates, or branded logos. Useful for portal-compliant exterior shots.

Parameters

apiKeystringrequired
Your API key.
imageUrlstringrequired
URL of the source photo.
objectsToBlurstringrequired
Comma-separated list of what to blur. Examples: "faces", "license plates", "logos", "faces, license plates".

Example request

curl -X POST https://app.pedra.ai/api/blur \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "YOUR_API_KEY",
    "imageUrl": "https://example.com/photo.jpg",
    "objectsToBlur": "faces, license plates"
  }'

Example response

JSON
{
  "message": "Success",
  "output": {
    "url": "https://pedraimages.s3.eu-west-3.amazonaws.com/<generated-id>"
  }
}

Response time: ~10 seconds per image. output is a single object.

Next

See Virtual staging for furniture and content edits, or Create video for generating listing videos from photos.