Skip to content
Blobz docs
Hosted APIAPI Reference

Render an avatar

GET
/api/v1/avatars/{endpointId}

Returns a deterministic SVG avatar. Cross-origin browser requests must include an Origin header matching one of the account's approved origins. Requests from the Blobz deployment serving the docs are allowed automatically. Only successful responses consume the account-wide monthly allowance.

Path Parameters

endpointId*string

The stable public endpoint ID shown in the Blobz dashboard.

Lengthlength <= 100

Query Parameters

name*string

A name, username, email, or opaque stable ID. Input is trimmed and must contain 1 to 256 characters.

Length1 <= length <= 256
frame?string

The outer crop shape.

Default"rounded"
Value in"rounded""circle""square"
palette?string

Two comma-separated six-digit hex colours: background first, body second. A leading # is optional before each colour.

Match^#?[0-9a-fA-F]{6},#?[0-9a-fA-F]{6}$
Default"#f2f1f4,#7c6cf2"
size?integer

The rendered SVG width and height in pixels.

Range16 <= value <= 1024
Default80

Header Parameters

Origin?string

An exact approved HTTPS origin, or an approved localhost HTTP origin during development. Browsers set this for cross-origin images that use crossorigin="anonymous". Same-origin requests from the Blobz deployment do not need to set it manually.

Formaturi

Response Body

SVG avatar. RateLimit headers describe the account-wide monthly quota.

response?stringimage/svg+xml
curl -X GET 'https://example.com/api/v1/avatars/YOUR_ENDPOINT_ID?name=Janaki&palette=%23eef9ff%2C%2338bdf8' \  -H 'Origin: https://app.example.com'
"<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 80 80\" width=\"80\" height=\"80\">...</svg>"