Pathhaus API Quickstart (Enterprise)
The Pathhaus REST API (Enterprise tier) lets you integrate font optimization and export into your own software, production workflows, or machine pipelines. This guide covers authentication, your first call, and common integration patterns.
Authentication
All API requests require a Bearer token in the Authorization header. Generate an API key from your dashboard at pathhaus.com/dashboard/api-keys. Click "Create Key", give it a name and select the scopes you need (optimize, export, fonts:read). Copy the key immediately — it's only shown once. Set the Authorization header on every request: Authorization: Bearer pk_live_your-key-here.
Your first optimization request
POST to https://pathhaus.com/api/v1/optimize with a JSON body containing your SVG paths and optimization parameters. Example: { "paths": [{"d": "M0,0 C10,0 10,10 0,10"}], "epsilon": 2, "reorder": true }. The response returns the optimized paths with statistics: original node count, optimized node count, and travel distance before/after reordering. All in under 100ms for typical requests.
Exporting a complete font composition
POST to /api/v1/export with a font slug, text, size, optimization settings, and desired output format. The API returns a binary file (SVG, DXF, HPGL, or G-Code) as a file download. You can store this directly to disk, upload to cloud storage, or stream it to a machine controller. Rate limits: 1,000 requests/day on Enterprise, with burst support for batch jobs.
Rate limits and batch processing
The API enforces per-day rate limits by API key. Enterprise keys have 1,000 requests/day by default. For batch processing (generating files for an entire font catalog, for example), use the /api/v1/optimize endpoint with larger path arrays — it accepts up to 500 paths per request. Contact us at enterprise@pathhaus.com if you need higher rate limits for a specific use case.
Try it in Pathhaus Studio
Free to start — optimize and export your first font file in under 5 minutes.