LogoPatentFig AI Docs
LogoPatentFig AI Docs
Homepage

Getting Started

Quick StartAuthentication

Endpoints

Generate FiguresVectorizeEnhanceConvertCredits

Reference

Use with AI AgentsErrorsChangelog
X (Twitter)

Errors

Error format, codes, and retry guidance

All errors share one envelope:

{
  "success": false,
  "error": { "code": "INSUFFICIENT_CREDITS", "message": "…" }
}

Error codes

HTTPCodeMeaningRetry?
400INVALID_INPUTMissing or invalid parameter; the message names the fieldNo — fix the request
401UNAUTHORIZEDMissing, invalid, or revoked API keyNo — check the key
402INSUFFICIENT_CREDITSBalance too low for this callAfter topping up
422FETCH_FAILEDimageUrl could not be fetched or returned an errorCheck the URL is public
429RATE_LIMITEDOver 60 requests/minute on this keyYes — back off and retry
500GENERATION_FAILEDModel or processing failureYes — safe to retry once
500INTERNAL_ERRORUnexpected server errorYes — safe to retry once

Retry guidance

  • Credits are only charged on success, so retrying a failed call never double-bills.
  • For 429, wait for the window to reset (up to 60 s) — an exponential backoff starting at 5 s works well.
  • For 500, one retry is reasonable; persistent failures usually indicate an input the model cannot process (e.g. a photo sent to a line-art pipeline). If a request keeps failing, contact contact@patentfig.ai with the request payload.

Table of Contents

Error codes
Retry guidance