QuickLens jewellery visual search API
The QuickLens jewellery visual search API (jewelry, in US spelling) is a REST API at api.quicklens.org that searches your own product catalogue by image, by text or by product ID, with an X-API-Key header on every request. Results come from your catalogue, not the public web, ranked with a match score. It is for jewellery manufacturers, wholesalers and retail chains that want the same QuickLens search in their own website or app, and for software companies that build it into their ERP, POS or e-commerce platform.
Building it yourself? Read: how to build jewellery image search, or when to buy it
Upload your product catalog and search visually — by image, text, or product ID.
api.quicklens.orgAuth: X-API-Key headerQuick start — upload your first design:
curl -X POST https://api.quicklens.org/api/assets/upload-json \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"project_id": "your-project-id",
"rows": [
{
"product_id": "SKU-001",
"url": "https://cdn.example.com/product1.jpg",
"category": "Necklaces",
"metadata": { "color": "gold", "weight": "12g" }
}
]
}'Authentication
All API requests require an X-API-Key header. You can generate your API key from the QuickLens dashboard.
X-API-Key: ql_live_your_api_key
⚠️ Keep your API key secure
Never expose your API key in client-side code. Always make API calls from your backend server.
Upload APIs
Upload your product catalog via JSON or CSV.
/api/assets/upload-jsonUpload up to 500 assets per request. If ≤50 items, the response is synchronous. If >50, you'll receive a task_id for async polling.
Request Body
{
"project_id": "uuid",
"rows": [
{
"product_id": "SKU-001",
"url": "https://cdn.example.com/ring1.jpg",
"category": "Rings",
"active": true,
"metadata": {
"color": "rose gold",
"weight": "5.2g",
"gender": "female"
}
}
]
}Success Response (sync, ≤50 items)
{
"status": "success",
"stats": { "total": 1, "created": 1, "updated": 0, "failed": 0 },
"results": [
{ "product_id": "SKU-001", "status": "created", "error": null }
]
}Async Response (>50 items)
{
"status": "processing",
"task_id": "task_abc123",
"message": "Bulk asset upload is being processed asynchronously. Total assets: 200",
"total": 200
}• Max 500 rows per request
• Duplicate product_id updates the existing asset
• Image URLs must be publicly accessible
/api/assets/Upload a CSV file (max 50 MB). Content-Type: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
| project_id | string (uuid) | Yes | Target project |
| file | file | Yes | CSV file, max 50 MB |
Example CSV
Product ID,imageURL,Category,color,weight SKU-001,https://cdn.example.com/ring1.jpg,Rings,gold,5g SKU-002,https://cdn.example.com/necklace1.jpg,Necklaces,silver,12g
Response
{
"id": "upload-uuid",
"status": "pending",
"total_rows": 2,
"processed_rows": 0,
"batch_id": "batch_xyz"
}/api/assets/upload-json/status/{task_id}Poll every 2–5 seconds until status is completed.
{
"task_id": "task_abc123",
"status": "completed",
"stats": { "total": 200, "created": 198, "updated": 0, "failed": 2 },
"results": [
{ "product_id": "SKU-001", "status": "created", "error": null },
{ "product_id": "SKU-BAD", "status": "failed", "error": "Invalid image URL" }
]
}Search APIs
Search your catalog visually by image, text description, or product ID.
/api/reverse-search/search-imageUpload a photo, get visually similar products from your catalog. Content-Type: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
| project_id | uuid | Yes | Project to search |
| file | image | Yes | JPEG/PNG/WebP, max 10 MB |
| filters | JSON string | No | Filter by metadata |
| per_page | int | No | Results per page (max 300) |
| page | int | No | Page number |
curl -X POST https://api.quicklens.org/api/reverse-search/search-image \
-H "X-API-Key: your_api_key" \
-F "project_id=your-project-id" \
-F "file=@customer_photo.jpg" \
-F 'filters={"category": ["Rings", "Bangles"]}'Response
{
"items": [
{
"label": "SKU-001",
"product_id": "SKU-001",
"asset_id": "asset-001",
"score": 0.94,
"metadata": { "color": "gold", "weight": "12g" }
},
{
"label": "SKU-042",
"product_id": "SKU-042",
"asset_id": "asset-042",
"score": 0.87,
"metadata": { "color": "gold", "weight": "9g" }
}
],
"meta": {
"page": 1,
"per_page": 300,
"total": 45,
"total_pages": 1,
"has_next": false
},
"search_type": "image_upload",
"total_results": 45
}Each item gives its label, product_id, asset_id and score at the top level. metadata holds your own extra columns, such as color and weight in the upload example above; category and the image URL are not returned. score ranks the items: higher means a closer match. Compare scores within one response only, not across searches or endpoints.
/api/reverse-search/search-textDescribe what you're looking for in natural language.
| Field | Type | Required | Description |
|---|---|---|---|
| project_id | uuid | Yes | Project to search |
| search_text | string | Yes | e.g. "diamond studded gold bangle" |
| filters | JSON string | No | Filter by metadata |
| per_page | int | No | Max 300 |
| page | int | No | Page number |
curl -X POST https://api.quicklens.org/api/reverse-search/search-text \
-H "X-API-Key: your_api_key" \
-F "project_id=your-project-id" \
-F "search_text=diamond studded gold bangle" \
-F 'filters={"gender": ["female"]}'Response format is identical to Search by Image, with "search_type": "text_search".
/api/reverse-search/search-productFind visually similar products to an existing item in your catalog. Perfect for "You may also like" features.
| Field | Type | Required | Description |
|---|---|---|---|
| project_id | uuid | Yes | Project to search |
| product_id | string | Yes | Existing product ID |
| filters | JSON string | No | Filter by metadata |
| per_page | int | No | Max 300 |
curl -X POST https://api.quicklens.org/api/reverse-search/search-product \ -H "X-API-Key: your_api_key" \ -F "project_id=your-project-id" \ -F "product_id=SKU-001"
Response format is identical to Search by Image, with "search_type": "product_search".
Error Handling
All errors follow a consistent response shape:
{
"status": "error",
"error_code": "NOT_AUTHORIZED",
"message": "Invalid API key provided."
}Error Reference
| Error Code | HTTP | Meaning |
|---|---|---|
| NOT_AUTHORIZED | 401 | Invalid or missing API key |
| ACCESS_DENIED | 403 | No access to this resource |
| PROJECT_NOT_FOUND | 404 | Project doesn't exist |
| INVALID_INPUT | 400 | Bad request body or params |
| FILE_SIZE_EXCEEDED | 400 | File too large (50MB CSV / 10MB image) |
| ROW_LIMIT_EXCEEDED | 400 | JSON upload exceeds 500 rows |
| NO_RESULTS_FOUND | 404 | Search returned no results |
| SERVER_ERROR | 500 | Something went wrong |
Need help integrating? Email pranshu@quicklens.org
