Home / API docs / App Icon Generator API
Design & Assets

App Icon Generator API

POST /api/icon/generate $0.03 per call USDC on Base · x402

Icon generator: pick a Font Awesome Free icon (by search query or exact name) plus background color(s) and get an app-icon-ready asset — SVG source + PNG base64, default 1024x1024 opaque squircle (iOS-ready). Options: 1-2 background colors (2 = gradient), fg glyph color, shape (squircle/rounded/circle/square/transparent), size 64-1024, padding. Returns alternatives when resolved via search.

Parameters

NameInDescription
querybodySearch text — best match is used automatically
iconbodyExact Font Awesome icon name (skips search)
stylebodysolid (default), regular, or brands
colorsbody1-2 background hex colors; 2 makes a diagonal gradient
fgbodyGlyph hex color (default #ffffff)
shapebodysquircle (default, iOS-style), rounded, circle, square
sizebodyPixel size 64-1024 (default 1024)
paddingbodyGlyph padding as fraction 0.05-0.35 (default 0.18)

Example request

curl -X POST "https://api.webbersites.com/api/icon/generate" \
  -H "Content-Type: application/json" \
  -d '{"query":"rocket","colors":["#ff6b35","#b23b18"],"fg":"#ffffff","shape":"squircle","size":1024}'
# first call returns 402 + payment requirements; an x402 client pays and retries automatically

Example response

{
    "icon": {
        "name": "rocket",
        "label": "Rocket",
        "style": "solid"
    },
    "size": 1024,
    "svg": "<svg …>",
    "png_base64": "iVBOR…",
    "attribution": "Icon from Font Awesome Free, CC BY 4.0."
}
MCP tool: post_icon_generate — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.

How payment works

There is no signup and no API key. Call the endpoint; it replies 402 Payment Required with machine-readable payment requirements. Your client signs a USDC transfer authorization (EIP-3009, gasless) and retries with the X-PAYMENT header — @x402/fetch does this automatically. See the overview for a working snippet.