Wikatar API

Avatar API

Illustrative media - custom avatars

Wikatar API

Subscribe to our blog to learn how you can integrate with our Storyverse API and dynamically create stories for your users.

The backend of the wikatarMaker can be queried using our REST API. The entry point for every call is always avatarmaker.php and it accepts both GET and POST requests.

Wikatar For MD5 hash

The wikatarMaker can be used as a drop-in replacement for gravatar identicons or similar services. This function can be especially useful in blogs and social websites. Using a simple GET request the backend will generate an avatar based on the provided md5 hash.
The format of the call is the following:

https://wikacy.com/wikatar-maker/avatarmaker.php?size=[SIZE]&md5=[HASH]

Warning

For a given hash, our API will answer always with the same avatar, but if the hash is changed, the generated avatar will change!

GET query string

You can load an avatar with a simple GET request, just like loading a normal image.

There are three GET parameters that control items, colors, and size of the avatar.

avm_items needs to be encoded in a specific format to work properly. Keys and values must be sepated by : and between each pair you must place a |.

layer1:itemname1|layer2:itemname2

avm_colors follows the same rules as avm_items but in this case the values must be hex encoded colors. To avoid errors # must be replaced with 0x like in the example below.

color1:0xffffff|color2:0xffffff

This is an example call to the API:

https://wikacy.com/wikatar-maker/avatarmaker.php?size=1024&avm_items=background:background_1|head:face_1|ears:ears_1|eyebrows:eyebrows_3|eyes:eyes_2|hair:hair_4|mouth:mouth_3|nose:nose_2&avm_colors=background:0x124d32|skin:0xD18A67|hair:0x815128

POST with JSON payload

This is another way of generating the avatar and is equivalent the GET query string. It has the advantage of being able to generate the avatar from a JSON object without requiring to encode it. It may be faster and easier to use in certain contexts. The JSON object must be serialized and sent as the payload of a POST request. The generated avatar will be sent as a response.

An example of the JSON object is the following:

{
    "size":1024,
    "layers":{
        "background": "background_4",
        "ears":"ears_1",
        "head":"face_1",
        "eyebrows":"eyebrows_1",
        "eyes":"eyes_2",
        "nose":"nose_2",
        "mouth":"mouth_5",
        "hair":"hair_8",
        "objects":"a_0"
    },
    "colors":{
        "background":"#A2B4EE",
        "skin":"#EFC0A4",
        "hair":"#FFD900",
        "objects":"#1267df"
    }

}

Custom Avatars

If you are interested in having your own artwork used to create your own avatar maker, please email us at support@wikacy.com and use “Custom Avatar API” in the subject.

Enable Notifications    OK No thanks