DEV Community

Sandeep Roy
Sandeep Roy

Posted on

How I Built an API to Detect Fake Gemstones Using AI

After 30 years in the jewelry trade, I've seen countless people get scammed buying synthetic stones sold as natural. So I built an API to solve this.

What GemLens Does

Send a gemstone image → get back:

  • Stone identification (ruby, sapphire, emerald, etc.)
  • Natural vs synthetic vs glass probability
  • Color, clarity, cut grading
  • Origin estimate
  • Market value range

Quick Example

curl -X POST "https://gemlens.p.rapidapi.com/analyze" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image": "data:image/jpeg;base64,..."}'
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "gemstone": { "type": "Ruby", "confidence": 94 },
  "authenticity": {
    "natural_probability": 92,
    "synthetic_probability": 5,
    "simulant_probability": 3
  },
  "origin": "Myanmar (Burma)",
  "market": { "estimated_retail_value": "$8,500-$12,000" }
}
Enter fullscreen mode Exit fullscreen mode

Who It's For

  • E-commerce platforms selling jewelry
  • Pawn shops needing quick verification
  • Insurance companies
  • Jewelry appraisers
  • Developers building marketplace apps

Try It

Free tier: 50 calls/month
https://rapidapi.com/sgroy10/api/gemlens

Would love feedback!

Top comments (0)