Enhance
POST /v1/enhance — AI super-resolution upscaling
Upscales an image with AI super-resolution. Output is always PNG.
POST https://patentfig.ai/api/v1/enhanceCost: 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 upscale. |
scale | 2 | 4 | no | 2 | Output pixel dimensions = input × scale. |
dpi | 300 | 600 | no | 300 | Stamps the density metadata in the output file. Metadata only — does not change pixel dimensions. |
scale controls pixels; dpi controls the embedded density stamp that some filing systems check. They are independent.
Request
curl -X POST https://patentfig.ai/api/v1/enhance \
-H "Authorization: Bearer pfig_xxx" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/figure.png",
"scale": 4,
"dpi": 600
}'Response
{
"success": true,
"data": {
"url": "https://cdn.patentfig.ai/api/…/….png",
"scale": 4,
"dpi": 600,
"width": 4096,
"height": 3072,
"creditsConsumed": 20
}
}Errors
Common: INVALID_INPUT (400), FETCH_FAILED (422), INSUFFICIENT_CREDITS (402), GENERATION_FAILED (500). See Errors.
PatentFig AI Docs