Skip to main content

SVG

GET /v1/svg/{slug}

Returns raw SVG bytes for a catalog slug.

AspectDetail
HeaderX-API-Key
Pathslug
Queryvariant - see table below (default mono)

Response: Content-Type: image/svg+xml

Header: X-Svg-Variant - the variant actually served. When a placeholder is returned (requested variant missing but slug exists), this may be placeholder instead of the requested variant name.

Placeholder behavior

If the slug does not exist → 404 (service_not_found).
If the slug exists but the variant is missing → 200 with a branded placeholder SVG (not a 404).

Caching

CaseCache-Control
Real SVG assetpublic, max-age=86400
Placeholder SVGpublic, max-age=3600
curl "https://api.scrift.app/v1/svg/stripe?variant=mono" \
-H "X-API-Key: YOUR_API_KEY"

Use in HTML:

<img
src="https://api.scrift.app/v1/svg/stripe?variant=mono"
alt="Stripe"
width="48"
height="48"
/>
note

Embedding in img still triggers a normal HTTP GET; you must pass X-API-Key only where your client supports custom headers (or use a server-side proxy). Many browsers omit custom headers on <img> - prefer server-side fetch or your backend as a cache when keys must stay private.

Variants

VariantDescription
monoSingle-color mark; works on most backgrounds (default)
colorFull-color brand artwork
darkTuned for dark backgrounds
lightTuned for light backgrounds
wordmarkLogo including wordmark
iconIcon-only mark

Interactive details: API reference.