REST API · JSON
Render API
Render text in your fonts as PNG, JPEG, WebP, SVG or PDF — social cards, banners and specimens.
Authorization: Bearer YOUR_API_KEY
{
"canvas": {
"preset": "open-graph",
"background": {
"type": "color",
"value": "#111827"
}
},
"layers": [
{
"content": "Everything Fonts",
"font": {
"id": "FONT_ID"
},
"style": {
"size": 120,
"color": "#ffffff"
},
"box": {
"x": 80,
"y": 240,
"width": 1040,
"height": 160
}
}
],
"output": {
"format": "png"
}
}
Send it from the sandbox below and see what comes back.
Try it — no key needed
Pick an example. You'll see the exact request and what the API sent back.
Request
Response
Examples run on sample fonts we host: Inter and Space Grotesk (SIL Open Font License). Results were computed by the real API.
How it works
Every request sends Authorization: Bearer YOUR_API_KEY. Upload a font once and reuse its id with any tool.
-
Upload the font
Send the font file. You get back its id.
POST /api/v1/fontcurl -X POST "https://font.rest/api/v1/font" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "[email protected]"const body = new FormData(); body.append('font', fileInput.files[0]); const response = await fetch('https://font.rest/api/v1/font', { method: 'POST', headers: { Authorization: 'Bearer YOUR_API_KEY' }, body, }); const data = await response.json();import requests response = requests.post( 'https://font.rest/api/v1/font', headers={'Authorization': 'Bearer YOUR_API_KEY'}, files={'font': open('MyFont.ttf', 'rb')}, ) data = response.json()<?php use Illuminate\Support\Facades\Http; // withToken() sends the Authorization: Bearer header. $response = Http::withToken('YOUR_API_KEY') ->attach('font', file_get_contents('MyFont.ttf'), 'MyFont.ttf') ->post('https://font.rest/api/v1/font'); $data = $response->json(); -
Render it
Describe the canvas and the text layers.
POST /api/v1/rendercurl -X POST "https://font.rest/api/v1/render" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"canvas":{"preset":"open-graph","background":{"type":"color","value":"#111827"}},"layers":[{"content":"Everything Fonts","font":{"id":"FONT_ID"},"style":{"size":120,"color":"#ffffff"},"box":{"x":80,"y":240,"width":1040,"height":160}}],"output":{"format":"png"}}'const response = await fetch('https://font.rest/api/v1/render', { method: 'POST', headers: { Authorization: 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({"canvas":{"preset":"open-graph","background":{"type":"color","value":"#111827"}},"layers":[{"content":"Everything Fonts","font":{"id":"FONT_ID"},"style":{"size":120,"color":"#ffffff"},"box":{"x":80,"y":240,"width":1040,"height":160}}],"output":{"format":"png"}}), }); const data = await response.json();import requests response = requests.post( 'https://font.rest/api/v1/render', headers={'Authorization': 'Bearer YOUR_API_KEY'}, json={"canvas":{"preset":"open-graph","background":{"type":"color","value":"#111827"}},"layers":[{"content":"Everything Fonts","font":{"id":"FONT_ID"},"style":{"size":120,"color":"#ffffff"},"box":{"x":80,"y":240,"width":1040,"height":160}}],"output":{"format":"png"}}, ) data = response.json()<?php use Illuminate\Support\Facades\Http; // withToken() sends the Authorization: Bearer header. $response = Http::withToken('YOUR_API_KEY') ->post('https://font.rest/api/v1/render', array ( 'canvas' => array ( 'preset' => 'open-graph', 'background' => array ( 'type' => 'color', 'value' => '#111827', ), ), 'layers' => array ( 0 => array ( 'content' => 'Everything Fonts', 'font' => array ( 'id' => 'FONT_ID', ), 'style' => array ( 'size' => 120, 'color' => '#ffffff', ), 'box' => array ( 'x' => 80, 'y' => 240, 'width' => 1040, 'height' => 160, ), ), ), 'output' => array ( 'format' => 'png', ), )); $data = $response->json();
What it can do
Canvas presets
- 1200 × 630 (Open Graph)
- 1200 × 628 (Twitter Summary Large)
- 1080 × 1080 (Instagram Square)
- 1080 × 1350 (Instagram Portrait)
- 1080 × 1920 (Instagram Story)
- 794 × 1123 (A4)
- 816 × 1056 (Letter)
Output formats
- PNG
- JPEG
- WEBP
- SVG
Plans
API access comes with the Premium and Enterprise plans. Every plan includes a monthly job allowance; a job that fails is not counted.
Font Tools Starter
$19.99 /mo
$199.90 /yr 2 months free
- 300 jobs a month
- 10MB uploads
- One allowance shared across every tool
- Every paid feature of every tool
- Fonts marked Restricted License
- Website only
Font Tools Premium
$49.99 /mo
$499.90 /yr 2 months free
- 1,500 jobs a month
- 50MB uploads
- One allowance shared across every tool
- Every paid feature of every tool
- Fonts marked Restricted License
- Website + API
Font Tools Enterprise
$99.99 /mo
$999.90 /yr 2 months free
- 5,000 jobs a month
- 200MB uploads
- One allowance shared across every tool
- Every paid feature of every tool
- Fonts marked Restricted License
- Website, API + Render API
Questions
- Which plan includes the Render API?
- Enterprise, on the all-tools plan.
- Why did my SVG request return 422?
- Vector output supports a deliberately simple subset of documents (one text layer, flat background, no rotation). The error names the feature that made vector impossible; render it as PNG instead.
- How many calls can I make?
- Each plan includes a number of jobs a month; every tool response tells you how many are left in its X-Allowance-Remaining header. A job that fails is not counted. Requests are also limited per minute to keep the service fast for everyone.
- How long are files kept?
- Uploaded fonts are kept for 180 days; results for 30 days. Download what you need before then.
- What does a 429 mean?
- Either your monthly allowance is used up (the error says allowance_exhausted, and the X-Allowance-Reset header says when it renews) or you sent too many requests in a minute. Upgrading your plan raises the allowance.
- I integrated with the X-EverythingFonts-Api-Secret header. Do I need to change anything?
- No. It keeps working for existing integrations. New code should send Authorization: Bearer with the same key.