Usage

Our API is set up to respond only to requests from your specified domain using CORS (Cross-Origin Resource Sharing) validation, ensuring it works exclusively where you need it.

During checkout, you'll provide one production and one development domain where you intend to use the API. we'll create a custom endpoint for you and send an email with further instructions within 24 hours.

With your custom domain, you can start generating avatars using the provided URL.

<img src="{CUSTOM_DOMAIN}?name={NAME}&variant={VARIANT}&size={SIZE}&colors={COLORS}&square=true" crossorigin>

Use the URL in an img tag with the crossorigin property to make sure the request uses CORS headers.

<img src="{CUSTOM_DOMAIN}" crossorigin>

Props

Name

Use the name parameter to generate a unique avatar design. It can be the username, email or any random string.

<img src="{CUSTOM_DOMAIN}?name=Maria%20Mitchell" crossorigin>

Variant

Use the variant parameter to change the theme of the avatar. The available variants are: marble, beam, pixel, sunset, ring and bauhaus.

<img src="{CUSTOM_DOMAIN}?variant=beam" crossorigin>

Size

Use the size parameter to change the size of the avatar.

<img src="{CUSTOM_DOMAIN}?size=240" crossorigin>

Colors

Use the colors parameter to change the color palette of the avatar.

<img src="{CUSTOM_DOMAIN}?colors=264653,2a9d8f,e9c46a,f4a261,e76f51" crossorigin>

Square

Use the square parameter to make the avatar square.

<img src="{CUSTOM_DOMAIN}?square=true" crossorigin>

Random

If you just want to use random avatars without providing usernames, you can use the root endpoint. You will receive an SVG image with a 80*80px size and the marble variant.

<img src="{CUSTOM_DOMAIN}" crossorigin>

If you have any questions or need help, please don't hesitate to contact us.