Retailab APIDocumentation
Integrate our AI-powered product detection into your applications with our RESTful API.
Base URL
http://localhost:8080/protected-apiAll API requests should be made to this base URL.
Quick Example
Here's a simple example of creating a job to detect products in an image:
curl -X POST http://localhost:8080/protected-api/jobs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-API-Key: YOUR_API_KEY" \
-F "image=@/path/to/image.jpg" \
-F 'all_skus=[{"code":"coca_cola_classic_500ml","name":"Coca-Cola Classic 500ml","description":"Red can with white logo"}]'Getting Your API Key
To use the Retailab API, you need an API key. You can create and manage your API keys from the dashboard.
Steps to Get Your API Key:
- Sign in to your Retailab account
- Navigate to the Dashboard
- Click "Create New Key" in the API Keys section
- Configure your key with appropriate permissions (read, write, auto_labeling)
- Copy your API key immediately - it's only shown once!
Using Your API Key
Include your API key in every request using one of these methods:
Include your API key in the X-API-Key header:
X-API-Key: YOUR_API_KEYSecurity Best Practices
- • Never expose your API keys in client-side code or public repositories
- • Use environment variables to store your keys securely
- • Rotate your keys periodically and revoke unused ones
/jobsCreate JobCreate a new auto-labeling job to detect products in an uploaded image. The job will be processed asynchronously.
Request
Content-Type: multipart/form-data
Form Fields:
image(required) - Image file (JPG, PNG, WEBP)all_skus(required) - JSON string array of SKU objects
SKU Object Format
{
"code": "coca_cola_classic_500ml",
"name": "Coca-Cola Classic 500ml Aluminum Can",
"description": "Bright red background (#DC143C), white Spencerian script logo..."
}Example Request
curl -X POST http://localhost:8080/protected-api/jobs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-API-Key: YOUR_API_KEY" \
-F "image=@/path/to/image.jpg" \
-F 'all_skus=[{"code":"coca_cola_classic_500ml","name":"Coca-Cola Classic 500ml","description":"Red can with white logo"}]'Response
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"message": "Job created successfully",
"status": "pending"
}/jobsList JobsRetrieve a list of all your auto-labeling jobs. Returns jobs ordered by creation date (newest first).
Example Request
curl -X GET http://localhost:8080/protected-api/jobs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-API-Key: YOUR_API_KEY"Response
{
"data": [
{
"id": 1,
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"user_email": "user@example.com",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:45Z",
"completed_at": "2024-01-15T10:30:45Z",
"used_ai_input_tokens": 1500,
"used_ai_output_tokens": 800,
"used_tokens": 50000,
"error_message": null
}
]
}/jobs/{id}/stateGet Job StateCheck the current state of a job. Useful for polling to know when a job has completed.
Path Parameters
id(required) - The job ID returned from creating a job
Example Request
curl -X GET http://localhost:8080/protected-api/jobs/550e8400-e29b-41d4-a716-446655440000/state \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-API-Key: YOUR_API_KEY"Response
{
"data": "completed"
}Possible values: pending, processing, completed, failed
/jobs/{id}Get Job ResultRetrieve the complete results of a completed job, including detection images and job metadata.
This endpoint only returns results for completed jobs. Check the job state first to ensure it's completed.
Example Request
curl -X GET http://localhost:8080/protected-api/jobs/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-API-Key: YOUR_API_KEY"Response
{
"data": {
"job": {
"id": 1,
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"user_email": "user@example.com",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:45Z",
"completed_at": "2024-01-15T10:30:45Z",
"used_ai_input_tokens": 1500,
"used_ai_output_tokens": 800,
"used_tokens": 50000,
"error_message": null
},
"result_image": "https://example.com/results/result_image.jpg",
"detections_image": "https://example.com/results/detections_image.jpg"
}
}Brand Accuracy
96.92%
Macro F1: 94.50%
Sub-Brand Accuracy
94.61%
Macro F1: 93.67%
Avg. Confidence
95.51%
On correct predictions: 96.73%
Classes Supported
189 brands
+ 358 sub-brand classes
| Brand | F1-Score | Precision | Recall | Support |
|---|---|---|---|---|
| Aguardiente Amarillo | 100.00% | 100.00% | 100.00% | 1 |
| Aguila Roja | 100.00% | 100.00% | 100.00% | 1 |
| Ariel | 100.00% | 100.00% | 100.00% | 84 |
| Baby Dove | 100.00% | 100.00% | 100.00% | 50 |
| Bacardi | 100.00% | 100.00% | 100.00% | 16 |
| Bonfiest | 100.00% | 100.00% | 100.00% | 1 |
| Cheese Tris | 100.00% | 100.00% | 100.00% | 8 |
| Cheetos | 100.00% | 100.00% | 100.00% | 22 |
| Choclitos | 100.00% | 100.00% | 100.00% | 15 |
| Choco Listo | 100.00% | 100.00% | 100.00% | 10 |
| Chocorramo | 100.00% | 100.00% | 100.00% | 9 |
| Chokis | 100.00% | 100.00% | 100.00% | 5 |
| Clorox | 100.00% | 100.00% | 100.00% | 22 |
| Doritos | 100.00% | 100.00% | 100.00% | 28 |
| Ego | 100.00% | 100.00% | 100.00% | 10 |
| Familia | 100.00% | 100.00% | 100.00% | 12 |
| Fassi | 100.00% | 100.00% | 100.00% | 17 |
| Flips | 100.00% | 100.00% | 100.00% | 11 |
| Gala | 100.00% | 100.00% | 100.00% | 6 |
| Gol | 100.00% | 100.00% | 100.00% | 10 |
| Hills | 100.00% | 100.00% | 100.00% | 9 |
| Huggies | 100.00% | 100.00% | 100.00% | 31 |
| Intibon | 100.00% | 100.00% | 100.00% | 4 |
| Jgb Alcohol | 100.00% | 100.00% | 100.00% | 7 |
| Kelloggs | 100.00% | 100.00% | 100.00% | 5 |
| Kotex | 100.00% | 100.00% | 100.00% | 12 |
| Ladysoft | 100.00% | 100.00% | 100.00% | 19 |
| Loreal | 100.00% | 100.00% | 100.00% | 11 |
| Los Cuates | 100.00% | 100.00% | 100.00% | 7 |
| Mani Moto | 100.00% | 100.00% | 100.00% | 12 |
| Max | 100.00% | 100.00% | 100.00% | 25 |
| Mexsana | 100.00% | 100.00% | 100.00% | 51 |
| Mr Tea | 100.00% | 100.00% | 100.00% | 4 |
| Natuchips | 100.00% | 100.00% | 100.00% | 12 |
| Old Spice | 100.00% | 100.00% | 100.00% | 34 |
| Olmeca | 100.00% | 100.00% | 100.00% | 5 |
| Palette | 100.00% | 100.00% | 100.00% | 23 |
| Raid | 100.00% | 100.00% | 100.00% | 14 |
| Recamier | 100.00% | 100.00% | 100.00% | 14 |
| Sanson | 100.00% | 100.00% | 100.00% | 7 |
| Seven Up | 100.00% | 100.00% | 100.00% | 4 |
| Sprite | 100.00% | 100.00% | 100.00% | 21 |
| Stay Free | 100.00% | 100.00% | 100.00% | 6 |
| Suavitel | 100.00% | 100.00% | 100.00% | 10 |
| Super Ricas | 100.00% | 100.00% | 100.00% | 51 |
| Tostacos | 100.00% | 100.00% | 100.00% | 14 |
| Trolli | 100.00% | 100.00% | 100.00% | 7 |
| Valle | 100.00% | 100.00% | 100.00% | 35 |
| Todorico | 99.32% | 100.00% | 98.65% | 74 |
| Super Blank | 99.27% | 100.00% | 98.55% | 69 |
| Bebex | 99.22% | 98.46% | 100.00% | 64 |
| De Todito | 99.21% | 98.44% | 100.00% | 63 |
| Cristalino | 99.20% | 100.00% | 98.41% | 63 |
| Arrurru | 99.16% | 98.33% | 100.00% | 59 |
| Dogourmet | 99.05% | 99.57% | 98.53% | 475 |
| Margarita | 99.05% | 100.00% | 98.11% | 106 |
| Nosotras | 98.99% | 98.99% | 98.99% | 99 |
| Cat Chow | 98.92% | 100.00% | 97.87% | 235 |
| Pequenin | 98.89% | 100.00% | 97.80% | 91 |
| Bbc | 98.82% | 97.67% | 100.00% | 42 |
| Carefree | 98.82% | 97.67% | 100.00% | 42 |
| Axion | 98.73% | 100.00% | 97.50% | 80 |
| Mi Dia | 98.72% | 98.72% | 98.72% | 78 |
| Head Shoulders | 98.71% | 99.48% | 97.96% | 196 |
| Igora | 98.70% | 100.00% | 97.44% | 39 |
| Ponds | 98.70% | 97.44% | 100.00% | 38 |
| Protex | 98.62% | 100.00% | 97.28% | 147 |
| Schick | 98.55% | 97.14% | 100.00% | 34 |
| Lady Speed Stick | 98.38% | 100.00% | 96.81% | 94 |
| Postobon | 98.36% | 96.77% | 100.00% | 30 |
| Winny | 98.36% | 98.36% | 98.36% | 183 |
| Aromax | 98.31% | 96.67% | 100.00% | 29 |
| Nescafe | 98.31% | 100.00% | 96.67% | 30 |
| Quatro | 98.31% | 96.67% | 100.00% | 29 |
| Babysec | 98.18% | 96.43% | 100.00% | 27 |
| Fortident | 98.18% | 97.59% | 98.78% | 82 |
| Oralb | 98.16% | 98.77% | 97.56% | 82 |
| Balance | 98.15% | 99.07% | 97.25% | 109 |
| Dorado | 98.04% | 96.15% | 100.00% | 25 |
| Fluocardent | 97.96% | 96.00% | 100.00% | 96 |
| Hit | 97.92% | 97.92% | 97.92% | 48 |
| Johnsons | 97.92% | 99.40% | 96.49% | 171 |
| Rexona | 97.92% | 98.60% | 97.24% | 145 |
| Listerine | 97.83% | 97.83% | 97.83% | 92 |
| Savital | 97.79% | 99.25% | 96.38% | 138 |
| Agility Gold | 97.78% | 97.78% | 97.78% | 45 |
| Speed Max | 97.67% | 95.45% | 100.00% | 21 |
| Pantene | 97.52% | 96.72% | 98.33% | 120 |
| Nutriss | 97.51% | 97.16% | 97.86% | 140 |
| Carey | 97.37% | 97.37% | 97.37% | 76 |
| Pepsi | 97.37% | 94.87% | 100.00% | 37 |
| Nutribela | 97.26% | 97.93% | 96.60% | 147 |
| Brisa | 97.06% | 97.06% | 97.06% | 34 |
| Soka | 97.06% | 97.06% | 97.06% | 34 |
| Colgate | 96.80% | 99.07% | 94.64% | 336 |
| Jumbo | 96.77% | 95.74% | 97.83% | 46 |
| Gillette | 96.73% | 97.37% | 96.10% | 77 |
| Grisly | 96.55% | 93.33% | 100.00% | 14 |
| Nectar | 96.55% | 100.00% | 93.33% | 15 |
| Cocosette | 96.43% | 93.10% | 100.00% | 27 |
| Cristal | 96.36% | 98.15% | 94.64% | 56 |
| Nucita | 96.30% | 92.86% | 100.00% | 13 |
| Vive 100 | 96.30% | 92.86% | 100.00% | 13 |
| Lak | 96.24% | 94.12% | 98.46% | 65 |
| Colombiana | 96.10% | 100.00% | 92.50% | 40 |
| Coca Cola | 96.04% | 95.10% | 97.00% | 100 |
| Aguardiente Antioqueno | 96.00% | 94.74% | 97.30% | 74 |
| Ritz | 96.00% | 92.31% | 100.00% | 12 |
| Axe | 95.89% | 92.11% | 100.00% | 35 |
| Sedal | 95.89% | 98.13% | 93.75% | 112 |
| Blancox | 95.71% | 96.30% | 95.12% | 82 |
| Electrolit | 95.65% | 95.65% | 95.65% | 23 |
| Speed Stick | 95.65% | 91.67% | 100.00% | 11 |
| Aromatel | 95.30% | 95.95% | 94.67% | 75 |
| Dove | 95.24% | 90.91% | 100.00% | 50 |
| Excellent | 95.24% | 90.91% | 100.00% | 10 |
| Tio Nacho | 95.24% | 92.59% | 98.04% | 51 |
| Pony Malta | 94.87% | 94.87% | 94.87% | 39 |
| Equilibrio | 94.74% | 90.00% | 100.00% | 9 |
| Festival | 94.74% | 90.00% | 100.00% | 9 |
| Gato Negro | 94.74% | 94.74% | 94.74% | 19 |
| Natumalta | 94.74% | 90.00% | 100.00% | 9 |
| Pulp | 94.74% | 90.00% | 100.00% | 9 |
| Nutre Can | 94.44% | 89.47% | 100.00% | 17 |
| Ron Santafe | 94.44% | 94.44% | 94.44% | 18 |
| Sol | 94.44% | 94.44% | 94.44% | 18 |
| Pilsen | 94.34% | 96.15% | 92.59% | 27 |
| Aguila | 94.12% | 94.12% | 94.12% | 17 |
| Chi Ricos | 94.12% | 88.89% | 100.00% | 8 |
| Cifrut | 94.12% | 94.12% | 94.12% | 17 |
| Ellas | 94.12% | 94.12% | 94.12% | 17 |
| Gatorlit | 94.12% | 88.89% | 100.00% | 8 |
| Lubriderm | 94.12% | 94.12% | 94.12% | 17 |
| Andina | 93.65% | 95.16% | 92.19% | 64 |
| Coco | 93.33% | 87.50% | 100.00% | 7 |
| Fab | 93.33% | 87.50% | 100.00% | 7 |
| Minichips | 93.33% | 87.50% | 100.00% | 7 |
| Suntea | 93.33% | 100.00% | 87.50% | 8 |
| Yodora | 92.90% | 92.39% | 93.41% | 91 |
| Aguardiente Nectar | 92.31% | 85.71% | 100.00% | 6 |
| Saviloe | 92.31% | 100.00% | 85.71% | 7 |
| Top | 91.89% | 100.00% | 85.00% | 20 |
| Azul Clean | 91.80% | 93.33% | 90.32% | 31 |
| Chivas Regal | 90.91% | 90.91% | 90.91% | 11 |
| Gatorade | 90.91% | 83.33% | 100.00% | 10 |
| Nivea | 90.91% | 86.96% | 95.24% | 21 |
| Sanpic | 90.91% | 83.33% | 100.00% | 10 |
| Tanga | 90.91% | 83.33% | 100.00% | 5 |
| H2o | 90.32% | 87.50% | 93.33% | 15 |
| Black And White | 90.00% | 81.82% | 100.00% | 9 |
| Ron Viejo De Caldas | 90.00% | 85.71% | 94.74% | 38 |
| Venus | 90.00% | 100.00% | 81.82% | 11 |
| Elite | 89.66% | 81.25% | 100.00% | 13 |
| Maizitos | 89.66% | 81.25% | 100.00% | 13 |
| Jack Daniels | 89.47% | 89.47% | 89.47% | 19 |
| Big Cola | 89.23% | 93.55% | 85.29% | 68 |
| Hatsu | 89.09% | 89.09% | 89.09% | 55 |
| Baileys | 88.89% | 88.89% | 88.89% | 9 |
| Corona | 88.89% | 100.00% | 80.00% | 5 |
| Dampy | 88.89% | 100.00% | 80.00% | 5 |
| Yupi | 88.89% | 100.00% | 80.00% | 5 |
| Something Special | 88.00% | 91.67% | 84.62% | 13 |
| Sporade | 88.00% | 78.57% | 100.00% | 11 |
| Angela | 87.50% | 87.50% | 87.50% | 8 |
| Buen Dia | 87.50% | 93.33% | 82.35% | 17 |
| Crema N4 | 87.50% | 100.00% | 77.78% | 9 |
| Deseo | 85.71% | 75.00% | 100.00% | 9 |
| Fabuloso | 85.71% | 75.00% | 100.00% | 6 |
| Kola Roman | 85.71% | 75.00% | 100.00% | 9 |
| Vanish | 85.71% | 100.00% | 75.00% | 8 |
| Lozocrem | 84.85% | 82.35% | 87.50% | 16 |
| Tecate | 84.85% | 73.68% | 100.00% | 14 |
| Deo Pies | 83.33% | 71.43% | 100.00% | 5 |
| Dersa | 83.33% | 83.33% | 83.33% | 6 |
| Royal Canin | 82.35% | 77.78% | 87.50% | 8 |
| Ron Medellin | 81.82% | 90.00% | 75.00% | 24 |
| Carinoso | 80.00% | 66.67% | 100.00% | 4 |
| Grants | 80.00% | 100.00% | 66.67% | 6 |
| Jose Cuervo | 80.00% | 100.00% | 66.67% | 6 |
| Lava | 80.00% | 100.00% | 66.67% | 6 |
| Lite | 80.00% | 100.00% | 66.67% | 6 |
| Cielo | 78.26% | 64.29% | 100.00% | 9 |
| Br For Dog | 76.92% | 71.43% | 83.33% | 6 |
| Cicatricure | 75.00% | 60.00% | 100.00% | 6 |
| Trululu | 75.00% | 100.00% | 60.00% | 10 |
| Asepxia | 73.68% | 63.64% | 87.50% | 8 |
| Mk | 72.73% | 80.00% | 66.67% | 6 |
| La Joya | 70.59% | 60.00% | 85.71% | 7 |
| Club Colombia | 66.67% | 100.00% | 50.00% | 2 |
Showing 189 of 189 brands · sorted by F1-Score
How to Read These Results
Metric Definitions
- • F1-Score: Harmonic mean of precision & recall — the primary quality signal
- • Precision: Of all predictions, what fraction was correct
- • Recall: Of all true instances, what fraction was found
- • Confidence ✓: Avg. model confidence when the prediction was correct
- • Support: Number of real instances in the test set
Color Legend
The API uses standard HTTP status codes to indicate success or failure. Error responses include a message describing what went wrong.
400 Bad Request
Invalid request parameters or missing required fields.
401 Unauthorized
Invalid or missing API key.
403 Forbidden
API key doesn't have required permissions.
404 Not Found
Job ID not found or doesn't belong to you.
Ready to get started?
Create your API key and start integrating product detection into your applications.