दस्तऐवज
हे public API साठी product-facing reference आहे. समान identity, tenant, style version, avatar family, style options, size आणि WebP output major release मध्ये stable राहावेत अशी अपेक्षा आहे.
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 load balancers आणि uptime checks साठी public आहे. GET /metrics loopback-only आहे आणि non-local peers साठी 404 परत करतो.
Namespace Support
products किंवा rollout phases मध्ये visual identity spaces वेगळे ठेवण्यासाठी tenant आणि style_version वापरा.
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
raw personal data ऐवजी internal stable id किंवा one-way application hash पाठवा.
printf '%s' '[email protected]' | sha256sum | cut -d' ' -f1
Rate Limits
Public service origin-side rate limits लागू करते; /v1/avatar/link, persist=true असलेले direct avatar requests आणि /og.png यावर कडक limits आहेत कारण object storage writes आणि Open Graph image rendering direct rendering पेक्षा महाग आहेत.
Timeouts
Avatar generation आणि storage operations server-side timeouts ने bounded आहेत, जेणेकरून महाग requests origin indefinitely monopolize करू शकणार नाहीत.
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.