Image Classification
What it does
Classify products directly from photos using AI vision analysis. Upload an image URL or base64-encoded image data, and POTAL will identify the product and assign the correct HS code. Supports JPEG, PNG, GIF, and WebP formats up to 5MB. Ideal for visual product catalogs or mobile-first workflows.
Required Fields for 100% Accuracy
0 required / 4 total| Field | Type | Required |
|---|---|---|
imageUrl | string | opt |
imageBase64 | string | opt |
productHint | string | opt |
destination_country | string | opt |
Tips for Best Accuracy
- ✓Either imageUrl or imageBase64 must be provided (one is required)
- ✓Clear, single-product photos yield the best results
- ✓productHint significantly improves accuracy for visually ambiguous products
- ✓Image classification uses AI vision — slightly slower than text-based classification
Common Mistakes
- ✗Providing both imageUrl and imageBase64 — use one or the other
- ✗Low-quality or cluttered images — crop to show only the product
- ✗Images with text overlays or watermarks — these confuse the vision model
- ✗Expecting the same confidence as text-based — image mode typically scores 0.7–0.9
How to use it
Prepare your image
Use a clear product photo. Supported formats: JPEG, PNG, GIF, WebP. Max size: 5MB.
Send as URL or base64
Include imageUrl for hosted images or imageBase64 for direct upload in the classify request.
Review detected product
The response includes detectedProductName showing what the AI identified from the image.
Refine if needed
Add a productHint to guide classification if the image is ambiguous.
API Reference
/api/v1/classify{
"imageUrl": "https://example.com/product-photo.jpg",
"productHint": "kitchen appliance"
}{
"hsCode": "8516.79",
"description": "Electric coffee maker",
"confidence": 0.87,
"detectedProductName": "Electric drip coffee maker",
"alternatives": [
{
"hsCode": "8419.81",
"confidence": 0.62
}
]
}curl -X POST https://potal.app/api/v1/classify \
-H "X-API-Key: pk_live_your_key" \
-H "Content-Type: application/json" \
-d '{"imageUrl":"https://example.com/product-photo.jpg","productHint":"kitchen appliance"}'Related Features
Classify products into 5,000+ HS codes using the v3.3 GRI pipeline
Multi-dimensional confidence scoring for every classification result
Classify hundreds of products at once via CSV or JSON batch API
Detect country of origin from product description and brand analysis
9-field input validation ensuring accurate classification inputs