The Deterministic Avatar API
Generate beautiful, unique SVG avatars for your users instantly. No signup, no tracking, just names to images.
<img src="https://uavatar.cosmicfi.dev/v1/username" />Try it out
Configuration
The text displayed on the avatar.
Different seed = different colors/shapes.
/v1/CosmicHow it Works
Choose a Name
Use a username, email, or any unique string (e.g., "Alice").
Request the API
Call our endpoint: https://uavatar.cosmicfi.dev/v1/Alice
Get an Avatar
Receive a beautiful, deterministic SVG image instantly.
Why µAvatar?
Deterministic
The same name always generates the exact same avatar. No caching required.
Lightweight
Generates pure SVG code. No external images, no heavy libraries, blazingly fast.
Universal
Works in Node.js, the browser, and any framework (React, Vue, Svelte, etc.).
Beautiful
Uses polished gradients, aesthetic color palettes, and subtle noise textures.
Popular Avatars
Frequently Asked Questions
Is it free to use?
Yes, µAvatar is open source and free to use for personal and commercial projects.
Can I use it offline?
Absolutely. The logic is entirely self-contained and requires no internet connection.
How are colors chosen?
Colors are deterministically generated using a seeded random number generator based on HSL color space.