> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# PhotoRoom

> PhotoRoom provides AI-powered APIs for removing backgrounds, editing and resizing product photos, generating images from prompts, and checking account credit usage.

![PhotoRoom logo](https://mintcdn.com/composio-preview/gqjBKmmJCINafaiK/images/toolkits/photoroom.svg?fit=max\&auto=format\&n=gqjBKmmJCINafaiK\&q=85\&s=96a63a38945a8204c0e43ed91d953d42)

* **Category:** images & design
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 4
* **Triggers:** 0
* **Slug:** `PHOTOROOM`
* **Version:** 20261101\_00
* **Instant:** Supported on the latest version. Support varies by tool.

## Tools

> [accordion] Edit Image
>
> **Slug:** `PHOTOROOM_EDIT_IMAGE`
>
> Apply combined PhotoRoom v2 edits to an image URL or uploaded file. Sandbox output is free and watermarked, while live calls are charged; Composio-managed credentials support live calls only and cannot use templates.
>
> **Instant:** Supported on the latest version.
>
> **Instant pricing:** \$0.10 per successful image edit
>
> #### Input Parameters
>
> **margin** `string`
>
> Uniform outer margin: a ratio from 0 to 0.49, a percentage from 0% to 49% such as 30%, or a pixel value such as 100px.
>
> **padding** `string`
>
> Uniform padding around the subject: a ratio from 0 to 0.49, a percentage from 0% to 49% such as 30%, or a pixel value such as 100px.
>
> **image\_url** `string`
>
> Publicly reachable direct image URL. Provide exactly one of image\_url or image\_file.
>
> **export\_dpi** `number`
>
> Optional output pixel density from 72 to 1200 DPI.
>
> **image\_file** `object`
>
> Image file to upload. Provide exactly one of image\_file or image\_url.
>
> **edit\_prompt** `string`
>
> Describe an AI edit to apply through PhotoRoom's editWithAI operation.
>
> **environment** `string ("sandbox" | "live")` *required*
>
> Choose live for charged non-watermarked output, or sandbox for free watermarked output.
>
> **output\_size** `string`
>
> Output size: WIDTHxHEIGHT such as 128x128, auto, originalImage, or croppedSubject.
>
> **shadow\_mode** `string ("ai.soft" | "ai.hard" | "ai.floating" | "ai.preset-soft" | "ai.preset-hard" | "ai.auto-with-overrides")`
>
> Shadow generation mode to apply; omit to leave shadows unchanged.
>
> **template\_id** `string`
>
> PhotoRoom template UUID to apply as part of the v2 edit.
>
> **upscale\_mode** `string ("ai.fast" | "ai.slow")`
>
> Use ai.fast for speed or ai.slow for higher quality; omit to skip upscaling.
>
> **export\_format** `string ("png" | "jpeg" | "jpg" | "webp" | "avif")`
>
> Output image format.
>
> **background\_color** `string`
>
> Replace the background with a color name such as red or blue, or a hex value without # such as FF0000 or FF0000EE. Pass remove\_background explicitly as false to instead only fill padding and transparent areas with this color.
>
> **background\_prompt** `string`
>
> Generate a replacement background from this text prompt.
>
> **remove\_background** `boolean`
>
> Remove the source image background as part of this edit. Setting any background replacement field implies this, since PhotoRoom only replaces a background it has removed.
>
> **text\_removal\_mode** `string ("ai.artificial" | "ai.natural" | "ai.all")`
>
> Remove artificial text, natural text, or all text; omit to keep detected text.
>
> **background\_image\_url** `string`
>
> Replace the background with an image from this public URL.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Generate Image
>
> **Slug:** `PHOTOROOM_GENERATE_IMAGE`
>
> Generate an image from a text prompt with PhotoRoom v2. Sandbox output is free and watermarked, while live calls are charged; Composio-managed credentials support live calls only.
>
> **Instant:** Supported on the latest version.
>
> **Instant pricing:** \$0.10 per successful generated image
>
> #### Input Parameters
>
> **seed** `integer`
>
> Optional generation seed for reproducible output when supported.
>
> **size** `string ("LANDSCAPE_16_9" | "LANDSCAPE_4_3" | "PORTRAIT_16_9" | "PORTRAIT_4_3" | "SQUARE_HD")`
>
> Requested generated-image size.
>
> **prompt** `string` *required*
>
> Text description of the image to generate.
>
> **environment** `string ("sandbox" | "live")` *required*
>
> Choose live for charged non-watermarked output, or sandbox for free watermarked output.
>
> **export\_format** `string ("png" | "jpeg" | "jpg" | "webp" | "avif")`
>
> Output image format.
>
> **remove\_background** `boolean`
>
> Remove the generated image background. Defaults to false so the scene described by the prompt is retained.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Account Usage
>
> **Slug:** `PHOTOROOM_GET_ACCOUNT_USAGE`
>
> Return the connected live PhotoRoom account's reported plan and remaining image credits.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Remove Background
>
> **Slug:** `PHOTOROOM_REMOVE_BACKGROUND`
>
> Remove the background from one uploaded image using PhotoRoom's Basic API. Sandbox output is free and watermarked, while live calls are charged; Composio-managed credentials support live calls only.
>
> **Instant:** Supported on the latest version.
>
> **Instant pricing:** \$0.02 per successful background removal
>
> #### Input Parameters
>
> **crop** `boolean`
>
> Crop the result around the detected foreground subject.
>
> **size** `string ("preview" | "medium" | "hd" | "full")`
>
> Output resolution tier.
>
> **format** `string ("png" | "jpg" | "webp")`
>
> Output image format.
>
> **despill** `boolean`
>
> Reduce background color spill around foreground edges.
>
> **channels** `string ("rgba" | "alpha")`
>
> Return the color image with transparency (rgba) or only the alpha mask (alpha).
>
> **image\_file** `object` *required*
>
> Image file whose background will be removed.
>
> **environment** `string ("sandbox" | "live")` *required*
>
> Choose live for charged non-watermarked output, or sandbox for free watermarked output.
>
> **background\_color** `string`
>
> Optional output background color accepted by PhotoRoom instead of transparency.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
