---
title: "Enhance product image"
method: POST
path: "/v1/images/enhance"
tags: ["Images"]
---

# Enhance product image

`POST /v1/images/enhance`

## Request

- Base URL: `https://api.shopfront.app`
- URL: `https://api.shopfront.app/v1/images/enhance`
- Auth: HTTP bearer

Enhance a single product image using AI.

**How it works:**
1. Submit product image (URL or base64)
2. AI processes the image synchronously
3. Returns the enhanced image as an S3 URL, or a base64 data URL if requested

**Return formats:**
- **URL**: Upload to S3 and return the output URL. Returned when you omit `options`, or set `options.returnFormat: "url"`.
- **Base64**: Return a base64 data URL. Set `options.returnFormat: "base64"`. If you send `options` without `returnFormat`, it defaults to base64.

**Default processing** (when no `prompt` is supplied):
- Preserve product colours, logos, text, texture and shape
- Replace the background with pure white and remove hangers, mannequins and props
- Apply even studio-style lighting and gently sharpen edges
- Centre the product with balanced padding
- Review the result before using it in a listing

**Use cases:**
- Prepare images for marketplace listings
- Create professional product photos
- Standardize image quality across catalog

For background removal without the enhancement step, use `POST /v1/images/remove-background`.
Processing duration varies; inspect the response and review the resulting image.

## Request body

- ImageEnhanceRequest
  - `image` union, required: Image to enhance (URL or base64)
    - UrlImage
      - `type` 'url', required
      - `url` string, uri, required
    - Base64Image
      - `type` 'base64', required
      - `data` string, required
      - `filename` string
  - `prompt` string: Optional custom enhancement prompt (defaults to standard e-commerce enhancement)
  - `options` object
    - `returnFormat` 'url' | 'base64': Format for the enhanced image. Defaults to base64 when `options` is sent without `returnFormat`; omitting `options` entirely returns an S3 URL.

## Response `200`

Image successfully enhanced

- ImageEnhanceResponse
  - `success` boolean, required: Whether enhancement succeeded
  - `originalUrl` string, required: Original image URL
  - `enhancedUrl` string: Enhanced image as an S3 URL, or a base64 data URL when `options.returnFormat` is base64
  - `s3Location` object, nullable: S3 storage location (only present when returnFormat=url)
    - `bucket` string
    - `key` string
  - `processingTime` integer: Processing time in milliseconds
  - `error` string, nullable: Error message if enhancement failed

## Other responses

- `400`: Invalid request
- `401`: Unauthorized - missing or invalid token
- `429`: Rate limit exceeded
- `500`: Image enhancement failed

---

[API](https://skmtc.dev/shopfront/apis/shopfront-public-api.md) - [All operations](https://skmtc.dev/shopfront/apis/shopfront-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shopfront/apis/shopfront-public-api/revisions/4dbfb90550d4?raw)
