Size Parameter
Request logos at exact pixel dimensions with ?size= and understand what’s precomputed vs on-demand.
Size
Use size to request a logo at a specific width and height in pixels.
Quick take: pass a single integer (e.g. 64) to get a square image sized 64x64.
Target size in pixels. A single value returns a square image (for example, 64 means 64x64).
If a size is generated on demand, the response includes X-BrandQL-Generated: true.
curl "https://api.brandql.com/logo/stripe.com?size=64"
curl "https://api.brandql.com/logo/stripe.com?variant=dark&size=128"
curl "https://api.brandql.com/logo/stripe.com?variant=dark&size=128&fallback=false"
What values are supported?
- Single integer (recommended):
16,32,64,128,256,512 - Square output: a single integer always returns a square image
- If you pass a size we don’t precompute: we’ll generate it on first request, then cache it
Precomputed vs on‑demand
We generate the most common sizes ahead of time for speed. Everything else is created on first request.
| Size | Availability | Typical use |
|---|---|---|
| 16 | On‑demand | Favicons, tiny badges |
| 32 | Precomputed | Lists, tables, menus |
| 64 | Precomputed | Cards, avatars |
| 128 | Precomputed | Product pages, profiles |
| 256 | On‑demand | High‑DPI thumbnails |
| 512 | On‑demand | Full‑bleed images |
The first request generates the size and caches it for future use. When this happens, the response includes:
X-BrandQL-Generated: true
Combine with variants
Size works with variant. If the requested variant isn’t available, we fall back to the default logo unless you set fallback=false. See Variant Parameter.
Common sizes, and when to use them
16— favicons, tiny badges32— lists, tables, menus64— cards, avatars128— product pages, profiles256— high‑DPI thumbnails512— full‑bleed images
Notes
- If you need a transparent background, use Variant Parameter with
variant=transparent. - If you want SVG, use Format Parameter. SVG ignores
sizesince it scales infinitely. - If you want to verify availability, add
fallback=false. See Fallback Parameter.