Aller au contenu
GET /v1/carat-to-grams

Carat to grams, mg and points

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/gemstone-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/gemstone-api/v1/carat-to-grams" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/gemstone-api/v1/carat-to-grams", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/gemstone-api/v1/carat-to-grams");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/gemstone-api/v1/carat-to-grams",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "note": "The metric carat is exactly 0.2 grams (200 mg), and one carat is split into 100 points — so a 1.5 ct stone is 0.3 g and 150 points, and a 0.25 ct stone is a 'twenty-five pointer'. The carat is a mass unit, not a size: a 1 ct diamond and a 1 ct emerald weigh the same but look very different in size because their densities differ.",
        "grams": 0.3,
        "inputs": {
            "carat": 1.5
        },
        "points": 150,
        "milligrams": 300
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:54.155Z",
        "request_id": "b3f0f3d5-6b3f-4421-b762-d09b58b30fda"
    },
    "status": "ok",
    "message": "Carat to grams",
    "success": true
}