---
title: "Image Editing v2 (Plus plan)"
method: GET
path: "/v2/edit"
---

# Image Editing v2 (Plus plan)

`GET /v2/edit`

This endpoint processes an image and applies one or more edits: background removal, AI-generated backgrounds (background.prompt), realistic shadows (shadow.mode), relighting (lighting.mode), text removal (textRemoval.mode), background blur (background.blur.*), subject outline (outline.*), AI beautification (beautify.mode), Flat Lay (flatLay.*), Ghost Mannequin (ghostMannequin.*), Ironing (ironing.mode), Virtual Model (virtualModel.*), AI expand (expand.mode), AI uncrop (uncrop.mode), AI upscale (upscale.mode), and positioning/resizing (padding, margin, outputSize).

Parameters are grouped by feature using dot notation: background.* for backgrounds, shadow.* for shadows, lighting.* for relighting, outline.* for subject outlines, beautify.* for AI beautification, flatLay.* for flat lay generation, ghostMannequin.* for ghost mannequin generation, ironing.* for wrinkle removal, virtualModel.* for virtual model generation, expand.* for AI expand, uncrop.* for AI uncrop, upscale.* for AI upscale, export.* for output format, and segmentation.* for text-guided segmentation.

Edits can be combined in a single call.

It accepts a URL input for the image. If you want to directly upload an image file, please use the POST endpoint. For more details on the difference between the GET and POST endpoints, please have a look at our documentation: https://docs.photoroom.com/image-editing-api/which-endpoints-are-available.

For the simplest integration (recommended for no-code tools like Lovable), use this GET endpoint with imageUrl — no file upload handling required.

Example of a request: GET https://image-api.photoroom.com/v2/edit?imageUrl=https://example.com/photo.jpg&removeBackground=true&background.color=FFFFFF&outputSize=1000x1000&padding=0.1 with header x-api-key: YOUR_API_KEY

The response is the edited image as binary data (image/png by default). To change format, set export.format to jpeg, webp or avif.

Full documentation: https://docs.photoroom.com/image-editing-api-plus-plan/quickstart-guide

