API v1

Documentation

RESTful API for converting raster images to SVG. Returns optimized vector paths.

BASE URL
weavrn.vercel.app
VERSION
v1
FORMAT
SVG

Authentication

All requests require Bearer token authentication. Generate API keys in the dashboard.

HEADER REQUIRED
Authorization: Bearer YOUR_API_KEY
Security

Never expose API keys in client code or public repositories. Rotate keys if compromised.

Endpoint

POST/api/vectorize

Convert raster images to SVG using contour detection algorithms.

https://weavrn.vercel.app/api/vectorize

Parameters

urlREQUIREDstring

Publicly accessible URL of the image to vectorize.

Formats: PNG, JPG, WebP • Max: 10MB
solverOPTIONALinteger

Algorithm selector for vectorization quality/speed tradeoff.

color_countOPTIONALintegerdefault: 8

Maximum number of colors in output SVG.

rawOPTIONALbooleandefault: false

Return raw SVG (true) or optimized SVG (false).

crop_boxOPTIONALobject

Define specific region to vectorize. Useful for extracting parts of an image.

{
  "x": 0,
  "y": 0,
  "width": 100,
  "height": 100
}

Code Examples

curl -X POST https://weavrn.vercel.app/api/vectorize \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/image.png",
    "solver": 1,
    "color_count": 8,
    "raw": false
  }'

Response

SUCCESS (200)

Returns SVG content as plain text. 1 credit is deducted.

Content-Type: image/svg+xml

<svg xmlns="http://www.w3.org/2000/svg" ...>
  <path d="M..." fill="#..." />
  ...
</svg>

Error Codes

400
Bad Request
Invalid parameters or missing required fields
401
Unauthorized
Missing or invalid API key
402
Payment Required
Insufficient credits available
413
Payload Too Large
File exceeds 10MB limit
429
Rate Limited
Exceeded 10 requests per minute
500
Server Error
Processing failed (no credit deducted)

Rate Limits

STANDARD LIMIT
10/min
10 requests per minute for all plans
NEED MORE?

Contact support for custom rate limits

support@weavrn.com →

Pricing

STARTER
$10
75 credits
$0.13 per call
BUILDER
$20
180 credits
$0.11 per call
GROWTH
$50
500 credits
$0.10 per call
Upcoming Features
  • Batch processing (multiple images per request)
  • Webhook support for async processing
  • Additional output formats (PDF, EPS)