Automate your workflow

Why social apps should enable users to create personalized stickers

If you work on a social app, you know how important it is to deliver an experience that keeps your users engaged and excited over time.

A great way to deliver such an experience is to allow your users to personalize the way they interact with your app.

And that’s when stickers come into play!

Stickers are small background-less images that users can use, for example, to react in a conversation or to decorate their profile page:

But what’s really great with stickers is that you can enable your users to create their own personalized ones, which will allow them to bring a lot of their personality into your app!

Popular social apps such as Mojo and Id by amo actually use the Photoroom API in order to offer this personalized stickers feature to their users.

So let’s see how the Photoroom API will help you add this feature to your app.

How to create stickers with the Photoroom API

From a technical point of view, turning a regular image into a sticker is a two-step process:

  1. first, cutting out the main subject of the original image

  2. then, cropping the result image to the bounds of that main subject

Fortunately, the Photoroom API takes care of both steps in a single call!

To implement this, we’re going to use Photoroom’s Remove Background API.

Here’s how a call to this API looks like:

curl --request POST \
  --url https://sdk.photoroom.com/v1/segment \
  --header 'x-api-key: YOUR_API_KEY' \
  --form 'image_file=@/absolute/path/to/image.jpg' \
  --form 'crop=true'
  --output sticker.png

To make the call, you will need an API key. Here are the steps to get your API key.

And here's a before/after example of a call to this API:

The API call is made through a POST HTTP request, which takes three arguments:

  • x-api-key is your Photoroom API key

  • image_file is the file containing the image to use to create the sticker

  • crop=true tells the API to crop the result image to the bounds of the cutout subject

As you can see, it’s just a standard HTTP call that uses multipart formatting to send its data.

This means that integrating the API call into your codebase should be fairly straightforward.

We’ve even written wrappers to help you seamlessly integrate the API into Web, Node.js, Python, and iOS projects.

Conclusion

That’s it, thanks to the Photoroom API we’ve seen that you can easily enable your users to create high-quality stickers that they’ll be able to use inside your social app.

For more details about all that can be achieved using Photoroom’s API, check out this page on our website!

Vincent PradeillesSenior Software Engineer @ Photoroom
Why social apps should enable users to create personalized stickers
Ontwerp je volgende geweldige afbeelding

Ontwerp je volgende geweldige afbeelding

Of je nou verkoopt, promoot of post: breng je idee tot leven met een opvallend ontwerp.

Keep reading

How to remove your ex from your photos
Tine Dudek
How to change the background color in Instagram Stories
Brendan McConnell
Advantages of e-commerce automation in visuals
Daphne Renelus
The top 7 mistakes to avoid when using a background remover (+ ways to fix them)
Etashe Linto
How to remove the background from a logo in a few seconds
Etashe Linto
How to boost sales on Etsy: 24 actionable tips
Alexis Damen
Top 4 tips to create viral campaigns with AI
Vanessa Hojda
How to apply color wheel theory to product images without the guesswork
Etashe Linto
Photoroom vs VistaCreate: which tool wins for branded visuals?
Brendan McConnell
How to make an image transparent for e-commerce marketing
Maryam Oseni