HTTP API: generate SVG avatars via URL
The HTTP API is the simplest way to use DiceBear as a profile picture or avatar placeholder API. It's free and needs no authentication.
Usage
Replace <styleName> with the name of an avatar style. Style names are lowercase, with hyphens for multi-word styles, e.g. lorelei, pixel-art, adventurer-neutral.
https://api.dicebear.com/11.x/<styleName>/svghttps://api.dicebear.com/11.x/pixel-art/svghttps://api.dicebear.com/11.x/lorelei/svgGenerate a consistent avatar from a user ID
Pass a stable identifier such as a user ID as the seed, and every user gets the same avatar on every page and in every session. That makes it a good default for people who haven't uploaded a photo yet.
https://api.dicebear.com/11.x/lorelei/svg?seed=user-8f3a2chttps://api.dicebear.com/11.x/lorelei/svg?seed=user-8f3a2cURL-encode seeds that contain spaces or other special characters.
Info
The avatar styles come from many creators, and each creator chooses the license for their own style. The license overview lists them all in one place.
Listing available styles
The version root returns the available style names as JSON, sorted alphabetically. It exists from 10.x onwards.
https://api.dicebear.com/11.x{
"styles": ["adventurer", "adventurer-neutral", "avataaars", "..."],
"documentation": "https://www.dicebear.com/llms.txt"
}Style definition and options
Each style also has two metadata endpoints, handy for tooling such as avatar editors:
https://api.dicebear.com/11.x/<styleName>/definition.json
https://api.dicebear.com/11.x/<styleName>/options.jsondefinition.json returns the raw style definition, the same JSON the styles package ships. options.json describes every option the style accepts as a query parameter, with field types, allowed enum values, and value ranges. An excerpt for Pixel Art:
{
"seed": { "type": "string" },
"flip": {
"type": "enum",
"values": ["none", "horizontal", "vertical", "both"],
"list": true
},
"backgroundColor": { "type": "color", "list": true },
"hairVariant": {
"type": "enum",
"values": ["long01", "long02", "...", "short24"],
"list": true,
"weighted": true
},
"hairProbability": { "type": "number", "min": 0, "max": 100 }
}Both endpoints exist from 10.x onwards. Self-hosted instances turn them off by default, see the self-hosting guide.
Options
All core options, such as seed, flip, rotate, scale, borderRadius, backgroundColor, and tags, work as query parameters. Style-specific options are listed on each style page.
Warning
The options idRandomization, fontFamily, fontWeight, and title are not supported by our public HTTP API. You can enable them by hosting your own instance.
Array options
Separate array values with commas. Here the seed picks from five hairstyles of Pixel Art:
https://api.dicebear.com/11.x/pixel-art/svg?seed=John&hairVariant=short01,short02,short03,short04,short05https://api.dicebear.com/11.x/pixel-art/svg?seed=Jane&hairVariant=long01,long02,long03,long04,long05The tags filter is an array too. Prefix a tag with ! to exclude it:
https://api.dicebear.com/11.x/adventurer/svg?seed=John&tags=hairLength:long,!facialHairEnum options
Enum values are passed as strings. For example, flip accepts none, horizontal, vertical, or both:
https://api.dicebear.com/11.x/lorelei/svg?flip=horizontalhttps://api.dicebear.com/11.x/lorelei/svg?flip=noneWeighted options
Options marked weighted in options.json also take weights that make some variants rarer than others. Put the weight after each value, separated by a colon. Variants missing from the list are left out. Here one in five critters has a single eye:
https://api.dicebear.com/11.x/critters/svg?seed=Jane&eyesVariant=round:4,mono:1https://api.dicebear.com/11.x/critters/svg?seed=Jack&eyesVariant=round:4,mono:1Animations
Styles that carry animations play them once you set animation=true. animationSpeed sets the pace, and animationDelay shifts the start by seconds. A range such as animationDelay=0,5 gives every seed its own start, so avatars side by side don't move in step. Only the SVG format moves. The raster formats render the resting state.
https://api.dicebear.com/11.x/critters/svg?seed=Jane&animation=trueEvery animation also has a switch, a speed, and a delay named after it, and each wins over the global option. Here only the eyes blink:
https://api.dicebear.com/11.x/critters/svg?seed=Jane&blinkAnimation=trueThe 11.x line is the first one with animations. On 10.x the option is accepted and ignored. The core options list all animation options.
File format
Replace svg in the URL with the format you need:
| Format | Notes |
|---|---|
svg | Recommended. Scales to any size, higher rate limit |
png, jpg, webp, avif | Up to 256 × 256 px, lower rate limit |
json | Returns avatar metadata as JSON instead of an image |
PNG, JPG, WebP, and AVIF render text in Noto Sans with the subsets cyrillic, cyrillic-ext, devanagari, greek, greek-ext, japanese, korean, latin, latin-ext, simplified-chinese, thai, and vietnamese.
https://api.dicebear.com/11.x/bottts/pngVersioning
The version is part of the URL. Replace 11.x with the one you want. Every prefix from 5.x to 11.x still answers, and Supported versions shows how long each one stays that way and which of them the libraries still cover.
Warning
Versions 5.x to 8.x will reach end of life on April 30, 2028. After that date the API shuts them down and the URLs stop working. See the announcement for details.
Fair use & rate limits
Our API is free for non-commercial use, but please use it responsibly. We reserve the right to block abusive users.
Requests are limited to 50 per second for SVG and 10 per second for PNG, JPG, WebP, and AVIF. Above that, the API answers 429 Too Many Requests. We may change these limits at any time without notice.
For commercial use, higher limits, or full control over availability and data privacy, host the API yourself. We're happy to answer questions in the discussions on GitHub.
Changes and availability
We reserve the right to update the API at any time. We try to keep it backwards compatible and to return the same avatar for the same URL, but we can't guarantee either: the design, and even more so the SVG source, may change. We also can't guarantee that the API is always available. If you need consistent access, run your own instance.