Developer Documentation

Everything you need to integrate VisualSize.ai into your workflow. Get started with our API, explore examples, and build amazing applications.

Quick Start

Get up and running with VisualSize.ai in minutes. Follow our step-by-step guide.

Get Started →

API Reference

Complete API documentation with examples for all endpoints and parameters.

View API →

Examples

Ready-to-use code examples and integration patterns for popular frameworks.

View Examples →

Quick Start Guide

1

Get Your API Key

Sign up for a VisualSize.ai account and obtain your API key from the dashboard.

# Add your API key to your environment
export VISUALSIZE_API_KEY="your_api_key_here"
2

Upload Your First Image

Send a POST request with your product image and dimension data.

curl -X POST https://api.visualsize.ai/v1/process \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@product.jpg" \
  -F "dimensions={\"width\": 10, \"height\": 15, \"depth\": 5}"
3

Get Your Results

Receive your processed image with professional dimension annotations.

{
  "status": "success",
  "processed_image_url": "https://cdn.visualsize.ai/result.png",
  "processing_time": 2.3,
  "formats": ["png", "jpg", "svg", "pdf"]
}

API Reference

Authentication

All API requests require authentication using your API key in the Authorization header.

Authorization: Bearer YOUR_API_KEY
POST /v1/process

Process a product image and add dimension annotations.

Parameters

Parameter Type Required Description
image file Yes Product image (PNG, JPG, WEBP)
dimensions object Yes Width, height, depth measurements
style string No Annotation style (default, minimal, detailed)
format string No Output format (png, jpg, svg, pdf)
GET /v1/status/{job_id}

Check the processing status of a submitted job.

Response

{
  "job_id": "job_123456",
  "status": "completed",
  "progress": 100,
  "result_url": "https://cdn.visualsize.ai/result.png"
}

Code Examples

JavaScript / Node.js

const FormData = require('form-data');
const fs = require('fs');

const form = new FormData();
form.append('image', fs.createReadStream('product.jpg'));
form.append('dimensions', JSON.stringify({
  width: 10, height: 15, depth: 5
}));

const response = await fetch('https://api.visualsize.ai/v1/process', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: form
});

Python

import requests
import json

url = "https://api.visualsize.ai/v1/process"
headers = {
  "Authorization": "Bearer YOUR_API_KEY"
}

files = {
  "image": open("product.jpg", "rb")
}

data = {
  "dimensions": json.dumps({
    "width": 10, "height": 15, "depth": 5
  })
}

response = requests.post(url, headers=headers, files=files, data=data)

PHP

<?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.visualsize.ai/v1/process',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer YOUR_API_KEY'
  ),
  CURLOPT_POSTFIELDS => array(
    'image' => new CURLFile('product.jpg'),
    'dimensions' => json_encode(array(
      'width' => 10, 'height' => 15, 'depth' => 5
    ))
  )
));

$response = curl_exec($curl);

cURL

curl -X POST https://api.visualsize.ai/v1/process \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@product.jpg" \
  -F "dimensions={\"width\": 10, \"height\": 15, \"depth\": 5}" \
  -F "style=detailed" \
  -F "format=png"

SDKs & Resources

Official SDKs and helpful resources to accelerate your development.

JavaScript SDK

Official Node.js and browser SDK

Download →

Python SDK

Easy integration for Python apps

Download →

PHP SDK

Laravel and PHP integration

Download →

Postman Collection

Test APIs with our collection

Import →