Integration Guide

Help

Use hashavatar.app directly from the browser, your frontend, or your backend. Every avatar URL is deterministic, so the same identifier and options always produce the same result.

Basic URL

Use the query endpoint when you want a simple public image URL.

https://hashavatar.app/v1/[email protected]&kind=robot&background=white&format=webp&size=256

Path Style URL

Use the path form if you prefer cleaner embed URLs.

https://hashavatar.app/avatar/fox/[email protected]/svg

HTML Example

<img
  src="https://hashavatar.app/v1/[email protected]&kind=monster&background=themed&format=webp&size=256"
  alt="Alice avatar"
/>

JavaScript Example

const avatarUrl = new URL("https://hashavatar.app/v1/avatar");
avatarUrl.search = new URLSearchParams({
  id: user.email,
  kind: "robot",
  background: "white",
  format: "webp",
  size: "256",
}).toString();

Supported Parameters

  • id: any stable identifier such as an email, username, or internal user id
  • tenant: optional namespace partition for multi-tenant apps
  • style_version: optional style namespace such as v2
  • kind: cat, dog, robot, fox, alien, monster, ghost, slime, bird, wizard, skull, or paws
  • background: themed or white
  • format: webp, png, or svg
  • size: from 64 up to 1024

Signed Storage Links

If this deployment has object storage configured, request a presigned storage link from /v1/avatar/link. That endpoint stores the generated object and returns JSON with the signed URL and object key.

GET https://hashavatar.app/v1/avatar/[email protected]&kind=robot&background=white&format=webp&size=256

Open Source

The public site source lives in the repository and the reusable rendering crate is published on crates.io.