{
"openapi": "3.1.0",
"info": {
"title": "blobatar",
"version": "2.7.0",
"summary": "Deterministic geometric avatars over HTTP.",
"description": "One route renders an SVG avatar from any string â a username, a display name, an email, an id, or a Gravatar digest. The same name always renders the same blobatar within a generation, so a URL is a stable identity for a person and needs no storage behind it.\n\nReach for it when an application needs an avatar for somebody who has not uploaded one, when it needs a deterministic placeholder that will not change between page loads, or as a drop-in for Gravatar: swap the host and keep the rest of the URL.\n\nNo authentication, no accounts, no rate limit to negotiate. Responses are cacheable and safe to hotlink from an `` tag.",
"license": {
"name": "MIT",
"identifier": "MIT"
},
"contact": {
"name": "blobatar issues",
"url": "https://github.com/Alain00/blobatar/issues"
}
},
"externalDocs": {
"description": "Endpoint documentation",
"url": "https://blobatar.dev/docs"
},
"servers": [
{
"url": "https://blobatar.dev"
}
],
"security": [],
"paths": {
"/avatar/{name}": {
"get": {
"operationId": "getAvatar",
"summary": "Render an avatar for a name",
"description": "Returns an SVG document. Names are NFC-normalized, trimmed and lowercased before hashing, so /avatar/Alain and /avatar/alain render the same blobatar â prefer one spelling, since each is cached separately. Responses carry an ETag and may be revalidated with If-None-Match.",
"parameters": [
{
"name": "name",
"in": "path",
"required": true,
"description": "Anything that stands for somebody: a username, an email, an id, a Gravatar hash. 256 characters or fewer after percent-decoding. A name containing a slash must be percent-encoded as %2F.",
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"example": "[email protected]"
},
{
"name": "size",
"in": "query",
"description": "Pixel size of the rendered SVG, 8â1024. Clamped into range rather than rejected, because a blobatar at the wrong scale is fixable with CSS and a 400 is a broken image. Omit to let the consumer size it.",
"required": false,
"schema": {
"type": "integer",
"minimum": 8,
"maximum": 1024
}
},
{
"name": "s",
"in": "query",
"description": "Gravatar's spelling of `size`, accepted so that moving an integration here is a host edit. Wins if both are present.",
"required": false,
"schema": {
"type": "integer",
"minimum": 8,
"maximum": 1024
}
},
{
"name": "background",
"in": "query",
"description": "Shape drawn behind the body. Omit or pass `none` for a transparent backdrop, which is the default â the body is the blobatar.",
"required": false,
"schema": {
"type": "string",
"enum": [
"none",
"square",
"circle",
"squircle"
]
}
},
{
"name": "hue",
"in": "query",
"description": "Locks the colour in degrees, 0â360, so the name drives shape only. 360 is accepted alongside 0: hue is a circle and callers compute into it.",
"required": false,
"schema": {
"type": "number",
"minimum": 0,
"maximum": 360
}
},
{
"name": "tone",
"in": "query",
"description": "Locks the swatch as a 0â1 position in the tone set, pale to ink. The bands are half-open, so an exact 1 sits on the top edge and renders as 0 â pass 0.999 for ink.",
"required": false,
"schema": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
{
"name": "expression",
"in": "query",
"description": "A pose the blobatar holds. Decorative: it never adds a mark, so it does not reach assistive technology and does not change the accessible name.",
"required": false,
"schema": {
"type": "string",
"enum": [
"idle",
"happy",
"sad",
"mad",
"surprised",
"wink",
"sleepy",
"smug",
"unsure",
"scared",
"love",
"shy",
"sick",
"thinking"
],
"default": "idle"
}
},
{
"name": "title",
"in": "query",
"description": "Accessible name, 128 characters or fewer. Emitted as a