Changelog
History of the changes made to the Photoroom API
Last updated
History of the changes made to the Photoroom API
Last updated
AI Backgrounds now improves its text prompt by default.
To opt-out, set the argument background.expandPrompt
to never
.
More details about this feature are available on this page.
AI Relighting is no longer limited to a maximum image size of 10MB.
AI Backgrounds now support using both Text and Image prompts at the same time.
To use both type of prompts together, set the arguments background.prompt
and background.guidance.imageFile
(or background.guidance.imageUrl
) in your API call:
More details about this feature are available on this page.
AI Backgrounds now support automatically improving short prompts.
To automatically expand your prompt, set the argument background.expandPrompt
to auto
:
More details about this feature are available on this page.
AI Backgrounds now uses our most recent model (version 3) by default.
If you prefer to keep using our previous model (version 2), you can do it by adding the following header to your API call: pr-ai-background-model-version: 2
.
We’ve started an A/B test of a new AI Backgrounds v3 model.
The new model should produce better results and is currently being tested on one of our instances.
This means that during the day some API calls will use the new model, while others will not.
This only concerns the AI Backgrounds feature, there’s no impact on all the other features.
AI Backgrounds now supports using an image as a prompt.
To use an image prompt, set either the argument background.guidance.imageFile
or background.guidance.imageUrl
:
More details about this feature are available on this page.
Users will no longer lose remaining images when upgrading to a bigger plan.
The API Playground now uses the latest AI Background model.
Use your own background image file: You can now send your own image file for your backgrounds using background.imageFile
on the Image Editing API.
Higher resolution: Previously, the Image Editing API supported image resolutions up to 2000×2000, resulting in a loss of quality. We have enhanced this capability, now allowing images up to 5000×5000 resolution without any quality loss. (Up to 25 Megapixels)
Margin and Padding: The API now supports both percentage string values (e.g., "20%") and pixel string values (e.g., "100px"), in addition to the existing percentage values ranging from 0 to 0.49.
Zapier integration: AI expand mode has been added.
The Image Editing API now supports expanding (or un-cropping) an image.
To expand an image, set the argument expand.mode
to the value ai.auto
.
This enables you, for example, to re-use an existing image but with a different aspect ratio:
More details about this feature are available on this page.
Sandbox Mode: You can now make up to 1,000 free API calls by month using our new sandbox mode. Sandbox mode is meant to be used for testing and prototyping, and will produce an image with a watermark. To use sandbox mode, prepend sandbox_
to your API key. (Example: sandbox_xxxxxxxxxxxxxxxxxxx
)
Sandbox mode currently only works with the Image Editing API (v2/edit
)
Reworked Zapier Integration: We've completely reworked our Zapier integration for a more seamless and efficient experience. This update adds support of the Image Editing API and improves the reliability of workflows.
New AI Backgrounds Model: Switch to the new AI Backgrounds model by adding the following HTTP header in your request when calling the Image Editing API:
Improved imageUrl
Parsing: Improved the parsing of imageUrl
when using GET on the Image Editing API (v2/edit)
, allowing for a wider range of URLs to be handled correctly.
Improved Cutout Results: Enhanced the cutout results for PNG images with significant transparency, providing a cleaner and more accurate outcome.
We've made an update to the base URL of the Image Editing API.
The previous base URL beta-sdk.photoroom.com
has been updated to image-api.photoroom.com
.
This change aims to enhance the clarity and consistency of our image API services.
Old base URL: beta-sdk.photoroom.com
New base URL: image-api.photoroom.com
Required Actions
Update the base URL: Please update all instances of the old base URL in your projects to the new base URL: image-api.photoroom.com
.
Test and Validate: After updating, make sure to test your integrations to confirm everything is working as expected with the new base URL.
Deadline: The transition should be completed by the 5th of July 2024, after which the old base URL will no longer be operational.
The Image Editing API can now automatically remove text from an image.
To remove text from the input image, set the argument textRemoval.mode
with one of the following values:
ai.artificial
: artificial text will be automatically removed. Artificial text includes all text added on an image through post-precessing, such as company name, watermarks, discounts, etc.
ai.natural
: natural text will be automatically removed. Natural text includes text that naturally occurs in an image such as writing on buildings or clothings, road signs, etc.
ai.all
: all text (natural and artificial) will be automatically removed.
More details about this feature are available on this page.
The Image Editing API now allows you to manually control the horizontal and/or vertical alignments of the subject.
Manually controlling the alignment is very useful when you want to position subjects with different aspect ratios is a harmonious way, like here where the subjects have been vertically aligned at the bottom:
More details about manually controlling the subject alignments are available on this page.
The API Dashboard in the Photoroom Web App has been moved.
The API Dashboard used to be accessible from Your personal space, and it has now been moved to My Photoroom API team.
To switch to My Photoroom API team, use the Team Switcher that's on the top left of the app:
Moving the API Dashboard to My Photoroom API team makes it possible for you to share access to your API Dashboard with your teammates.
Please note that this change has no effect on existing API Keys.
Existing API Keys are still valid and you don't need to make any change to your code.
The Image Editing API now support exporting images in JPEG format.
To export a JPEG image, set the argument export.format
with the value jpeg
.
Here's an example of how to use this new feature:
More details about this feature are available on this page.
The Image Editing API now supports a POST
route, which allows you to directly upload an image file rather than sending the URL of an image.
Here's an example how to call this new route:
Detailed specifications are available in the API reference.
The “Edit Image API” has been renamed to “Image Editing API”.
Please note that this is only a change of the commercial name: all of the technical identifiers (HTTP endpoint, argument names, etc.) are still the same.
The Image Editing API can now generate realistic shadows.
To add a realistic shadow, set the argument shadow.mode
with one of the following values:
More details about this feature are available on this page.
The Image Editing API can now generate realistic backgrounds.
To use this feature set the argument background.prompt
.
More details about this feature are available on this page.
The Image Editing API can now re-light the subject of an image.
To re-light the subject of an image, set the argument lighting.mode=ai.auto
.
More details about this feature are available on this page.
The Remove Background API now returns an uncertainty score.
The score reflects the confidence of the model in the cutout and is returned through the HTTP header x-uncertainty-score
of the response.
More details about the uncertainty score are available on this page.
The Remove Background API now supports WebP format for the result image.
To output a WebP image, set the argument format
to webp
.
Detailed specifications and usage instructions are available on our API reference.
New Endpoint - Edit Image v2: We have introduced a new beta endpoint GET /v2/edit
that enables you to apply complex edits to an image.
This new endpoint comes with an interactive playground that lets you configure your API call and preview the result in real time:
Details about this new API are available in our documentation and API reference.
New Endpoint - Account Details: We have introduced a new endpoint GET /v1/account
which provides detailed information about the current state of your account.
This includes your current credit consumption and the total monthly credits available for your subscription.
This new endpoint is aimed at giving users a better understanding of their account status and managing their credit usage effectively.
The response from the endpoint will be in JSON format, as shown in the example below:
In this sample, available
denotes the remaining credits for the current month and subscription
indicates the total monthly credits associated with the user's subscription.
Detailed specifications and usage instructions are available on our API reference.
Image Upload Enhancement: We have made improvements to our API's image upload functionality to offer a more flexible experience. In addition to passing an imageUrl
as a URL parameter, users are now also able to send the image binary directly in a POST
request using the new imageFile
field. This added capability simplifies the process of uploading images, especially for those who have the images available locally and not hosted online.
The previous method using imageUrl
remains functional and backward compatibility is maintained. Users are free to choose the method most convenient to their needs.
Please refer to our updated documentation for detailed instructions on using the new imageFile
field:
Add a Changelog page on the documentation
background.guidance.imageFile=@"/path/to/guidance-image.jpeg"
and
background.prompt="A bottle of perfume 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."
background.guidance.imageFile=@"/path/to/guidance-image.jpeg"
and
background.prompt="the image displays a small bottle with a pink substance on a table with a beautiful orange yellow sunset where the clouds are brightly lit from the sunset and a field is in the background slightly blurry."
background.prompt="on a beach"
background.expandPrompt=never
background.prompt="on a beach"
background.expandPrompt=auto
(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.")
original image
guidance image
result
(original image)
(expanded image)
current model
new model
(original image)
ai.artificial
ai.natural
ai.all
(original image)
ai.soft
ai.hard
ai.floating
Original
Re-lighted