REST API Reference

Unlimited-SVG Developer API

Convert PNG, JPG, and WebP images into validated, script-sanitized SVG vectors programmatically using a single REST endpoint.

Manage API Keys

Endpoint & Authentication

POSThttps://unlimited-svg.run/api/v1/image-to-svg

Authenticate every request with Authorization: Bearer <API_KEY> or X-API-Key: <API_KEY>. Generate personal keys anytime from your dashboard. Each successful call uses 1 credit; failed calls are automatically refunded.

API access requires an active paid subscription or purchased credit pack (free accounts receive HTTP 403; accounts with zero remaining credits receive HTTP 402).

Request Parameters

FieldTypeDefaultDescription
filebinarymultipartPNG, JPG, or WebP upload up to 10 MB when sending multipart/form-data.
image_base64 / image_urlstringjsonProvide exactly one of image_base64 or public HTTP(S) image_url for JSON requests.
presetenumlogoOne of logo, diagram, illustration, or photo. Automatically tunes sampling temperature.
detail_levelenumultraOne of standard (single-pass), detailed (Best-of-4 512px Edge F1 scorer), or ultra (Best-of-4 plus 32x32 Masked-Clip ROI detail repair).
response_formatenumjsonUse json for metadata plus SVG text, or svg to stream raw image/svg+xml directly.

Quickstart Examples

curl -X POST "https://unlimited-svg.run/api/v1/image-to-svg" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -F "file=@logo.png" \
  -F "preset=logo" \
  -F "detail_level=standard" \
  -F "response_format=svg" \
  -o logo.svg

JSON Response Schema

{
  "id": "f4c9a1d2-...",
  "model": "baidu/Unlimited-SVG",
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">...</svg>",
  "valid_xml": true,
  "path_count": 63,
  "svg_bytes": 10035,
  "ssim": 0.8861,
  "edge_f1": 0.9629,
  "local_score": 0.9643,
  "visual_score": 0.9376,
  "roi_accepted": 1,
  "elapsed_seconds": 13.55,
  "completion_tokens": 1766,
  "credits_charged": 1
}