ເອກະສານ
ນີ້ແມ່ນ product-facing reference ສຳລັບ public API. identity, tenant, style version, avatar family, style options, size ແລະ WebP output ດຽວກັນຄວນ stable ຕະຫຼອດ 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
Operational Endpoints
GET /healthz ແມ່ນ public ສຳລັບ load balancers ແລະ uptime checks. GET /metrics ແມ່ນ loopback-only ແລະ return 404 ສຳລັບ non-local peers.
Namespace Support
ໃຊ້ tenant ແລະ style_version ເພື່ອແຍກ visual identity spaces ລະຫວ່າງ products ຫຼື 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
Anonymous IDs
ສົ່ງ internal stable id ຫຼື one-way application hash ແທນ raw personal data.
printf '%s' '[email protected]' | sha256sum | cut -d' ' -f1
Rate Limits
Public service ບັງຄັບ origin-side rate limits, ໂດຍມີ limits ເຂັ້ມກວ່າສຳລັບ /v1/avatar/link, direct avatar requests ທີ່ມີ persist=true ແລະ /og.png ເພາະ object storage writes ແລະ Open Graph image rendering ແພງກວ່າ direct rendering.
Timeouts
Avatar generation ແລະ storage operations ຖືກ bounded ໂດຍ server-side timeouts ເພື່ອບໍ່ໃຫ້ expensive requests ຄອບຄອງ origin ແບບບໍ່ຈຳກັດ.
Errors
400: invalid kind, unsupported algorithm ຫຼື format, size, ຫຼື missing identity408: generation ຫຼື storage timeout429: rate limit exceeded500: rendering ຫຼື storage failure
OpenAPI
ສຳລັບ generated clients ຫຼື tooling, ໃຊ້ /docs/openapi.json.