DiceBear
App · Images & Design · 7 actions
Turn any seed into an avatar with DiceBear, the free open-source avatar library: give it a user id, an email address or a name and get back a picture in any of sixty-odd styles, from pixel art, illustrated faces and robots to initials, identicons and abstract shapes. The same seed always gives the same avatar, which is what makes it the stand-in for a profile picture nobody has uploaded yet. Build a link to embed, build a whole list of them for a team in one step, download the picture as a file, inline it as a data URI, or read the SVG and every choice the generator made. Every style comes with its creator and licence. No account or API key required.
Actions
| Action | What it does |
|---|---|
| Build an avatar URL | Turn a seed into the address of an avatar in any of DiceBear's styles: pixel art, illustrated faces, robots, initials, identicons, abstract shapes. |
| Build avatar URLs in bulk | Build one avatar link for every seed in a list, all in the same style and look, in the order they were given: a whole team roster, a column of user ids, the authors of today's comments. |
| Download an avatar | Download the avatar for a seed as a file, so a later step can attach it to an email, upload it to storage or post it into a chat. |
| Get an avatar as a data URI | Get the avatar as an inline data URI instead of a link or a file, for somewhere that renders HTML but will not fetch a remote image: an email whose pictures are blocked by default, a self-contained report, a page built by a later step. |
| Get an avatar's details | Get the avatar's SVG markup together with every choice DiceBear made for the seed: which variant of each part was drawn and which colours were used. |
| Get style options | List every option one style takes, straight from DiceBear: the parts of the avatar with the variants each can be drawn with, the colour groups, and the core settings with their bounds. |
| List avatar styles | List every avatar style DiceBear offers, with who drew it, the artwork it is based on, the licence it is under and a preview. |
Build an avatar URL
Turn a seed into the address of an avatar in any of DiceBear's styles: pixel art, illustrated faces, robots, initials, identicons, abstract shapes. The same seed always gives the same avatar, so a user id or an email address becomes a profile picture that stays put. Nothing is downloaded, so this is the cheap way to fill an empty avatar slot, give a record a picture or put a face beside a name in an email. Leave the seed blank for a random avatar. No API key required.
Inputs
- Style
styletextRequired - Which avatar style to draw in, as DiceBear names it: lower case with hyphens, such as pixel-art, lorelei or adventurer-neutral. Pick one from the list, which is fetched from DiceBear, or type a name. The styles come from different artists under different licences; List avatar styles shows every one with its creator and licence.
- Seed
seedtext - Optional. The text the avatar is drawn from: a user id, an email address, a name, anything at all. The same seed always gives the same avatar and a different seed a different one, so pass whatever identifies the person or thing the avatar stands for. Leave it blank and a random seed is drawn and reported, for a fresh avatar every run. The seed travels in the link, so hash an email address first if that matters.
- Format
image_formattext - Optional. The file format. SVG by default, which scales to any size and is what DiceBear recommends. PNG, JPEG, WebP and AVIF are rendered at 128 pixels unless a size is given and at most 256, and DiceBear allows fewer requests a second for them.One of:
svg(SVG (scales to any size, recommended)),png(PNG (up to 256 pixels)),jpg(JPEG (up to 256 pixels, no transparency)),webp(WebP (up to 256 pixels)),avif(AVIF (up to 256 pixels)). Default:svg. - Size
sizenumber - Optional. The avatar's width and height in pixels. Left blank, an SVG scales to wherever it is shown and a raster image is 128 pixels. An SVG takes anything up to 4096; PNG, JPEG, WebP and AVIF take at most 256, which is the largest DiceBear renders.From 1 to 4096.
- Background colour
background_colortext - Optional. One or more background colours as hex, with or without the #, separated by commas: b6e3f4 for one colour, b6e3f4,c0aede,d1d4f9 to let the seed pick one of three, which keeps a long list of avatars varied but on brand. Left blank, the style draws its own background, transparent for most of them.
- Background fill
background_filltext - Optional. How the background colours are painted: one solid colour, which is the default, or a linear or radial gradient between them. A gradient needs at least two colours to blend.One of:
solid,linear(Linear gradient),radial(Radial gradient). Default:solid. - Corner radius
border_radiusnumber - Optional. How rounded the avatar's corners are, as a percentage from 0 to 50. 0 by default, which is a square; 50 is a circle, the usual choice for a profile picture.From 0 to 50. Default:
0. - Rotate
rotatenumber - Optional. Turn the whole avatar by this many degrees, from -360 to 360. 0 by default.From -360 to 360. Default:
0. - Scale
scalenumber - Optional. Grow or shrink the drawing inside its frame, where 1 is the avatar's own size, 0.8 leaves a margin round it and 1.2 crops the edges. Anything from 0 to 10.From 0 to 10. Default:
1. - Flip
fliptext - Optional. Mirror the avatar left to right, turn it upside down, or both. No flip by default.One of:
none(No flip),horizontal(Horizontal (left to right)),vertical(Vertical (upside down)),both. Default:none. - Extra options
extra_optionsobject - Optional. The style's own options, by name: which hairstyles to pick from (hairVariant: short01,short02), whether to draw glasses (glassesProbability: 0), which skin colours to use (skinColor: f2d3b1,ecad80). Separate several values with commas, and add :weight to a variant to make it more likely. Get style options lists every option a style takes, as does its page on dicebear.com. The seed, size, flip, rotation, scale, corner radius and background have fields of their own.
Outputs
background_colorlist- The background colours that were asked for, as bare lower-case hex. Empty means the style drew its own background. With several, the seed picked one.
background_filltext- How the background is filled: solid, linear or radial.
border_radiusnumber- The corner radius that applies, from 0 (square) to 50 (a circle).
content_typetext- The avatar's media type, e.g. image/svg+xml.
fliptext- How the avatar is flipped: none, horizontal, vertical or both.
generated_seedtrue/false- True when the seed was left blank and a random one was drawn here.
image_formattext- The file format the avatar is in: svg, png, jpg, webp or avif.
image_tagtext- The same link as a ready-made HTML img tag with alt text, and a width and height where the size is known, for a step that writes an email body or a web page.
optionsobject- The style's own options that were sent, by name, spelled the way they went into the link: lists joined by commas, weights as name:weight.
rotatenumber- The rotation that applies, in degrees.
scalenumber- The scale that applies, where 1 is the avatar's own size.
seedtext- The seed the avatar was drawn from, after trimming. When the seed was left blank this is the random one that was drawn: keep it to get the same avatar again.
sizenumber- The avatar's width and height in pixels: the size that was asked for, 128 for a raster image that asked for none, and null for an SVG that scales to wherever it is shown.
styletext- The style the avatar was drawn in, e.g. pixel-art.
urltext- The avatar's address on api.dicebear.com. The same seed always renders the same avatar, so it is safe to store on a record and re-render forever.
Example output
{
"background_color": [],
"background_fill": "solid",
"border_radius": 0,
"content_type": "image/svg+xml",
"flip": "none",
"generated_seed": false,
"image_format": "svg",
"image_tag": "<img src=\"https://api.dicebear.com/10.x/pixel-art/svg?seed=Felix\" alt=\"Avatar for Felix\">",
"options": {},
"rotate": 0,
"scale": 1,
"seed": "Felix",
"size": null,
"style": "pixel-art",
"url": "https://api.dicebear.com/10.x/pixel-art/svg?seed=Felix"
}Build avatar URLs in bulk
Build one avatar link for every seed in a list, all in the same style and look, in the order they were given: a whole team roster, a column of user ids, the authors of today's comments. Nothing is downloaded, so a long list costs no more than a short one. No API key required.
Inputs
- Style
styletextRequired - Which avatar style to draw in, as DiceBear names it: lower case with hyphens, such as pixel-art, lorelei or adventurer-neutral. Pick one from the list, which is fetched from DiceBear, or type a name. The styles come from different artists under different licences; List avatar styles shows every one with its creator and licence.
- Seeds
seedslistRequired - The seeds to build avatars for, one avatar each, in the order given. Up to 250 at a time. Wire a list from an earlier step here: a column of user ids, the members of a team, the authors of today's comments. Every entry has to be filled in.
- Format
image_formattext - Optional. The file format. SVG by default, which scales to any size and is what DiceBear recommends. PNG, JPEG, WebP and AVIF are rendered at 128 pixels unless a size is given and at most 256, and DiceBear allows fewer requests a second for them.One of:
svg(SVG (scales to any size, recommended)),png(PNG (up to 256 pixels)),jpg(JPEG (up to 256 pixels, no transparency)),webp(WebP (up to 256 pixels)),avif(AVIF (up to 256 pixels)). Default:svg. - Size
sizenumber - Optional. The avatar's width and height in pixels. Left blank, an SVG scales to wherever it is shown and a raster image is 128 pixels. An SVG takes anything up to 4096; PNG, JPEG, WebP and AVIF take at most 256, which is the largest DiceBear renders.From 1 to 4096.
- Background colour
background_colortext - Optional. One or more background colours as hex, with or without the #, separated by commas: b6e3f4 for one colour, b6e3f4,c0aede,d1d4f9 to let the seed pick one of three, which keeps a long list of avatars varied but on brand. Left blank, the style draws its own background, transparent for most of them.
- Background fill
background_filltext - Optional. How the background colours are painted: one solid colour, which is the default, or a linear or radial gradient between them. A gradient needs at least two colours to blend.One of:
solid,linear(Linear gradient),radial(Radial gradient). Default:solid. - Corner radius
border_radiusnumber - Optional. How rounded the avatar's corners are, as a percentage from 0 to 50. 0 by default, which is a square; 50 is a circle, the usual choice for a profile picture.From 0 to 50. Default:
0. - Rotate
rotatenumber - Optional. Turn the whole avatar by this many degrees, from -360 to 360. 0 by default.From -360 to 360. Default:
0. - Scale
scalenumber - Optional. Grow or shrink the drawing inside its frame, where 1 is the avatar's own size, 0.8 leaves a margin round it and 1.2 crops the edges. Anything from 0 to 10.From 0 to 10. Default:
1. - Flip
fliptext - Optional. Mirror the avatar left to right, turn it upside down, or both. No flip by default.One of:
none(No flip),horizontal(Horizontal (left to right)),vertical(Vertical (upside down)),both. Default:none. - Extra options
extra_optionsobject - Optional. The style's own options, by name: which hairstyles to pick from (hairVariant: short01,short02), whether to draw glasses (glassesProbability: 0), which skin colours to use (skinColor: f2d3b1,ecad80). Separate several values with commas, and add :weight to a variant to make it more likely. Get style options lists every option a style takes, as does its page on dicebear.com. The seed, size, flip, rotation, scale, corner radius and background have fields of their own.
Outputs
avatarslist- One entry per seed, in the order they were given.
background_colorlist- The background colours that were asked for, as bare lower-case hex. Empty means the style drew its own background. With several, the seed picked one.
background_filltext- How the background is filled: solid, linear or radial.
border_radiusnumber- The corner radius that applies, from 0 (square) to 50 (a circle).
content_typetext- The avatar's media type, e.g. image/svg+xml.
countnumber- How many avatars were built.
fliptext- How the avatar is flipped: none, horizontal, vertical or both.
image_formattext- The file format the avatar is in: svg, png, jpg, webp or avif.
optionsobject- The style's own options that were sent, by name, spelled the way they went into the link: lists joined by commas, weights as name:weight.
rotatenumber- The rotation that applies, in degrees.
scalenumber- The scale that applies, where 1 is the avatar's own size.
sizenumber- The avatar's width and height in pixels: the size that was asked for, 128 for a raster image that asked for none, and null for an SVG that scales to wherever it is shown.
styletext- The style the avatar was drawn in, e.g. pixel-art.
urlslist- Just the links, in the same order, for a step that wants the addresses on their own.
Example output
{
"avatars": [
{
"image_tag": "<img src=\"https://api.dicebear.com/10.x/pixel-art/svg?seed=Felix\" alt=\"Avatar for Felix\">",
"seed": "Felix",
"url": "https://api.dicebear.com/10.x/pixel-art/svg?seed=Felix"
}
],
"background_color": [],
"background_fill": "solid",
"border_radius": 0,
"content_type": "image/svg+xml",
"count": 1,
"flip": "none",
"image_format": "svg",
"options": {},
"rotate": 0,
"scale": 1,
"size": null,
"style": "pixel-art",
"urls": [
"https://api.dicebear.com/10.x/pixel-art/svg?seed=Felix"
]
}Download an avatar
Download the avatar for a seed as a file, so a later step can attach it to an email, upload it to storage or post it into a chat. Use this where a link will not do and the file itself has to travel with the message. SVG by default; PNG, JPEG, WebP and AVIF come back up to 256 pixels square. No API key required.
Inputs
- Style
styletextRequired - Which avatar style to draw in, as DiceBear names it: lower case with hyphens, such as pixel-art, lorelei or adventurer-neutral. Pick one from the list, which is fetched from DiceBear, or type a name. The styles come from different artists under different licences; List avatar styles shows every one with its creator and licence.
- Seed
seedtext - Optional. The text the avatar is drawn from: a user id, an email address, a name, anything at all. The same seed always gives the same avatar and a different seed a different one, so pass whatever identifies the person or thing the avatar stands for. Leave it blank and a random seed is drawn and reported, for a fresh avatar every run. The seed travels in the link, so hash an email address first if that matters.
- Format
image_formattext - Optional. The file format. SVG by default, which scales to any size and is what DiceBear recommends. PNG, JPEG, WebP and AVIF are rendered at 128 pixels unless a size is given and at most 256, and DiceBear allows fewer requests a second for them.One of:
svg(SVG (scales to any size, recommended)),png(PNG (up to 256 pixels)),jpg(JPEG (up to 256 pixels, no transparency)),webp(WebP (up to 256 pixels)),avif(AVIF (up to 256 pixels)). Default:svg. - Size
sizenumber - Optional. The avatar's width and height in pixels. Left blank, an SVG scales to wherever it is shown and a raster image is 128 pixels. An SVG takes anything up to 4096; PNG, JPEG, WebP and AVIF take at most 256, which is the largest DiceBear renders.From 1 to 4096.
- Background colour
background_colortext - Optional. One or more background colours as hex, with or without the #, separated by commas: b6e3f4 for one colour, b6e3f4,c0aede,d1d4f9 to let the seed pick one of three, which keeps a long list of avatars varied but on brand. Left blank, the style draws its own background, transparent for most of them.
- Background fill
background_filltext - Optional. How the background colours are painted: one solid colour, which is the default, or a linear or radial gradient between them. A gradient needs at least two colours to blend.One of:
solid,linear(Linear gradient),radial(Radial gradient). Default:solid. - Corner radius
border_radiusnumber - Optional. How rounded the avatar's corners are, as a percentage from 0 to 50. 0 by default, which is a square; 50 is a circle, the usual choice for a profile picture.From 0 to 50. Default:
0. - Rotate
rotatenumber - Optional. Turn the whole avatar by this many degrees, from -360 to 360. 0 by default.From -360 to 360. Default:
0. - Scale
scalenumber - Optional. Grow or shrink the drawing inside its frame, where 1 is the avatar's own size, 0.8 leaves a margin round it and 1.2 crops the edges. Anything from 0 to 10.From 0 to 10. Default:
1. - Flip
fliptext - Optional. Mirror the avatar left to right, turn it upside down, or both. No flip by default.One of:
none(No flip),horizontal(Horizontal (left to right)),vertical(Vertical (upside down)),both. Default:none. - Extra options
extra_optionsobject - Optional. The style's own options, by name: which hairstyles to pick from (hairVariant: short01,short02), whether to draw glasses (glassesProbability: 0), which skin colours to use (skinColor: f2d3b1,ecad80). Separate several values with commas, and add :weight to a variant to make it more likely. Get style options lists every option a style takes, as does its page on dicebear.com. The seed, size, flip, rotation, scale, corner radius and background have fields of their own.
Outputs
background_colorlist- The background colours that were asked for, as bare lower-case hex. Empty means the style drew its own background. With several, the seed picked one.
background_filltext- How the background is filled: solid, linear or radial.
border_radiusnumber- The corner radius that applies, from 0 (square) to 50 (a circle).
byte_sizenumber- The file's size in bytes.
content_typetext- The avatar's media type, e.g. image/svg+xml.
document_reftext- The stored document's reference.
documentslist- The downloaded avatar as a document, ready to attach to a later step.
fliptext- How the avatar is flipped: none, horizontal, vertical or both.
generated_seedtrue/false- True when the seed was left blank and a random one was drawn here.
image_formattext- The file format the avatar is in: svg, png, jpg, webp or avif.
optionsobject- The style's own options that were sent, by name, spelled the way they went into the link: lists joined by commas, weights as name:weight.
rotatenumber- The rotation that applies, in degrees.
scalenumber- The scale that applies, where 1 is the avatar's own size.
seedtext- The seed the avatar was drawn from, after trimming. When the seed was left blank this is the random one that was drawn: keep it to get the same avatar again.
sizenumber- The avatar's width and height in pixels: the size that was asked for, 128 for a raster image that asked for none, and null for an SVG that scales to wherever it is shown.
source_urltext- The avatar's address on api.dicebear.com. The same seed always renders the same avatar, so it is safe to store on a record and re-render forever.
styletext- The style the avatar was drawn in, e.g. pixel-art.
urltext- A URL that serves the stored file.
Example output
{
"background_color": [],
"background_fill": "solid",
"border_radius": 0,
"byte_size": 2148,
"content_type": "image/svg+xml",
"document_ref": "doc_7c2e5b1a9f0d4c3e8a6b2d1f0e9c8b7a",
"documents": [
{
"content_type": "image/svg+xml",
"document_ref": "doc_7c2e5b1a9f0d4c3e8a6b2d1f0e9c8b7a",
"filename": "dicebear-pixel-art-felix.svg",
"size_bytes": 2148,
"url": "/actions/core/serve-document/doc_7c2e5b1a9f0d4c3e8a6b2d1f0e9c8b7a"
}
],
"flip": "none",
"generated_seed": false,
"image_format": "svg",
"options": {},
"rotate": 0,
"scale": 1,
"seed": "Felix",
"size": null,
"source_url": "https://api.dicebear.com/10.x/pixel-art/svg?seed=Felix",
"style": "pixel-art",
"url": "/actions/core/serve-document/doc_7c2e5b1a9f0d4c3e8a6b2d1f0e9c8b7a"
}Get an avatar as a data URI
Get the avatar as an inline data URI instead of a link or a file, for somewhere that renders HTML but will not fetch a remote image: an email whose pictures are blocked by default, a self-contained report, a page built by a later step. An SVG is a few kilobytes of text; keep a raster size small, because the picture travels as text. No API key required.
Inputs
- Style
styletextRequired - Which avatar style to draw in, as DiceBear names it: lower case with hyphens, such as pixel-art, lorelei or adventurer-neutral. Pick one from the list, which is fetched from DiceBear, or type a name. The styles come from different artists under different licences; List avatar styles shows every one with its creator and licence.
- Seed
seedtext - Optional. The text the avatar is drawn from: a user id, an email address, a name, anything at all. The same seed always gives the same avatar and a different seed a different one, so pass whatever identifies the person or thing the avatar stands for. Leave it blank and a random seed is drawn and reported, for a fresh avatar every run. The seed travels in the link, so hash an email address first if that matters.
- Format
image_formattext - Optional. The file format. SVG by default, which scales to any size and is what DiceBear recommends. PNG, JPEG, WebP and AVIF are rendered at 128 pixels unless a size is given and at most 256, and DiceBear allows fewer requests a second for them.One of:
svg(SVG (scales to any size, recommended)),png(PNG (up to 256 pixels)),jpg(JPEG (up to 256 pixels, no transparency)),webp(WebP (up to 256 pixels)),avif(AVIF (up to 256 pixels)). Default:svg. - Size
sizenumber - Optional. The avatar's width and height in pixels. Left blank, an SVG scales to wherever it is shown and a raster image is 128 pixels. An SVG takes anything up to 4096; PNG, JPEG, WebP and AVIF take at most 256, which is the largest DiceBear renders. A data URI carries the picture as text, so a small raster size keeps the value manageable; an SVG is small at any size.From 1 to 4096.
- Background colour
background_colortext - Optional. One or more background colours as hex, with or without the #, separated by commas: b6e3f4 for one colour, b6e3f4,c0aede,d1d4f9 to let the seed pick one of three, which keeps a long list of avatars varied but on brand. Left blank, the style draws its own background, transparent for most of them.
- Background fill
background_filltext - Optional. How the background colours are painted: one solid colour, which is the default, or a linear or radial gradient between them. A gradient needs at least two colours to blend.One of:
solid,linear(Linear gradient),radial(Radial gradient). Default:solid. - Corner radius
border_radiusnumber - Optional. How rounded the avatar's corners are, as a percentage from 0 to 50. 0 by default, which is a square; 50 is a circle, the usual choice for a profile picture.From 0 to 50. Default:
0. - Rotate
rotatenumber - Optional. Turn the whole avatar by this many degrees, from -360 to 360. 0 by default.From -360 to 360. Default:
0. - Scale
scalenumber - Optional. Grow or shrink the drawing inside its frame, where 1 is the avatar's own size, 0.8 leaves a margin round it and 1.2 crops the edges. Anything from 0 to 10.From 0 to 10. Default:
1. - Flip
fliptext - Optional. Mirror the avatar left to right, turn it upside down, or both. No flip by default.One of:
none(No flip),horizontal(Horizontal (left to right)),vertical(Vertical (upside down)),both. Default:none. - Extra options
extra_optionsobject - Optional. The style's own options, by name: which hairstyles to pick from (hairVariant: short01,short02), whether to draw glasses (glassesProbability: 0), which skin colours to use (skinColor: f2d3b1,ecad80). Separate several values with commas, and add :weight to a variant to make it more likely. Get style options lists every option a style takes, as does its page on dicebear.com. The seed, size, flip, rotation, scale, corner radius and background have fields of their own.
Outputs
background_colorlist- The background colours that were asked for, as bare lower-case hex. Empty means the style drew its own background. With several, the seed picked one.
background_filltext- How the background is filled: solid, linear or radial.
border_radiusnumber- The corner radius that applies, from 0 (square) to 50 (a circle).
byte_sizenumber- The picture's size in bytes before encoding. The data URI is roughly a third longer again.
content_typetext- The avatar's media type, e.g. image/svg+xml.
data_uritext- The whole picture as a data:image/svg+xml;base64,... string, ready to use as the src of an img tag.
fliptext- How the avatar is flipped: none, horizontal, vertical or both.
generated_seedtrue/false- True when the seed was left blank and a random one was drawn here.
image_formattext- The file format the avatar is in: svg, png, jpg, webp or avif.
optionsobject- The style's own options that were sent, by name, spelled the way they went into the link: lists joined by commas, weights as name:weight.
rotatenumber- The rotation that applies, in degrees.
scalenumber- The scale that applies, where 1 is the avatar's own size.
seedtext- The seed the avatar was drawn from, after trimming. When the seed was left blank this is the random one that was drawn: keep it to get the same avatar again.
sizenumber- The avatar's width and height in pixels: the size that was asked for, 128 for a raster image that asked for none, and null for an SVG that scales to wherever it is shown.
styletext- The style the avatar was drawn in, e.g. pixel-art.
urltext- The avatar's address on api.dicebear.com. The same seed always renders the same avatar, so it is safe to store on a record and re-render forever.
Example output
{
"background_color": [],
"background_fill": "solid",
"border_radius": 0,
"byte_size": 2148,
"content_type": "image/svg+xml",
"data_uri": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PC9zdmc+",
"flip": "none",
"generated_seed": false,
"image_format": "svg",
"options": {},
"rotate": 0,
"scale": 1,
"seed": "Felix",
"size": null,
"style": "pixel-art",
"url": "https://api.dicebear.com/10.x/pixel-art/svg?seed=Felix"
}Get an avatar's details
Get the avatar's SVG markup together with every choice DiceBear made for the seed: which variant of each part was drawn and which colours were used. The markup can be written straight into a page or an email, and the choices let a step match a card to the avatar's background colour or say what the avatar wears. No API key required.
Inputs
- Style
styletextRequired - Which avatar style to draw in, as DiceBear names it: lower case with hyphens, such as pixel-art, lorelei or adventurer-neutral. Pick one from the list, which is fetched from DiceBear, or type a name. The styles come from different artists under different licences; List avatar styles shows every one with its creator and licence.
- Seed
seedtext - Optional. The text the avatar is drawn from: a user id, an email address, a name, anything at all. The same seed always gives the same avatar and a different seed a different one, so pass whatever identifies the person or thing the avatar stands for. Leave it blank and a random seed is drawn and reported, for a fresh avatar every run. The seed travels in the link, so hash an email address first if that matters.
- Size
sizenumber - Optional. The avatar's width and height in pixels. Left blank, an SVG scales to wherever it is shown and a raster image is 128 pixels. An SVG takes anything up to 4096; PNG, JPEG, WebP and AVIF take at most 256, which is the largest DiceBear renders.From 1 to 4096.
- Background colour
background_colortext - Optional. One or more background colours as hex, with or without the #, separated by commas: b6e3f4 for one colour, b6e3f4,c0aede,d1d4f9 to let the seed pick one of three, which keeps a long list of avatars varied but on brand. Left blank, the style draws its own background, transparent for most of them.
- Background fill
background_filltext - Optional. How the background colours are painted: one solid colour, which is the default, or a linear or radial gradient between them. A gradient needs at least two colours to blend.One of:
solid,linear(Linear gradient),radial(Radial gradient). Default:solid. - Corner radius
border_radiusnumber - Optional. How rounded the avatar's corners are, as a percentage from 0 to 50. 0 by default, which is a square; 50 is a circle, the usual choice for a profile picture.From 0 to 50. Default:
0. - Rotate
rotatenumber - Optional. Turn the whole avatar by this many degrees, from -360 to 360. 0 by default.From -360 to 360. Default:
0. - Scale
scalenumber - Optional. Grow or shrink the drawing inside its frame, where 1 is the avatar's own size, 0.8 leaves a margin round it and 1.2 crops the edges. Anything from 0 to 10.From 0 to 10. Default:
1. - Flip
fliptext - Optional. Mirror the avatar left to right, turn it upside down, or both. No flip by default.One of:
none(No flip),horizontal(Horizontal (left to right)),vertical(Vertical (upside down)),both. Default:none. - Extra options
extra_optionsobject - Optional. The style's own options, by name: which hairstyles to pick from (hairVariant: short01,short02), whether to draw glasses (glassesProbability: 0), which skin colours to use (skinColor: f2d3b1,ecad80). Separate several values with commas, and add :weight to a variant to make it more likely. Get style options lists every option a style takes, as does its page on dicebear.com. The seed, size, flip, rotation, scale, corner radius and background have fields of their own.
Outputs
background_colorlist- The background colours that were asked for, as bare lower-case hex. Empty means the style drew its own background. With several, the seed picked one.
background_filltext- How the background is filled: solid, linear or radial.
border_radiusnumber- The corner radius that applies, from 0 (square) to 50 (a circle).
byte_sizenumber- The size of the markup in bytes.
content_typetext- The avatar's media type, e.g. image/svg+xml.
fliptext- How the avatar is flipped: none, horizontal, vertical or both.
generated_seedtrue/false- True when the seed was left blank and a random one was drawn here.
image_formattext- The file format the avatar is in: svg, png, jpg, webp or avif.
optionsobject- The style's own options that were sent, by name, spelled the way they went into the link: lists joined by commas, weights as name:weight.
resolved_option_nameslist- The names of the resolved options, sorted, for a step that wants to loop over them.
resolved_optionsobject- Every option DiceBear resolved for the seed, by name: the seed, the variant of each part such as hairVariant, and the colour of each group such as skinColor, as bare hex. Which names appear depends on the style.
rotatenumber- The rotation that applies, in degrees.
scalenumber- The scale that applies, where 1 is the avatar's own size.
seedtext- The seed the avatar was drawn from, after trimming. When the seed was left blank this is the random one that was drawn: keep it to get the same avatar again.
sizenumber- The avatar's width and height in pixels: the size that was asked for, 128 for a raster image that asked for none, and null for an SVG that scales to wherever it is shown.
styletext- The style the avatar was drawn in, e.g. pixel-art.
svgtext- The avatar as SVG markup, ready to write into a page or an email body where no image can be fetched.
urltext- The avatar's address on api.dicebear.com. The same seed always renders the same avatar, so it is safe to store on a record and re-render forever.
Example output
{
"background_color": [],
"background_fill": "solid",
"border_radius": 0,
"byte_size": 178,
"content_type": "image/svg+xml",
"flip": "none",
"generated_seed": false,
"image_format": "svg",
"options": {},
"resolved_option_names": [
"backgroundColor",
"borderRadius",
"eyesVariant",
"flip",
"hairColor",
"hairVariant",
"mouthVariant",
"rotate",
"scale",
"seed",
"skinColor"
],
"resolved_options": {
"backgroundColor": "b6e3f4",
"borderRadius": 0,
"eyesVariant": "variant03",
"flip": "none",
"hairColor": "28150a",
"hairVariant": "short04",
"mouthVariant": "happy05",
"rotate": 0,
"scale": 1,
"seed": "Felix",
"skinColor": "b68655"
},
"rotate": 0,
"scale": 1,
"seed": "Felix",
"size": null,
"style": "pixel-art",
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" shape-rendering=\"crispEdges\"><rect width=\"16\" height=\"16\" fill=\"#b6e3f4\"/><path d=\"M6 4h4v1H6z\" fill=\"#28150a\"/></svg>",
"url": "https://api.dicebear.com/10.x/pixel-art/svg?seed=Felix"
}Get style options
List every option one style takes, straight from DiceBear: the parts of the avatar with the variants each can be drawn with, the colour groups, and the core settings with their bounds. Read this to see what the Extra options field can say for a style, to pick a hairstyle by name, or to build a chooser. No API key required.
Inputs
- Style
styletextRequired - Which avatar style to draw in, as DiceBear names it: lower case with hyphens, such as pixel-art, lorelei or adventurer-neutral. Pick one from the list, which is fetched from DiceBear, or type a name. The styles come from different artists under different licences; List avatar styles shows every one with its creator and licence.
Outputs
categorytext- Which group the style belongs to: characters, minimalist or scenes. Null for a style added since this list was written.
color_countnumber- How many colour groups there are.
colorslist- The colour groups of the avatar, each with the options that set it.
component_countnumber- How many parts the avatar has.
componentslist- The parts of the avatar, each with the variants it can be drawn with.
creatortext- Who drew the style, or null when not known here.
creator_urltext- The creator's own page, or null.
licensetext- The licence the artwork is under, e.g. CC BY 4.0 or CC0 1.0, or null when not known here. CC BY asks for a credit where the avatars are shown.
license_urltext- The licence's own page, or null.
nametext- The style's name as the API spells it, e.g. pixel-art. This is what the Style field takes.
option_countnumber- How many options the style takes.
option_nameslist- The name of every option the style takes, sorted.
optionsobject- Every option by name, as DiceBear describes it: its type, the values an enum allows, the bounds of a number or range, and whether it takes a list.
page_urltext- The style's page on dicebear.com, with every option it takes.
preview_urltext- An SVG avatar in the style, for a seed of Felix.
sourcetext- The name of the artwork the style is based on, or null.
source_urltext- Where that artwork lives, or null.
titletext- The style's name as a person would write it, e.g. Pixel Art.
urltext- The address the options were read from.
Example output
{
"category": "characters",
"color_count": 3,
"colors": [
{
"color_option": "hairColor",
"contrast_to": null,
"fill_option": "hairColorFill",
"name": "hair"
},
{
"color_option": "skinColor",
"contrast_to": null,
"fill_option": "skinColorFill",
"name": "skin"
},
{
"color_option": "backgroundColor",
"contrast_to": null,
"fill_option": "backgroundColorFill",
"name": "background"
}
],
"component_count": 1,
"components": [
{
"name": "hair",
"probability_option": "hairProbability",
"variant_count": 4,
"variant_option": "hairVariant",
"variants": [
"long01",
"long02",
"short01",
"short02"
],
"weighted": true
}
],
"creator": "DiceBear",
"creator_url": "https://www.dicebear.com",
"license": "CC0 1.0",
"license_url": "https://creativecommons.org/publicdomain/zero/1.0/",
"name": "pixel-art",
"option_count": 13,
"option_names": [
"backgroundColor",
"backgroundColorFill",
"borderRadius",
"flip",
"hairColor",
"hairColorFill",
"hairProbability",
"hairVariant",
"scale",
"seed",
"size",
"skinColor",
"skinColorFill"
],
"options": {
"backgroundColor": {
"list": true,
"type": "color"
},
"backgroundColorFill": {
"list": true,
"type": "enum",
"values": [
"solid",
"linear",
"radial"
]
},
"borderRadius": {
"max": 50,
"min": 0,
"type": "range"
},
"flip": {
"list": true,
"type": "enum",
"values": [
"none",
"horizontal",
"vertical",
"both"
]
},
"hairColor": {
"list": true,
"type": "color"
},
"hairColorFill": {
"list": true,
"type": "enum",
"values": [
"solid",
"linear",
"radial"
]
},
"hairProbability": {
"max": 100,
"min": 0,
"type": "number"
},
"hairVariant": {
"list": true,
"type": "enum",
"values": [
"long01",
"long02",
"short01",
"short02"
],
"weighted": true
},
"scale": {
"max": 10,
"min": 0,
"type": "range"
},
"seed": {
"type": "string"
},
"size": {
"max": 4096,
"min": 1,
"type": "number"
},
"skinColor": {
"list": true,
"type": "color"
},
"skinColorFill": {
"list": true,
"type": "enum",
"values": [
"solid",
"linear",
"radial"
]
}
},
"page_url": "https://www.dicebear.com/styles/pixel-art/",
"preview_url": "https://api.dicebear.com/10.x/pixel-art/svg?seed=Felix",
"source": "Pixel Art",
"source_url": "https://www.figma.com/community/file/1198754108850888330",
"title": "Pixel Art",
"url": "https://api.dicebear.com/10.x/pixel-art/options.json"
}List avatar styles
List every avatar style DiceBear offers, with who drew it, the artwork it is based on, the licence it is under and a preview. The names come from DiceBear itself, so a style added upstream shows up here. Read this to offer someone the choice, to pick a style by name, or to print the credit a CC BY style asks for wherever its avatars are shown. Keep only the characters, the minimalist styles or the scenes. No API key required.
Inputs
- Category
categorytext - Optional. Keep only the styles in one group, the way DiceBear's own style overview groups them: characters (faces, people, robots and creatures), minimalist (initials, identicons, shapes and patterns) or scenes (planets, landscapes and constellations). Every style by default.One of:
any(Every style),characters(Characters (faces, people, robots, creatures)),minimalist(Minimalist (initials, identicons, shapes, patterns)),scenes(Scenes (planets, landscapes, constellations)). Default:any.
Outputs
api_versiontext- The version of the DiceBear API the links point at, e.g. 10.x.
categorytext- The category the list was kept to, or null for every style.
countnumber- How many styles are in the list.
documentation_urltext- Where the API is documented.
formatslist- The file formats an avatar can come back in.
licenses_urltext- DiceBear's own overview of every style's licence.
raster_max_sizenumber- The largest width or height DiceBear renders a PNG, JPEG, WebP or AVIF at, in pixels.
styleslist- The styles, in alphabetical order, each with the name the Style field expects.
totalnumber- How many styles DiceBear offers in all, before any category filter.
Example output
{
"api_version": "10.x",
"category": "scenes",
"count": 3,
"documentation_url": "https://www.dicebear.com/how-to-use/http-api/",
"formats": [
"svg",
"png",
"jpg",
"webp",
"avif"
],
"licenses_url": "https://www.dicebear.com/licenses/",
"raster_max_size": 256,
"styles": [
{
"category": "scenes",
"creator": "DiceBear",
"creator_url": "https://www.dicebear.com",
"license": "CC0 1.0",
"license_url": "https://creativecommons.org/publicdomain/zero/1.0/",
"name": "constellation",
"page_url": "https://www.dicebear.com/styles/constellation/",
"preview_url": "https://api.dicebear.com/10.x/constellation/svg?seed=Felix",
"source": "Constellation",
"source_url": "https://www.dicebear.com",
"title": "Constellation"
},
{
"category": "scenes",
"creator": "DiceBear",
"creator_url": "https://www.dicebear.com",
"license": "CC0 1.0",
"license_url": "https://creativecommons.org/publicdomain/zero/1.0/",
"name": "landscape",
"page_url": "https://www.dicebear.com/styles/landscape/",
"preview_url": "https://api.dicebear.com/10.x/landscape/svg?seed=Felix",
"source": "Landscape",
"source_url": "https://www.dicebear.com",
"title": "Landscape"
},
{
"category": "scenes",
"creator": "DiceBear",
"creator_url": "https://www.dicebear.com",
"license": "CC0 1.0",
"license_url": "https://creativecommons.org/publicdomain/zero/1.0/",
"name": "planets",
"page_url": "https://www.dicebear.com/styles/planets/",
"preview_url": "https://api.dicebear.com/10.x/planets/svg?seed=Felix",
"source": "Planets",
"source_url": "https://www.dicebear.com",
"title": "Planets"
}
],
"total": 61
}