CDN reference
Base URL: https://cdn.onlyfonts.ai
The CDN serves CSS and woff2 files from Cloudflare’s global edge. All responses send Access-Control-Allow-Origin: *. No cookies, no tracking.
css2 — Google Fonts-compatible
GET /css2?family={Family}:{axes}@{tuples}&display=swap
Same format as fonts.googleapis.com/css2. Examples:
/css2?family=Inter default weight 400
/css2?family=Inter:wght@400;700 specific weights
/css2?family=Inter:wght@300..800 variable weight range
/css2?family=Inter:ital,wght@0,400;1,400 italic combos
/css2?family=Inter:wght@400&family=Space+Mono multiple families
display accepts auto, block, swap (default), fallback, optional.
css — native endpoint
GET /css?family={slug}&w=400,700&display=swap
Uses the catalog slug instead of the display name, and a simple comma-separated weight list. Omit w for all available weights.
font files
GET /{slug}/{file}.woff2
Direct woff2 files, named {variant}.{subset}.woff2 (for example /inter/regular.latin.woff2). You normally don’t construct these by hand — the CSS endpoints reference them — but they’re stable URLs if you want to mirror or self-host.
caching
| response | cache |
|---|---|
CSS (/css, /css2) | public, 1 hour |
| woff2 files | public, 1 year, immutable |
Font files are content-stable: a given file URL always serves the same bytes, which is why they’re safe to cache immutably.
custom domains
Verified custom domains (see custom domains) serve the same endpoints on your hostname, scoped to the fonts attached to your account.