Skip to content

The key owner’s profile photo

GET/api/v1/account/avatar

Access
API key
Permission
account:read

Read the API key owner’s own avatar

Bearer API key only, account:read scope, shared account rate budget (60/minute). No user selector. Banned/deleted accounts and stopped keys cannot read bytes, including conditional requests. Uses the same protected bounded writes as profile avatars and rechecks the active owner, key, scope, expiry and current avatar before every write. An absent avatar or obsolete revision returns 404 AVATAR_UNAVAILABLE. HEAD has no body; Range is ignored. Clients may explicitly retain only the current revision locally; HTTP/shared caches must not store the response.

Example request

curl "https://lac.pics/api/v1/account/avatar" \
  -H "Authorization: Bearer lac_api_YOUR_KEY"

Parameters

Query

  • revisioninteger

    The revision the edit is based on: revision from GET /pastes/{id}.

    0–2,147,483,647

Headers

  • If-None-Matchstring

Responses

  • 200The owner’s normalized 256×256 WebP.string · binary
  • 304Matching ETag, after the same authorization and current-avatar checks; no body.
  • 400Invalid revision.
  • 401BEARER_REQUIRED or the standard API key/account refusal.BEARER_REQUIRED
  • 403SCOPE_REQUIRED: account:read is required.
  • 404AVATAR_UNAVAILABLE or ACCOUNT_UNAVAILABLE.ACCOUNT_UNAVAILABLEAVATAR_UNAVAILABLE
  • 413JSON body exceeds 1 MB before authentication; upload and quota limits may also refuse this operation.
  • 429RATE_LIMITED: shared account rate budget.
  • 500Unexpected server failure.
  • 503AVATAR_BUSY or a required service is unavailable.AVATAR_BUSY

Error codes

CodeStatusMessage
BEARER_REQUIRED401A Bearer key is required.
ACCOUNT_UNAVAILABLE404The account is unavailable.
AVATAR_UNAVAILABLE404The avatar is unavailable.
AVATAR_BUSY503Avatar processing is busy. Try again shortly.

Answers of any method with a key (an invalid or expired key, a missing permission, too many requests) are in Errors.

The key owner’s profile photo: GET /api/v1/account/avatar · lacuna API