LogoPatentFig AI Docs
LogoPatentFig AI Docs
Homepage

Getting Started

Quick StartAuthentication

Endpoints

Generate FiguresVectorizeEnhanceConvertCredits

Reference

Use with AI AgentsErrorsChangelog
X (Twitter)

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/enhance

Cost: 20 credits per call.

Parameters

Image input follows the shared convention (imageUrl JSON field or multipart file).

FieldTypeRequiredDefaultDescription
imageUrl / filestring / fileyes—The image to upscale.
scale2 | 4no2Output pixel dimensions = input × scale.
dpi300 | 600no300Stamps 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.

Table of Contents

Parameters
Request
Response
Errors