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.

    Base URL: api.quicklens.orgAuth: X-API-Key header

    Quick 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.

    POST/api/assets/upload-json

    Upload 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

    POST/api/assets/

    Upload a CSV file (max 50 MB). Content-Type: multipart/form-data

    FieldTypeRequiredDescription
    project_idstring (uuid)YesTarget project
    filefileYesCSV 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"
    }
    GET/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" }
      ]
    }
    POST/api/reverse-search/search-image

    Upload a photo, get visually similar products from your catalog. Content-Type: multipart/form-data

    FieldTypeRequiredDescription
    project_iduuidYesProject to search
    fileimageYesJPEG/PNG/WebP, max 10 MB
    filtersJSON stringNoFilter by metadata
    per_pageintNoResults per page (max 300)
    pageintNoPage 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.

    POST/api/reverse-search/search-text

    Describe what you're looking for in natural language.

    FieldTypeRequiredDescription
    project_iduuidYesProject to search
    search_textstringYese.g. "diamond studded gold bangle"
    filtersJSON stringNoFilter by metadata
    per_pageintNoMax 300
    pageintNoPage 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".

    POST/api/reverse-search/search-product

    Find visually similar products to an existing item in your catalog. Perfect for "You may also like" features.

    FieldTypeRequiredDescription
    project_iduuidYesProject to search
    product_idstringYesExisting product ID
    filtersJSON stringNoFilter by metadata
    per_pageintNoMax 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 CodeHTTPMeaning
    NOT_AUTHORIZED401Invalid or missing API key
    ACCESS_DENIED403No access to this resource
    PROJECT_NOT_FOUND404Project doesn't exist
    INVALID_INPUT400Bad request body or params
    FILE_SIZE_EXCEEDED400File too large (50MB CSV / 10MB image)
    ROW_LIMIT_EXCEEDED400JSON upload exceeds 500 rows
    NO_RESULTS_FOUND404Search returned no results
    SERVER_ERROR500Something went wrong

    Need help integrating? Email pranshu@quicklens.org