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 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
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": "Не удалось сгенерировать иконку" }}Upload an icon
Upload a private SVG icon (max 1 MB). The SVG is sanitized before storage. The icon is private to your account. Requires a write-scoped key.
Delete an uploaded icon
Delete one of your own uploaded icons. Built-in icons cannot be deleted, and an icon currently used by a button cannot be removed. Requires a write-scoped key.