Best API to generate profile avatars
Tags: webdev, api, design, uiweekly
Published: 2022-12-12 12:18:43

Profile avatars nowadays very popular in websites which helps its users to generate their profile instead of using a own picture as profile, and its obvious websites should provide this feature as default, so if anyone like me doesn't have a good picture of my face then i can use an avatar :).

In this article we are going to generate our own avatars using rapidAPI's [funky pixel avatar](https://rapidapi.com/kuldeepavsar-ufrLHH61TGY/api/funky-pixel-avatars/) API which is free and paid both.

Now question comes why we are only using this? because this api helps to generate the avatar based on gender, means you can generate avatar for male and female both by passing gender as `query` and it also supports multiple image formats like: _**png, jpeg, jpg, and gif**_ which is good for it's user.

We can directly test the api on [rapidAPI](https://rapidapi.com/kuldeepavsar-ufrLHH61TGY/api/funky-pixel-avatars/), because [rapidAPI](https://rapidapi.com/kuldeepavsar-ufrLHH61TGY/api/funky-pixel-avatars/) provides the users to test the api in realtime directly, so let's start generate our avatars.


##### 1. [Go to API Hub - Free Public & Open Rest APIs | RapidAPI](https://rapidapi.com/hub)


##### 2. Type "funky avatar"
Type funky avatar in the search box and click enter.
![step 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1cjihx73sw3qq2pjza0r.png)


##### 3. Click on funky pixel avatars…
Now we can see the funky avatar api card is visible on search page of rapidAPI let's click on it.
![Step 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zbxr2sakd5vff67fckj1.png)


##### 4. Click on Test Endpoint
Now we're on the page of the funky pixel avatars api let's test it with the default inputs it have, click on the Test Endpoint button to test the API.
![step 4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o85gplbx8lenmf6cgfh4.png)


##### 5. Click on tab
Requset is sent it's a successful request, now go to the Results tab to see the response and you can see it have returned a url and a message that the generate image will be deleted after 15 minutes, so let's copy our URL.
![step 5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/05226ylunuvy85m4rogq.png)

##### 6. Open image URL into new tab
Now as we have copied our avatar url let's open it into new tab.
![step 6](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k5khjngno4rltjwg7d65.png)

##### 7. Now let's change the image extension, uname and gender to generate another avatar

1. Update image format from jpeg to png.
![update image format](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lzeiz1gsfqi5pgkb8ct0.png)


2. Update the gender from male to female
![change gender](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8okjm1exfdeouyc9k4jh.png)


3. Update the uname as well
![update username](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5siixqbyv8mcmsz4dr9i.png)


##### 8. Now Click on Test Endpoint to test the endpoint.
![click on test endpoint](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ngfjg3x920rkeovxud13.png)


##### 9. Now copy the generate URL of you avatar and open it into new table.
Now we have our response again let's copy the URL and open it in new tab.
![copy avatar url](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s7lrk2lw8nzc60xs5g6n.png)

##### 10. Open URL in new tab
![open it](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/31bo2eugg7p4h8y2735m.png)

So as you can see the avatars looks good for both male and female and also provide us to choose which format of image we need so it seems a good api to use for our projects.

API: [Funky Pixel Avatars](https://rapidapi.com/kuldeepavsar-ufrLHH61TGY/api/funky-pixel-avatars/)


_My Personal Blogging Website : [Programming Geeks Club](https://programmingeeksclub.com/)_
_My Facebook Page : [Programming Geeks Club](https://www.facebook.com/profile.php?id=100086258693659)_
_My Telegram Channel : [Programming Geeks Club](https://t.me/dpgcl)_
_My Twitter Account : [Kuldeep Singh](https://twitter.com/kusinghofficial)_
_My Youtube Channel: [Programming Geeks Club](https://youtube.com/@programmingeeksclub)_