DiceBear Avatars API
Free avatar generator API with no key: deterministic SVG or PNG avatars from any seed, in 30+ styles with customisable colours. Tested curl example.
Endpoint tested and returned HTTP 200 on 19 Aug 2026
What is the DiceBear Avatars API?
DiceBear is a free, key-free avatar generation API that produces a deterministic avatar image from any seed string, in more than 30 visual styles, delivered as SVG or raster formats.
DiceBear solves the default-avatar problem properly. Pass any seed — a user id, email hash or username — and you get back a distinctive avatar that is identical every time for that seed, so users keep the same picture across sessions and devices without you storing anything.
Thirty-plus styles are available, from geometric identicons to illustrated characters, and each supports customisation of colours, features and background through query parameters. The default SVG output scales cleanly and is tiny.
Quick facts
- Base URL
https://api.dicebear.com/9.x- Authentication
- No API key required.
- Rate limit
- No published limit; responses are heavily cacheable and can be self-hosted.
- Pricing
- Free and open source. Individual avatar styles carry their own licences — check attribution requirements per style.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the DiceBear Avatars API
Every request below was executed against the live API on 19 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Generate a deterministic avatar
GET https://api.dicebear.com/9.x/identicon/svg?seed=bytetools
curl 'https://api.dicebear.com/9.x/identicon/svg?seed=bytetools'const res = await fetch("https://api.dicebear.com/9.x/identicon/svg?seed=bytetools");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.dicebear.com/9.x/identicon/svg?seed=bytetools", timeout=20)
res.raise_for_status()
print(res.json())<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 5 5" fill="none" shape-rendering="crispEdges"><metadata xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"><rdf:RDF><rdf:Description><dc:title>Identicon</dc:title><dc:creator>DiceBear</dc:creator><dc:soParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
<style> | path | Required | Avatar style such as identicon, initials, bottts or avataaars. identicon |
<format> | path | Required | svg, png, jpg or webp. svg |
seed | string | Required | Any string; the same seed always yields the same avatar. bytetools |
backgroundColor | string | Optional | Hex colours without the hash, comma-separated. b6e3f4 |
size | integer | Optional | Output size in pixels for raster formats. 128 |
radius | integer | Optional | Corner rounding, 0-50. 50 |
Response fields
(SVG or image)image- The response body is the avatar itself, not JSON. SVG is text and can be inlined directly.
What you can build with the DiceBear Avatars API
- Generate consistent default avatars for users without uploads
- Create placeholder profile pictures in design mockups
- Produce deterministic team or project icons from a name
- Avoid storing avatar images entirely — regenerate from the seed
Common errors and how to fix them
404
Unknown style or format in the path.
Fix: Check the style list in the docs; the version segment (9.x) is also required.
Different avatar than expected
The seed changed, or you used a different style.
Fix: Avatars are deterministic per style+seed pair — the same seed in a different style looks completely different.
Colours ignored
Hex values include a # character.
Fix: Pass colours without the hash, e.g. backgroundColor=b6e3f4.
DiceBear Avatars API — frequently asked questions
Is DiceBear free?
Yes, the API is free with no key and the project is open source. Individual avatar styles have their own licences, some requiring attribution — check the style you use.
Are the avatars always the same for the same user?
Yes. Avatars are deterministic: the same seed and style always produce an identical image, so you can regenerate rather than store them.
Can I use it for user profile pictures?
Yes, that is the main use case. Seed it with a user id or hashed email so each user gets a stable, distinctive default avatar.
Can I self-host DiceBear?
Yes. It is open source and available as an npm package, which is worth doing if you generate avatars at high volume.
Tools that pair with this API
Image Cropper
Crop images online to an exact rectangle with pixel-precise x, y, width and height inputs or aspect-ratio presets. Free, private and browser-based.
Color Picker
Pick any color and get its HEX, RGB and HSL values instantly. Free online color picker with shades, tints and one-click copy for designers and developers.
Alternatives to DiceBear Avatars API
If DiceBear Avatars does not fit, these photography & design apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| Metropolitan Museum of Art | Free Metropolitan Museum of Art API with no key: 470,000+ artworks with high-resolution public-domain images, artist data and full object metadata. Tested. | No key | No | 19 Aug 2026 |
| Art Institute of Chicago | Free Art Institute of Chicago API with no key: 130,000+ artworks with IIIF images, colour data, artist info and rich metadata. Well documented. Tested example. | No key | Yes | 19 Aug 2026 |
| Cleveland Museum of Art | Free Cleveland Museum of Art API with no key: 60,000+ artworks with open-access images, provenance, exhibition history and full metadata. Tested curl example. | No key | No | 19 Aug 2026 |
| RoboHash | Free RoboHash API with no key: unique robot, monster, cat or human avatars generated deterministically from any text. Just a URL, no JSON. Tested example. | No key | Yes | 19 Aug 2026 |
| DummyImage | Free placeholder image API with no key: any size, custom background and text colours, custom caption, PNG, GIF or JPG — all from the URL. Tested example included. | No key | Yes | 21 Aug 2026 |
| Icon Horse | Free favicon API with no key: fetches the highest-quality icon for any domain and always returns something, generating a letter-mark fallback when a site has none. Tested example included. | No key | Yes | 21 Aug 2026 |
DiceBear Avatars is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 19 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.