Skip to content

Limits & Quotas

Every Glyph resource has limits to ensure reliability and fair usage. This page is the single reference for all of them. For rate limit handling strategies and code examples, see Rate Limits.

Per-minute request limits by tier. Applies to all API endpoints.

TierRequests/minMonthly PDFsPrice
Demo20Unlimited (in-memory only)$0
Free10100$0
Pro601,000$29/mo
Scale12010,000$129/mo
Enterprise300UnlimitedCustom

Sessions are created via /v1/preview or /v1/create and hold the working HTML state.

ConstraintLimit
Session TTL1 hour from creation
Max modifications per session50
Max session HTML size500 KB

When a session expires, all subsequent /v1/modify and /v1/generate calls return SESSION_EXPIRED. Create a new preview to continue.

Limits for the /v1/generate and /v1/batch/generate endpoints.

ConstraintLimit
Max page count per PDF50 pages
Max input HTML size2 MB
Render timeout30 seconds per PDF
Batch limit20 documents per request
Monthly PDF capTier-dependent (see table above)

PDFs that exceed the render timeout return a 504 with code PDF_TIMEOUT.

Limits for the /v1/modify endpoint (both standard and streaming).

ConstraintLimit
Max prompt length2,000 characters
Max concurrent AI requests per key3
AI response timeout60 seconds
Pre-flight validation timeout5 seconds

The pre-flight check detects impossible or destructive requests early, typically within 2-5 seconds, before committing to a full AI call.

Every API response includes rate limit headers so your application can track usage proactively.

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705320060
HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the current window
X-RateLimit-RemainingRequests remaining before throttling
X-RateLimit-ResetUnix timestamp (seconds) when the window resets

Returned only on /v1/generate responses.

X-Monthly-Limit: 1000
X-Monthly-Used: 150
X-Monthly-Remaining: 850

When a limit is exceeded, the response includes a Retry-After header:

HTTP/1.1 429 Too Many Requests
Retry-After: 45
Content-Type: application/json
{
"error": "Rate limit exceeded",
"code": "RATE_LIMIT_EXCEEDED",
"retryAfter": 45,
"tier": "free",
"limit": 10,
"windowMs": 60000
}

Read the headers after every response and back off when X-RateLimit-Remaining reaches zero.

async function callGlyph(endpoint, body, maxRetries = 3) {
for (let attempt = 0; attempt < maxRetries; attempt++) {
const res = await fetch(`https://api.glyph.you${endpoint}`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
// Proactively log remaining quota
const remaining = res.headers.get('X-RateLimit-Remaining');
if (remaining !== null && parseInt(remaining) < 5) {
console.warn(`Glyph: only ${remaining} requests left in this window`);
}
if (res.status !== 429) return res.json();
const retryAfter = parseInt(res.headers.get('Retry-After') || '60', 10);
console.log(`Rate limited. Waiting ${retryAfter}s before retry...`);
await new Promise((r) => setTimeout(r, retryAfter * 1000));
}
throw new Error('Glyph API: max retries exceeded');
}
import time
import requests
def call_glyph(endpoint: str, body: dict, max_retries: int = 3):
for attempt in range(max_retries):
res = requests.post(
f"https://api.glyph.you{endpoint}",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
},
json=body,
)
if res.status_code != 429:
res.raise_for_status()
return res.json()
retry_after = int(res.headers.get("Retry-After", 60))
print(f"Rate limited. Waiting {retry_after}s...")
time.sleep(retry_after)
raise Exception("Glyph API: max retries exceeded")

If you are consistently hitting limits, upgrade your tier in the dashboard under Billing. New limits apply immediately.