Docs
This is the product-facing reference for the public API. The same identity, tenant, style version, kind, background, size, and format are intended to remain stable within a major release.
Core Endpoints
GET /v1/avatar: returns an avatar asset directlyGET /v1/avatar/link: stores the generated avatar in configured object storage and returns signed-link metadataGET /avatar/<kind>/<identity>/<format>: path-style public avatar URLGET /docs/openapi.json: machine-readable API descriptionGET /metrics: basic runtime counters
Namespace Support
Use tenant and style_version to keep visual identity spaces separate between products or rollout phases.
GET https://hashavatar.app/v1/avatar?id=user-42&tenant=acme&style_version=v2&kind=wizard&background=white&format=webp&size=256
Anonymous IDs
Prefer sending an internal stable id or a one-way application hash instead of a raw email when privacy matters.
id = sha256(lowercase(email))
Rate Limits
The public service applies origin-side rate limits, with stricter limits on /v1/avatar/link because object storage writes are more expensive than direct rendering.
Timeouts
Avatar generation and storage operations are bounded by server-side timeouts so expensive requests cannot monopolize the origin indefinitely.
Errors
400: invalid kind, format, size, or missing identity408: generation or storage timeout429: rate limit exceeded500: rendering or storage failure
OpenAPI
For generated clients or tooling, use /docs/openapi.json.