API Documentation

Integrate Pixel2Vector's powerful vectorization into your applications with our simple REST API.

Quick Start

API Status: Operational

Get started with Pixel2Vector API in minutes. Our RESTful API allows you to convert images to SVG vectors programmatically.

Base URL
https://api.pixel2vector.com/v1
Authentication

Include your API key in the request header:

Authorization: Bearer YOUR_API_KEY

API Endpoints

GET /health

Check API status and availability.

Response
{
  "status": "healthy",
  "version": "1.0.0",
  "uptime": 99.9
}
POST /vectorize

Convert an image to SVG vector format.

Request (File Upload)
curl -X POST https://api.pixel2vector.com/v1/vectorize \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "image=@/path/to/image.png"
Success Response
{
  "success": true,
  "svg_url": "https://api.pixel2vector.com/download/abc123.svg",
  "credits_used": 1,
  "credits_remaining": 49
}
GET /download/{filename}

Download a generated SVG file.

Example
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:

Free
5 requests/day
Pro
100 requests/hour
API Pro
Unlimited