API reference

ডকুমেন্টেশন

এটি public API-এর product-facing reference। একই identity, tenant, style version, avatar family, style options, size এবং WebP output major version-এর মধ্যে stable থাকার জন্য intended।

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

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-এর বদলে stable internal 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 rendering direct rendering-এর চেয়ে ব্যয়বহুল।

Timeouts

Avatar generation এবং storage operations server-side timeouts দিয়ে bounded, যাতে expensive requests origin অনির্দিষ্টকালের জন্য দখল করতে না পারে।

Errors

  • 400: invalid kind, unsupported algorithm বা format, size, অথবা missing identity
  • 408: generation বা storage timeout
  • 429: rate limit exceeded
  • 500: rendering বা storage failure

OpenAPI

Generated clients বা tooling-এর জন্য ব্যবহার করুন /docs/openapi.json.