Quick Start
Generate your first patent figure with the PatentFig AI API
The PatentFig AI API lets you generate patent-office-style figures from text and convert existing images — vectorize to SVG/DXF/PDF, AI-upscale, and export filing-ready raster formats. All endpoints are synchronous REST calls that return JSON.
- Base URL:
https://patentfig.ai/api/v1 - Auth:
Authorization: Bearer pfig_xxx - Billing: each call consumes credits from your account balance
- Spec: OpenAPI (YAML) · OpenAPI (JSON)
1. Create an API key
Go to Settings → API Keys and create a key. The key is shown once — store it securely.
2. Check connectivity
curl https://patentfig.ai/api/v1/credits \
-H "Authorization: Bearer pfig_xxx"{ "success": true, "data": { "balance": 500 } }3. Generate your first figure
curl -X POST https://patentfig.ai/api/v1/figures \
-H "Authorization: Bearer pfig_xxx" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Exploded view of a wireless earbud charging case showing the lid, hinge, charging coil, and battery",
"output": "svg"
}'{
"success": true,
"data": {
"url": "https://cdn.patentfig.ai/api/…/….svg",
"format": "svg",
"svg": "<svg …>",
"creditsConsumed": 10
}
}Generation can take up to a few minutes for complex figures — set your HTTP client timeout to at least 300 seconds.
Endpoints at a glance
| Endpoint | What it does | Credits |
|---|---|---|
POST /figures | Generate a patent figure from a prompt (PNG or SVG) | 10 |
POST /vectorize | Raster image → SVG / DXF / vector PDF | 20 |
POST /enhance | AI super-resolution upscaling (2× / 4×) | 20 |
POST /convert | Filing-ready raster export (PNG / TIFF / PDF) | 20 |
GET /credits | Current credit balance | free |
Documentation PatentFig AI