Avatar Generation
The /avatar endpoint generates deterministic avatar images from a seed string. The same seed always produces the same image, making it useful for consistent user representations.
curl -X GET \ "https://api.moxon.dev/v6/avatar"Send the request to see the response here.
seedstringoptionalDefault:
random UUID.Seed string for deterministic generation — same seed, same image
type"identicon" | "pixel"optionalDefault:
identicon.Avatar type:
identicon(5×5 symmetric grid) orpixel(8×8 grid)format"png" | "svg"optionalDefault:
png.Output format:
pngorsvgsizenumberoptionalDefault:
200.Image size in pixels (50–2000)
bgstringoptionalDefault:
#f0f0f0.Background color in hexadecimal (e.g.
f0f0f0)
By default (format=png), the endpoint returns a direct PNG image (Content-Type: image/png), usable in an <img> tag:
<img src="https://api.moxon.dev/v6/avatar?seed=alice" alt="Avatar" />With format=svg, the response is an inline SVG (Content-Type: image/svg+xml):
<img src="https://api.moxon.dev/v6/avatar?seed=alice&format=svg" alt="Avatar" />- 400
Size must be between 50 and 2000Thesizeparameter is out of the allowed range - 400
Please provide a valid size (&size={50-2000})Thesizeparameter is not a valid number - 400
Type must be one of: identicon, pixelThetypevalue is not valid - 400
Format must be one of: png, svgTheformatvalue is not valid - 400
Invalid color (use hex like ff6600)Thebgcolor is not a valid hexadecimal value
Last updated on September 12, 2026