BYTETOOLS

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.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-19

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 2026-08-19, 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
curl 'https://api.dicebear.com/9.x/identicon/svg?seed=bytetools'
JavaScript (fetch)
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);
Python (requests)
import requests

res = requests.get("https://api.dicebear.com/9.x/identicon/svg?seed=bytetools", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
<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:so

Parameters

ParameterTypeRequiredDescription
<style>pathRequiredAvatar style such as identicon, initials, bottts or avataaars. identicon
<format>pathRequiredsvg, png, jpg or webp. svg
seedstringRequiredAny string; the same seed always yields the same avatar. bytetools
backgroundColorstringOptionalHex colours without the hash, comma-separated. b6e3f4
sizeintegerOptionalOutput size in pixels for raster formats. 128
radiusintegerOptionalCorner 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

DiceBear Avatars is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.