API Documentation
Integrate Pixel2Vector's powerful vectorization into your applications with our simple REST API.
Quick Start
Get started with Pixel2Vector API in minutes. Our RESTful API allows you to convert images to SVG vectors programmatically.
https://api.pixel2vector.com/v1
Include your API key in the request header:
Authorization: Bearer YOUR_API_KEY
API Endpoints
Check API status and availability.
{
"status": "healthy",
"version": "1.0.0",
"uptime": 99.9
}
Convert an image to SVG vector format.
curl -X POST https://api.pixel2vector.com/v1/vectorize \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "image=@/path/to/image.png"
{
"success": true,
"svg_url": "https://api.pixel2vector.com/download/abc123.svg",
"credits_used": 1,
"credits_remaining": 49
}
Download a generated SVG file.
curl -O https://api.pixel2vector.com/v1/download/abc123.svg
Code Examples
const formData = new FormData();
formData.append('image', fileInput.files[0]);
fetch('https://api.pixel2vector.com/v1/vectorize', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
},
body: formData
})
.then(response => response.json())
.then(data => {
if (data.success) {
console.log('SVG URL:', data.svg_url);
}
});
Rate Limits
API rate limits vary by plan: