TEASEDocs
API ReferenceLandings

Generate an icon with AI

Draws a new button icon with AI in the house style — white on a transparent background, visually matching the built-in library — and saves it to your private icon library, ready to use on any button. `prompt` describes the concept in any language; `style` picks line (stroke) or solid (filled glyph). Rate limit: 6 generations per minute. Requires a write-scoped key.

Authorization

bearerAuth
AuthorizationBearer <token>

Your al_live_<prefix>_<secret> API key. Mint and manage keys in the dashboard.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

POST
/api/admin/icons/generate
curl -X POST "https://example.com/api/admin/icons/generate" \  -H "Content-Type: application/json" \  -d '{    "prompt": "paper plane",    "style": "line"  }'
{  "filename": "gen_7c2f91d3a4b5.svg",  "builtin": false,  "uploaded_at": 1752537600}
{  "detail": {    "code": "icon_ai_disabled",    "message": "Генерация иконок не настроена"  }}
{  "detail": "auth required"}
{  "detail": {    "code": "icon_gen_rate_limited",    "message": "Слишком часто — до 6 генераций в минуту."  }}
{  "detail": {    "code": "icon_ai_failed",    "message": "Не удалось сгенерировать иконку"  }}