canonical: https://jentic.com/apis/photoroom.com/photoroom

# PhotoRoom API

Jentic publishes the only available OpenAPI specification for PhotoRoom API, keeping it validated and agent-ready. PhotoRoom provides AI-powered image editing capabilities through a REST API, including background removal, AI-generated backgrounds, shadow rendering, product relighting, text removal, image expansion, mannequin removal, virtual model placement, and upscaling. The API processes images server-side and returns edited results suitable for e-commerce product photography, social media content, and marketing materials.

## For AI agents

Remove image backgrounds, add AI-generated shadows and backgrounds, and apply editing effects like relighting, text removal, and upscaling for product photography automation.

## Scope

Does not handle video processing, 3D rendering, vector graphics, or image hosting/CDN - use for AI-powered still image editing only.

## Capabilities

- Remove image backgrounds with AI-powered segmentation for product isolation
- Generate contextual AI backgrounds tailored to product type and brand style
- Add realistic drop shadows and reflections to product images
- Relight product photos with AI to correct or enhance lighting conditions
- Remove text overlays and watermarks from images while preserving the underlying content
- Expand image canvas with AI-generated content to fit new aspect ratios
- Apply virtual model or ghost mannequin effects for fashion photography

## Use cases

### E-Commerce Product Photo Editing

Automate product photography post-processing at scale by removing backgrounds, adding consistent shadows, and placing products on brand-appropriate AI-generated backgrounds. PhotoRoom processes each image in seconds, enabling online retailers to prepare hundreds of product listings without manual photo editing. Supports batch workflows through repeated API calls with consistent styling parameters.

Example prompt: Upload a product image to POST `/v2/edit` with background removal enabled and a white background replacement, then download the processed result

### Marketing Content Generation

Create social media and advertising visuals by combining product isolation with AI-generated backgrounds, shadows, and relighting effects. The API handles aspect ratio expansion for platform-specific dimensions (Instagram square, Facebook cover, web banner) and adds professional-quality lighting adjustments to match campaign aesthetics.

Example prompt: Process a product image through POST `/v2/edit` with background generation set to a lifestyle scene and expand the canvas to 16:9 aspect ratio

### Fashion Photography Automation

Apply ghost mannequin and virtual model effects to clothing product photos, creating clean flat-lay presentations or model-worn looks without physical photoshoots. PhotoRoom's AI handles garment segmentation and compositing, reducing per-image cost from professional studio rates to API pricing per call.

Example prompt: Send a clothing photo to POST `/v2/edit` with the ghost mannequin editing parameter enabled and retrieve the processed image

### AI Agent Image Processing via Jentic

AI agents building product catalogs or marketing content can edit images through Jentic without managing PhotoRoom API keys directly. The agent searches for image editing operations, loads the endpoint schema, and executes with Jentic injecting the x-api-key header. This enables automated visual content pipelines where agents prepare product photos as part of listing creation workflows.

Example prompt: Search Jentic for 'remove background from product photo', load the PhotoRoom edit operation schema, and execute with an image URL to get a transparent-background PNG

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v2/edit` | Apply AI editing operations (background removal, shadows, relighting, expand, etc.) |
| POST | `/v1/segment` | Segment foreground from background and return a mask or cutout |
| GET | `/v2/account` | Retrieve account usage quotas and subscription status |

## Key resources

- **Edit** — Apply AI-powered image editing operations including background removal, shadow, relighting, and expansion
- **Segment** — Perform foreground segmentation to isolate subjects from backgrounds
- **Account** — Check API usage, quota remaining, and subscription tier

## Why Jentic

- **Setup:** Wiring the PhotoRoom API by hand means passing your key in the x-api-key header, choosing between the image-api and sdk hosts, and formatting the multipart edit and segment requests yourself. Through Jentic you install once, import the PhotoRoom API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** PhotoRoom carries the image target in the request body of POST `/v2/edit` and POST `/v1/segment`, with no resource id in the URL path, so the honest control is operations-only: you limit the agent to the operations it needs, such as editing an image or reading the account, and account is the only read exposed. You choose the operations it may call, so segment or edit are not included unless you add them.
- **Credential handling:** Your PhotoRoom API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'remove the background from a product photo', and Jentic returns the matching PhotoRoom operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **remove.bg API** — Dedicated background removal API focused solely on subject isolation
- **Cloudinary Upload API** — Image hosting and transformation CDN for storing and serving processed product photos
- **OpenAI API** — AI image generation for creating entirely new product visuals and marketing scenes

## FAQ

### Why is there no official OpenAPI spec for PhotoRoom API?

PhotoRoom does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call PhotoRoom API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the PhotoRoom API use?

PhotoRoom uses an API key passed in the x-api-key request header. Keys are obtained from the PhotoRoom API Dashboard at app.photoroom.com/api-dashboard. Through Jentic, the API key is stored in your Jentic One instance and injected into request headers automatically.

### Can I remove the background from an image and add a shadow in one API call?

Yes. The POST `/v2/edit` endpoint accepts multiple editing parameters in a single request. You can combine background removal with shadow generation, relighting, and canvas expansion in one call, receiving the fully processed image as the response.

### What image formats does the PhotoRoom API accept and return?

The API accepts JPEG and PNG uploads. It returns processed images as PNG when transparency is needed (background removal) or JPEG for opaque results. Image URLs can also be provided instead of direct file uploads.

### How do I edit product photos through Jentic with PhotoRoom?

Search Jentic for 'remove image background' to find the POST `/v2/edit` operation. Load the schema to see all available editing parameters (background_removal, shadow, relight, expand), provide your image file or URL, and execute. Jentic injects the x-api-key header from your vault.

### What is the pricing model for the PhotoRoom API?

PhotoRoom charges per image processed, with pricing tiers based on monthly volume. Use GET `/v2/account` to check your current usage and remaining quota. Free tier includes a limited number of monthly edits for testing and prototyping.

### Can I limit what my agent is allowed to do with the PhotoRoom API?

Yes. Because you self-host Jentic One, your own rules decide which PhotoRoom operations and credentials the agent may use, and it can only call the operations you grant. Since PhotoRoom carries the image in the request body of POST `/v2/edit` and POST `/v1/segment` with no resource id in the URL path, the control is operations-only: you can allow just editing while leaving segmentation out, or restrict the agent to the read-only GET `/v2/account` for usage and quota checks. Your stored API key is injected only when one of those permitted operations runs.
