API v1
Documentation
RESTful API for converting raster images to SVG. Returns optimized vector paths.
BASE URL
weavrn.vercel.appVERSION
v1FORMAT
SVGAuthentication
All requests require Bearer token authentication. Generate API keys in the dashboard.
HEADER REQUIRED
Authorization: Bearer YOUR_API_KEYSecurity
Never expose API keys in client code or public repositories. Rotate keys if compromised.
Endpoint
POST
/api/vectorizeConvert raster images to SVG using contour detection algorithms.
https://weavrn.vercel.app/api/vectorizeParameters
urlREQUIREDstringPublicly accessible URL of the image to vectorize.
Formats: PNG, JPG, WebP • Max: 10MB
solverOPTIONALintegerAlgorithm selector for vectorization quality/speed tradeoff.
color_countOPTIONALintegerdefault: 8Maximum number of colors in output SVG.
rawOPTIONALbooleandefault: falseReturn raw SVG (true) or optimized SVG (false).
crop_boxOPTIONALobjectDefine 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
400Bad Request
Invalid parameters or missing required fields
401Unauthorized
Missing or invalid API key
402Payment Required
Insufficient credits available
413Payload Too Large
File exceeds 10MB limit
429Rate Limited
Exceeded 10 requests per minute
500Server Error
Processing failed (no credit deducted)
Rate Limits
STANDARD LIMIT
10/min
10 requests per minute for all plans
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)