Adorable Avatars

Adorable Avatars

Development

Adorable Cartoon Avatars is an avatar placeholder service for web developers and designers.

Visit API

πŸ“š Documentation & Examples

Everything you need to integrate with Adorable Avatars

πŸš€ Quick Start Examples

Adorable Avatars Javascript Examplejavascript
// Adorable Avatars API Example
const response = await fetch('http://avatars.adorable.io', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Adorable Avatars Public API - Generate Unique Avatars for Your Applications

Adorable Avatars is a public API that helps you generate unique avatars for your applications. The API is simple to use and requires no authentication or registration. Simply make use of the API endpoint and specify a unique identifier, and the API will generate a unique avatar for you.

How to Use the Adorable Avatars Public API

Basic Usage

To use the Adorable Avatars public API, include the following endpoint in your code:

https://api.adorable.io/avatars/[size]/[identifier].png

Replace [size] with the desired size of the avatar (max size 512). Replace [identifier] with a unique identifier that represents the user or entity for which you want to generate the avatar.

For example:

const avatarImg = document.createElement('img');
const identifier = 'johndoe';

avatarImg.src = `https://api.adorable.io/avatars/256/${identifier}.png`;

document.body.appendChild(avatarImg);

This code creates a new img element, specifies an identifier of "johndoe", sets the src attribute to the Adorable Avatars API endpoint, and adds the img element to the DOM.

Avatar Shapes

By default, the Adorable Avatars API will generate rounded avatars. If you want to generate avatars with different shapes, simply append /shape to the endpoint https://api.adorable.io/avatars/[size]/[identifier].png.

For example, to generate an avatar with a square shape, use:

const avatarImg = document.createElement('img');
const identifier = 'janedoe';

avatarImg.src = `https://api.adorable.io/avatars/256/${identifier}/square.png`;

document.body.appendChild(avatarImg);

Avatar Colors

You can also specify a custom background color for your avatars. To do this, append /[color] to the endpoint https://api.adorable.io/avatars/[size]/[identifier].png.

For example, to generate an avatar with a blue background, use:

const avatarImg = document.createElement('img');
const identifier = 'janedoe';

avatarImg.src = `https://api.adorable.io/avatars/256/${identifier}/blue.png`;

document.body.appendChild(avatarImg);

Avatar Sets

In addition to generating avatars using unique identifiers, Adorable Avatars also allows you to generate sets of avatars. To do this, append /set/[set_number] to the endpoint https://api.adorable.io/avatars/[size]/[identifier].png.

For example, to generate a set of 10 avatars in random colors, use:

for (let i = 1; i <= 10; i++) {
    const avatarImg = document.createElement('img');
    avatarImg.src = `https://api.adorable.io/avatars/256/set${i}.png`;

    document.body.appendChild(avatarImg);
}

Conclusion

The Adorable Avatars public API is a simple and effective way to generate unique avatars for your applications. By leveraging the API's endpoint and various optional parameters, you can customize and generate avatars in a variety of styles and colors to fit your application's needs.

πŸ“Š 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

May 31Jun 2Jun 4Jun 6Jun 8Jun 10Jun 12Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 2904008001440Minutes
Online
Offline

Related APIs in Development