Dokumentace
Toto je product-facing reference pro public API. Stejné identity, tenant, style version, avatar family, style options, size a WebP output mají zůstat stabilní v rámci 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>/webp: path-style public avatar URLGET /docs/openapi.json: machine-readable API description
Provozní Endpointy
GET /healthz je public pro load balancers a uptime checks. GET /metrics je loopback-only a vrací 404 pro non-local peers.
Namespace Podpora
Použijte tenant a style_version, abyste oddělili visual identity spaces mezi produkty nebo rollout fázemi.
GET https://hashavatar.app/v1/[email protected]&tenant=acme&style_version=v2&algorithm=sha512&kind=wizard&background=white&accessory=hat&color=deep-sea-blue&expression=cool&shape=squircle&format=webp&size=256
Anonymní ID
Posílejte internal stable id nebo one-way application hash místo raw personal data.
printf '%s' '[email protected]' | sha256sum | cut -d' ' -f1
Rate Limity
Public service používá origin-side rate limits, s přísnějšími limity pro /v1/avatar/link, direct avatar requests s persist=true a /og.png, protože object storage writes a Open Graph image rendering jsou dražší než direct rendering.
Timeouts
Avatar generation a storage operations jsou omezeny server-side timeouts, aby drahé požadavky nemohly neomezeně monopolizovat origin.
Chyby
400: neplatný kind, unsupported algorithm nebo format, size nebo missing identity408: generation nebo storage timeout429: rate limit exceeded500: rendering nebo storage failure
OpenAPI
Pro generated clients nebo tooling použijte /docs/openapi.json.