API Reference

Documentazione

Chesta è 'a product-facing reference p' 'o public API. Stessa identity, tenant, style version, avatar family, style options, size e WebP output so' pensate pe' restà stabile dint'a nu major release.

Core Endpoints

  • GET /v1/avatar: returns an avatar asset directly
  • GET /v1/avatar/link: stores the generated avatar in configured object storage and returns signed-link metadata
  • GET /avatar/<kind>/<identity>/webp: path-style public avatar URL
  • GET /docs/openapi.json: machine-readable API description

Endpoint Operative

GET /healthz è public pe' load balancers e uptime checks. GET /metrics è loopback-only e torna 404 pe' non-local peers.

Supporto Namespace

Usa tenant e style_version pe' tené visual identity spaces separate tra prodotte o rollout phases.

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

ID Anonime

Manna internal stable id o one-way application hash invece 'e raw personal data.

printf '%s' '[email protected]' | sha256sum | cut -d' ' -f1

Rate Limits

'O public service applica origin-side rate limits, cu limiti cchiù strette pe' /v1/avatar/link, direct avatar requests cu persist=true e /og.png, pecché object storage writes e Open Graph image rendering costano cchiù assaje 'e direct rendering.

Timeouts

Avatar generation e storage operations so' limitate da server-side timeouts, accussì richieste costose nun ponno monopolizzà 'o origin senza fine.

Errori

  • 400: kind non valido, unsupported algorithm o format, size o missing identity
  • 408: generation o storage timeout
  • 429: rate limit exceeded
  • 500: rendering o storage failure

OpenAPI

Pe' generated clients o tooling, usa /docs/openapi.json.