How to create sticker images
Last updated
Last updated
Stickers are small background-less images that users can use, for example, to react in a conversation or to decorate their profile page:
The Photoroom API makes it easy to add this feature to your app.
Here's a before/after example of the kind of high-quality sticker the API can create:
There are two different ways to create a sticker through the Photoroom API, depending on whether the image you want to process is stored locally (in a file or a temporary variable) or hosted remotely.
If the image you want to process is stored locally, you can turn it into a sticker by calling our Remove Background API.
Here's how the call looks like:
If you don't have an API key, here are the steps to create yours.
Notice how, additionally to sending the image_file
, we also set the argument crop=true
.
As its name suggests, this argument crops the size of the result image to that of the cutout subject.
If the image you want to process is stored remotely, you can turn it into a sticker using the Image Editing API.
Here's how the call looks like:
If you don't have an API key, here are the steps to create yours.
Notice how the URL of the image is passed through the query string argument imageUrl
.
This URL must be accessible publicly over the Internet.
Make sure to URL encode the value you set for the argument imageUrl
.
As we’ve seen, the Photoroom API makes it easy to create high-quality stickers, whether the image that you want process is stored locally or remotely.
Please note that there's no difference in quality between the two approaches: both will yield the exact same cutout of the subject.