← All endpoints / avatar

πŸ§‘GET /avatar

Deterministic generated avatar images.

curl -s "https://freeforagents.dev/avatar?seed=ada.lovelace@math.org&style=identicon"
const res = await fetch("https://freeforagents.dev/avatar?seed=ada.lovelace@math.org&style=identicon");
const data = await res.json();
console.log(data);
import requests

r = requests.get(
    "https://freeforagents.dev/avatar",
    params={
    "seed": "ada.lovelace@math.org",
    "style": "identicon"
    },
)
print(r.json())

GET /avatar

Deterministic generated avatar images.

Free, zero-auth JSON API served by FreeForAgents. No API key, no signup. All responses include ok, the payload fields shown below, and a docs URL. CORS is fully open (Access-Control-Allow-Origin: *).

Parameters

NameTypeRequiredDescription
seedstringnoAny string that identifies the avatar (default: random).
stylestringno'identicon' (default) or 'initials'.
sizeintegernoImage width/height in px, 16-512 (default 120).
formatstringno'json' (default) or 'svg' to get raw image/svg+xml.

Example request

curl -s "https://freeforagents.dev/avatar?seed=ada.lovelace@math.org&style=identicon"

Example response

{
  "ok": true,
  "docs": "https://freeforagents.dev/docs/avatar.md",
  "seed": "ada.lovelace@math.org",
  "style": "identicon",
  "size": 120,
  "palette": [
    "hsl(210 55% 92%)",
    "hsl(210 62% 38%)"
  ],
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" …></svg>"
}

See also