---
title: "Icon generator"
method: POST
path: "/api/icon/generate"
tags: ["Design & Assets"]
---

# Icon generator

`POST /api/icon/generate`

## Request

- Base URL: `https://api.webbersites.com`
- URL: `https://api.webbersites.com/api/icon/generate`
- Auth: API key in header `X-PAYMENT`

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.

Price: $0.01 per call, paid in USDC via the x402 protocol (see the x402 security scheme).

## Request body

- object
  - `query` string: Search text — best match is used automatically
  - `icon` string: Exact Font Awesome icon name (skips search)
  - `style` string: solid (default), regular, or brands
  - `colors` unknown[]: 1-2 background hex colors; 2 makes a diagonal gradient
    - unknown
  - `fg` string: Glyph hex color (default #ffffff)
  - `shape` string: squircle (default, iOS-style), rounded, circle, square
  - `size` number: Pixel size 64-1024 (default 1024)
  - `padding` number: Glyph padding as fraction 0.05-0.35 (default 0.18)

## Response `200`

Success

- object
  - `icon` object
  - `svg` string
  - `png_base64` string
  - `attribution` string

## Other responses

- `402`: Payment required — the response body lists accepted payment methods (amount, asset, network, pay-to address). Retry the request with a signed X-PAYMENT header.

---

[API](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api.md) · [All operations](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/revisions/c14a76c67a94?raw)
