API for Developers

Programmatic access to TypeLab's Cyrillic typefaces — embed, license, and manage fonts directly from your stack.

Overview

Integrate TypeLab Fonts Into Any Project

The TypeLab REST API gives developers full programmatic control over our font catalog. Retrieve font metadata, generate web-font bundles, activate licenses per domain, and pull real-time kerning and hinting data — all over HTTPS with JWT authentication.

Base URL: https://api.typelab.dev/v2. Rate limit: 1,200 requests per hour per API key. Responses are JSON by default; font binaries are served as gzip-compressed WOFF2 streams. Every endpoint supports conditional requests via ETag and If-None-Match. Our SDKs are available for Node.js, Python, PHP, and Ruby.

Endpoints

Core Resources

GET /fonts

List all available typefaces with filters for family, weight, style, and script coverage. Supports pagination (cursor-based) and field selection. Example response includes familyId, fullName, axes, and cyrillicGlyphCount.

GET /fonts/{id}/download

Retrieve a specific font file in WOFF2, WOFF, or TTF format. Accepts query parameters for subset (Unicode ranges), weight, and style. Returns the binary with appropriate Content-Type and caching headers (max-age 31536000).

POST /licenses

Activate a font license for one or more domains. Returns a license token and CSS snippet ready for injection. Supports wildcard domains, subdomain matching, and automatic renewal tracking. Webhook callbacks on expiration.

GET /fonts/{id}/metrics

Fetch detailed typographic metrics: ascender, descender, x-height, cap-height, line-gap, and design-space coordinates for variable fonts. Useful for layout engines and CSS font-palette calculations.

GET /fonts/{id}/kerning

Download OpenType kerning pair data as a JSON map keyed by glyph name pairs. Includes both GPOS-based and legacy kern table entries. Used by rendering pipelines that apply custom kerning outside the font file.

GET /webhooks/events

Query the event log for license activations, renewals, and domain validation results. Filter by date range, event type, and font family. Returns signed events with SHA-256 HMAC verification.

Documentation

Full Reference & SDK Guides

Complete endpoint specifications, authentication flows, error codes, and migration notes are available in the hosted developer portal. Interactive examples let you test every endpoint with your API key before writing production code.

Open API Reference SDK Installation Guides

Examples

Quick Start Snippets

Node.js — Fetch Font Metadata

const res = await fetch('https://api.typelab.dev/v2/fonts?script=cyrillic&limit=10', {
  headers: { 'Authorization': 'Bearer sk_live_7f3a9c2e1b' }
});
const { data } = await res.json();
console.log(data[0].fullName); // "Manrope Cyrillic Variable"

cURL — Download a WOFF2 Subset

curl -o inter-cyrillic.woff2 \\\n -H 'Authorization: Bearer sk_live_7f3a9c2e1b' \\\n 'https://api.typelab.dev/v2/fonts/inter-cyrillic/download?format=woff2&subset=U+0400-04FF'

Python — Activate a Domain License

import requests
resp = requests.post('https://api.typelab.dev/v2/licenses', json={
  "fontFamilyId": "manrope-cyrillic",
  "domains": ["app.example.com", "*.staging.example.com"],
  "plan": "commercial"
}, headers={"Authorization": "Bearer sk_live_7f3a9c2e1b"})
print(resp.json()["cssSnippet"])

CSS — Inject the Font from TypeLab CDN

@font-face {
  font-family: 'Manrope Cyrillic';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('https://cdn.typelab.dev/v2/fonts/manrope-cyrillic/variable.woff2') format('woff2');
}