---
title: "Cache Avatars Pending"
method: POST
path: "/admin/cache-avatars-pending"
tags: ["Admin"]
---

# Cache Avatars Pending

`POST /admin/cache-avatars-pending`

## Request

- Base URL: `https://api.kolens.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.kolens.ai/admin/cache-avatars-pending`
- Auth: none declared

Cache up to ``limit`` pending KOL avatars from upstream CDN to R2.

Returns a small summary: ``scanned`` (rows examined),
``cached`` (successful uploads), ``failed`` (download / upload
errors — those rows tick their ``avatar_cache_attempts`` counter;
after 3 failures they exit the queue), ``bytes_uploaded`` (sum of
payload sizes across the batch), ``r2_configured`` (false when env
vars are missing — short-circuits without touching the DB), and
``error`` (set when the early-exit fired).

## Query parameters

- `limit` integer

## Headers

- `x-admin-secret` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kolens/apis/kolens-api.md) · [All operations](https://skmtc.dev/kolens/apis/kolens-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kolens/apis/kolens-api/revisions/5d6865ab0a24?raw)
