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.
Authorization
bearerAuth Your al_live_<prefix>_<secret> API key. Mint and manage keys in the dashboard.
In: header
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/admin/icons" \ -F file="string"{ "filename": "up_3f9a1c2d4e5f.svg", "builtin": false, "uploaded_at": 1719772800}{ "detail": { "code": "icon_unsafe", "message": "SVG не прошёл проверку: script tag not allowed" }}{ "detail": "auth required"}{ "detail": { "code": "icon_too_large", "message": "SVG не должен превышать 976 KB" }}List icon library
List the icons available for buttons: your own uploads plus the shared built-in set. Requires a read-scoped key.
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.