Feature documentation:
- [HD Background Removal](https://docs.photoroom.com/image-editing-api-plus-plan/hd-background-removal)
- [Positioning (padding, margin, scaling)](https://docs.photoroom.com/image-editing-api-plus-plan/positioning)
- [Output Size](https://docs.photoroom.com/image-editing-api-plus-plan/output-size)
- [Static Background](https://docs.photoroom.com/image-editing-api-plus-plan/static-background)
- [Background Blur](https://docs.photoroom.com/image-editing-api-plus-plan/background-blur)
- [Subject Outline](https://docs.photoroom.com/image-editing-api-plus-plan/subject-outline)
- [AI Shadows](https://docs.photoroom.com/image-editing-api-plus-plan/ai-shadows)
- [AI Backgrounds](https://docs.photoroom.com/image-editing-api-plus-plan/ai-backgrounds)
- [AI Relight](https://docs.photoroom.com/image-editing-api-plus-plan/ai-relight)
- [AI Text Removal](https://docs.photoroom.com/image-editing-api-plus-plan/ai-text-removal)
- [AI Expand](https://docs.photoroom.com/image-editing-api-plus-plan/ai-expand)
- [AI Uncrop](https://docs.photoroom.com/image-editing-api-plus-plan/ai-uncrop)
- [AI Beautifier](https://docs.photoroom.com/image-editing-api-plus-plan/ai-beautifier)
- [Flat Lay](https://docs.photoroom.com/image-editing-api-plus-plan/flat-lay)
- [Ghost Mannequin](https://docs.photoroom.com/image-editing-api-plus-plan/ghost-mannequin)
- [Virtual Model](https://docs.photoroom.com/image-editing-api-plus-plan/virtual-model)
- [AI Upscale](https://docs.photoroom.com/image-editing-api-plus-plan/alpha-ai-upscale)
- [Describe Any Change](https://docs.photoroom.com/image-editing-api-plus-plan/edit-with-ai)
- [Create Any Image](https://docs.photoroom.com/image-editing-api-plus-plan/alpha-create-any-image)
- [Text-Guided Segmentation](https://docs.photoroom.com/image-editing-api-plus-plan/alpha-text-guided-segmentation)
- [Sandbox Mode (free testing)](https://docs.photoroom.com/image-editing-api-plus-plan/sandbox-mode)

## Query parameters

- `background.blur.mode` 'gaussian' | 'bokeh'
- `background.blur.radius` number
- `background.color` string
- `background.expandPrompt` union
  - 'auto'
  - 'never'
  - object
    - `mode` 'ai.auto' | 'ai.never', required — If `ai.auto`, a pre-processing step is applied to expand the prompt into a longer form. Example: original prompt `"on a beach"`, expanded prompt: `"An object rests on the sandy shore of a tranquil beach. The object, partially covered in sand, casts a soft shadow under the warm sunlight. Seashells and driftwood are scattered around, with gentle waves lapping at the shore in the background, creating a serene coastal scene."` (Note: `background.expandPrompt.mode` only affects `background.prompt`)
- `background.guidance.imageFile` string, binary
- `background.guidance.imageUrl` string
- `background.guidance.scale` number
- `background.imageUrl` string
- `background.negativePrompt` string
- `background.prompt` string
- `background.scaling` 'fit' | 'fill'
- `background.seed` number
- `beautify.mode` 'ai.auto' | 'ai.food' | 'ai.car'
- `beautify.onSubjectMismatch` 'ignore' | 'error'
- `beautify.seed` number
- `colorSpace` 'original' | 'sRGB'
- `describeAnyChange.mode` 'ai.auto'
- `describeAnyChange.prompt` string
- `describeAnyChange.seed` number
- `editWithAI.additionalImages.{key}.imageUrl` string
- `editWithAI.mode` 'ai.auto'
- `editWithAI.prompt` string
- `editWithAI.seed` number
- `expand.mode` 'ai.auto'
- `expand.seed` number
- `export.dpi` number
- `export.format` 'png' | 'jpeg' | 'jpg' | 'webp' | 'avif'
- `flatLay.mode` 'ai.auto'
- `flatLay.prompt` string
- `flatLay.size` 'PORTRAIT_HD_16_9' | 'PORTRAIT_HD_4_3' | 'PORTRAIT_HD_3_2' | 'SQUARE_HD' | 'LANDSCAPE_HD_3_2' | 'LANDSCAPE_HD_4_3' | 'LANDSCAPE_HD_16_9'
- `ghostMannequin.mode` 'ai.auto'
- `ghostMannequin.prompt` string
- `ghostMannequin.size` 'PORTRAIT_HD_16_9' | 'PORTRAIT_HD_4_3' | 'PORTRAIT_HD_3_2' | 'SQUARE_HD' | 'LANDSCAPE_HD_3_2' | 'LANDSCAPE_HD_4_3' | 'LANDSCAPE_HD_16_9'
- `horizontalAlignment` 'left' | 'center' | 'right'
- `ignorePaddingAndSnapOnCroppedSides` boolean
- `imageFromPrompt.prompt` string
- `imageFromPrompt.seed` number
- `imageFromPrompt.size` 'LANDSCAPE_16_9' | 'LANDSCAPE_4_3' | 'PORTRAIT_16_9' | 'PORTRAIT_4_3' | 'SQUARE_HD'
- `imageUrl` string
- `ironing.mode` 'ai.auto'
- `keepExistingAlphaChannel` 'auto' | 'never'
- `layers` object
- `lighting.mode` 'ai.auto' | 'ai.preserve-hue-and-saturation' | 'ai.optimize-portrait'
- `margin` union
  - number
  - string
- `marginBottom` union
  - number
  - string
- `marginLeft` union
  - number
  - string
- `marginRight` union
  - number
  - string
- `marginTop` union
  - number
  - string
- `maxHeight` number
- `maxWidth` number
- `outline.blurRadius` number
- `outline.color` string
- `outline.width` number
- `outputSize` string
- `padding` union
  - number
  - string
- `paddingBottom` union
  - number
  - string
- `paddingLeft` union
  - number
  - string
- `paddingRight` union
  - number
  - string
- `paddingTop` union
  - number
  - string
- `preserveMetadata` 'never' | 'xmp' | 'exifSubset' | 'exifSubsetWithXmpCompatibility'
- `referenceBox` 'subjectBox' | 'originalImage'
- `removeBackground` boolean
- `scaling` 'fit' | 'fill'
- `segmentation.mode` 'keepSalientObject' | 'ignoreSalientObject'
- `segmentation.negativePrompt` string
- `segmentation.prompt` string
- `shadow.directionOverride` union
  - number
  - 'behind' | 'behindLeft' | 'left' | 'frontLeft' | 'front' | 'frontRight' | 'right' | 'behindRight'
- `shadow.intensityOverride` number
- `shadow.mode` 'ai.soft' | 'ai.hard' | 'ai.floating' | 'ai.preset-soft' | 'ai.preset-hard' | 'ai.auto-with-overrides'
- `shadow.softnessOverride` number
- `shadow.spreadOverride` union
  - number
  - 'short' | 'medium' | 'long'
- `shadow.subjectPoseOverride` union
  - number
  - 'flatlay' | 'upright'
- `templateId` string, uuid
- `textRemoval.mode` 'ai.artificial' | 'ai.natural' | 'ai.all'
- `uncrop.mode` 'ai.auto'
- `uncrop.seed` number
- `upscale.downscaleIfNeeded` 'never' | 'always' | 'skipUpscaleIfNotNeeded'
- `upscale.mode` 'ai.fast' | 'ai.slow'
- `verticalAlignment` 'top' | 'center' | 'bottom'
- `virtualModel.additionalProductImages` object[]
  - `imageFile` string, binary — Bytes of an additional product image. Only available in the POST request.
  - `imageUrl` string — URL of an additional product image.
- `virtualModel.mode` 'ai.auto'
- `virtualModel.model` union
  - object
    - `preset` object, required — Use a preset model by name.
      - `name` 'avery' | 'sam' | 'taylor' | 'kendall' | 'jordan' | 'casey' | 'alex' | 'maya' | 'reece' | 'lena' | 'julia' | 'jackson' | 'sophia' | 'emma' | 'ava' | 'zoe' | 'fiona', required — Name of the preset model.
  - object
    - `custom` object, required — Use a custom model image.
      - `imageFile` string, binary — Bytes of a custom model image. Only available in the POST request.
      - `imageUrl` string — URL of a custom model image.
- `virtualModel.pose` 'random' | 'standing' | '34turn' | 'powerstance' | 'walkingforward' | 'handinpocket' | 'crossedarms' | 'back' | 'overtheshoulder' | 'seated' | 'adjustingclothing' | 'playfulspin'
- `virtualModel.prompt` string
- `virtualModel.quality` 'standard' | 'advanced' | 'premium'
- `virtualModel.scene` union
  - object
    - `preset` object, required — Use a preset scene by name.
      - `name` 'random' | 'street' | 'bedroom' | 'sunset' | 'factory' | 'studio' | 'coloredstudio' | 'concretestudio' | 'beach' | 'tropical' | 'library' | 'forest' | 'businessdistrict' | 'countryside' | 'flowers' | 'goldenlight' | 'mountain' | 'pool' | 'latincity' | 'cafe' | 'asiancity' | 'nightlights' | 'desert', required — Name of the preset scene.
  - object
    - `custom` object, required — Use a custom scene image.
      - `imageFile` string, binary — Bytes of a custom scene image. Only available in the POST request.
      - `imageUrl` string — URL of a custom scene image.
- `virtualModel.size` 'PORTRAIT_HD_16_9' | 'PORTRAIT_HD_4_3' | 'PORTRAIT_HD_3_2' | 'SQUARE_HD' | 'LANDSCAPE_HD_3_2' | 'LANDSCAPE_HD_4_3' | 'LANDSCAPE_HD_16_9'

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `402` — Payment Required
- `500` — Internal Server Error

---

[API](https://skmtc.dev/photoroom/apis/photoroom-api.md) · [All operations](https://skmtc.dev/photoroom/apis/photoroom-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/photoroom/photoroom-api/revisions/de98fbc4b773/schema)
