SVG
GET /v1/svg/{slug}
Returns raw SVG bytes for a catalog slug.
| Aspect | Detail |
|---|---|
| Header | X-API-Key |
| Path | slug |
| Query | variant - 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
| Case | Cache-Control |
|---|---|
| Real SVG asset | public, max-age=86400 |
| Placeholder SVG | public, 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
| Variant | Description |
|---|---|
mono | Single-color mark; works on most backgrounds (default) |
color | Full-color brand artwork |
dark | Tuned for dark backgrounds |
light | Tuned for light backgrounds |
wordmark | Logo including wordmark |
icon | Icon-only mark |
Interactive details: API reference.