Skip to content
POST AI agent ready /v1/avatar

Avatar API - Free Identicon Generator

Create deterministic, visually distinct avatars from any string input. Pass a user email, username, or ID, and the API returns a symmetric identicon pattern. The same seed always produces the same image, so you can use it as a consistent default avatar without storing files.

Parameters

stringrequired

Input string used to generate the avatar pattern. Typically an email address or username.

number

Width and height of the output image in pixels.

string

Background color as a CSS color value. Defaults to #f0f0f0 if omitted.

Code examples

curl -X POST https://api.botoi.com/v1/avatar \
  -H "Content-Type: application/json" \
  -d '{"seed":"john@example.com","size":256,"bg_color":"#f0f0f0"}'

When to use this API

Default profile pictures

Assign every new user a unique avatar at signup by passing their email to the API. Users see a colorful identicon instead of a generic grey silhouette, which makes comment threads and member lists visually distinct.

Git commit author icons

Display identicon avatars next to commit messages in a custom Git dashboard. Hash the author email to generate a consistent icon, matching the pattern GitHub and GitLab use for users without profile photos.

Anonymous forum participants

Generate avatars from session IDs or anonymous handles so each participant in a discussion thread has a recognizable visual identity, even without an account.

Frequently asked questions

Does the same seed always produce the same avatar?
Yes. The generation algorithm is deterministic. Passing "john@example.com" today returns the exact same pattern next month. You can rely on this for consistent display without caching the image.
How is this different from Gravatar?
Gravatar requires users to upload a photo to gravatar.com. This API generates a geometric pattern from any string, with no user action required. It works as a standalone default avatar or a Gravatar fallback.
Can I customize the colors?
Colors are derived from the seed string to ensure visual uniqueness. The API does not accept a custom palette. If you need brand-specific colors, fetch the SVG and replace the fill values.
What is the largest size I can request?
You can request up to 512x512 pixels. For SVG output, the image scales to any display size regardless of the size parameter.
Is the seed value stored or logged?
No. The seed is hashed in memory to produce the pattern and discarded. The API does not store, log, or transmit your input to third parties.

Get your API key

Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.