Convert
POST /v1/convert — filing-ready raster export (PNG / TIFF / PDF)
Exports an image in the raster format filing systems accept: flattened TIFF, PDF, or high-resolution PNG. For vector output (SVG / DXF), use Vectorize.
POST https://patentfig.ai/api/v1/convertCost: 20 credits per call.
Parameters
Image input follows the shared convention (imageUrl JSON field or multipart file).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
imageUrl / file | string / file | yes | — | The image to convert. |
format | "png" | "tiff" | "pdf" | no | "png" | Output format. TIFF is flattened with LZW compression. |
dpi | 300 | 600 | no | 300 | Target preset: 300 DPI targets ~2K resolution, 600 DPI targets ~4K. Small inputs are AI-upscaled to reach the target. |
Request
curl -X POST https://patentfig.ai/api/v1/convert \
-H "Authorization: Bearer pfig_xxx" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/figure.png",
"format": "tiff",
"dpi": 600
}'Response
{
"success": true,
"data": {
"url": "https://cdn.patentfig.ai/api/…/….tiff",
"previewUrl": "https://cdn.patentfig.ai/api/…/….png",
"format": "tiff",
"dpi": 600,
"creditsConsumed": 20
}
}previewUrl (a PNG render) is present for TIFF and PDF outputs.
Errors
Common: INVALID_INPUT (400), FETCH_FAILED (422), INSUFFICIENT_CREDITS (402), GENERATION_FAILED (500). See Errors.
Documentation PatentFig AI