{"openapi":"3.1.0","info":{"title":"Gold Purity API","version":"1.0.0","description":"Gold purity and karat maths as an API, computed locally and deterministically — the karat, fineness and alloy numbers a jeweller, goldsmith, assayer or refiner works to. The karat-to-fineness endpoint converts between the two purity systems: karat is the number of 24ths of a piece that is pure gold, so the fineness (parts per thousand, the figure on a hallmark stamp) = karat ÷ 24 × 1000 and the gold percentage = karat ÷ 24 × 100 — 24K is pure (1000‰), 18K is 750‰ (75 %), 14K is 583‰, 9K is 375‰. The pure-gold-weight endpoint gives the actual fine gold in a piece = its total weight × the gold fraction (karat ÷ 24): a 10 g 18K ring holds 7.5 g of gold and 2.5 g of alloy, the fine-gold content a refiner pays on and the basis of the intrinsic metal value. The alloy-mix endpoint inverts it for the bench: to bring refined fine gold down to a target karat, the total weight = the fine gold ÷ (target karat ÷ 24) and the alloy to add = the total − the fine gold, so 7.5 g of pure gold makes 10 g of 18K with 2.5 g of master alloy. Everything is computed locally and deterministically, so it is instant and private. Ideal for jewellery and goldsmithing tools, pawn and scrap-gold apps, and assay and metal-value calculators. Pure local computation — no key, no third-party service, instant. Purity maths only — it does not fetch the live gold price. 3 compute endpoints. For a metal part's weight from its dimensions use a metal-weight API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/goldpurity-api","description":"oanor gateway"}],"tags":[{"name":"Gold"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/alloy-mix":{"get":{"operationId":"get_v1_alloy_mix","tags":["Gold"],"summary":"Alloy to add for a target karat","description":"","parameters":[{"name":"pure_gold_g","in":"query","required":true,"description":"Fine gold mass (g)","schema":{"type":"string"},"example":"7.5"},{"name":"target_karat","in":"query","required":true,"description":"Target karat (0.1–24)","schema":{"type":"string"},"example":"18"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"To bring fine gold down to a target karat, the fine gold must end up as karat ÷ 24 of the total, so the total weight = the fine gold ÷ that fraction and the alloy to add = the total − the fine gold. Starting from 7.5 g of pure gold for 18K gives a 10 g total, so add 2.5 g of alloy. Lower karats need more alloy; 24K needs none. This is the master-alloy batching a goldsmith does to hit a karat from refined gold.","inputs":{"pure_gold_g":7.5,"target_karat":18},"alloy_to_add_g":2.5,"total_weight_g":10,"target_fineness_permille":750},"meta":{"timestamp":"2026-06-07T08:17:54.510Z","request_id":"516eb088-4b6d-4e44-8c6d-1f9601d7bac1"},"status":"ok","message":"Alloy mix","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/karat-to-fineness":{"get":{"operationId":"get_v1_karat_to_fineness","tags":["Gold"],"summary":"Karat to fineness and percent","description":"","parameters":[{"name":"karat","in":"query","required":true,"description":"Karat (0–24)","schema":{"type":"string"},"example":"18"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Karat is the number of 24ths of a piece that is pure gold, so the fineness (parts per thousand) = karat ÷ 24 × 1000 and the gold percentage = karat ÷ 24 × 100. 24K is pure (1000‰, 100 %), 18K is 750‰ (75 %), 14K is 583‰ (58.3 %), 9K is 375‰. Hallmark stamps quote the fineness directly — 750 for 18K — so this is the conversion between the two systems jewellers and assayers move between.","inputs":{"karat":18},"gold_percent":75,"gold_fraction":0.75,"fineness_permille":750},"meta":{"timestamp":"2026-06-07T08:17:54.606Z","request_id":"e0442c49-ee24-4823-bd84-f319229abe24"},"status":"ok","message":"Karat to fineness","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/pure-gold-weight":{"get":{"operationId":"get_v1_pure_gold_weight","tags":["Gold"],"summary":"Pure gold weight in a piece","description":"","parameters":[{"name":"total_weight_g","in":"query","required":true,"description":"Total piece weight (g)","schema":{"type":"string"},"example":"10"},{"name":"karat","in":"query","required":true,"description":"Karat (0–24)","schema":{"type":"string"},"example":"18"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The pure (fine) gold in a piece = its total weight × the gold fraction (karat ÷ 24). A 10 g 18K ring holds 7.5 g of actual gold and 2.5 g of alloy metals (copper, silver, etc.). This is the fine-gold content that drives the intrinsic metal value and what a refiner pays on — the rest is the alloy that gives the colour and hardness.","inputs":{"karat":18,"total_weight_g":10},"alloy_g":2.5,"pure_gold_g":7.5,"gold_fraction":0.75},"meta":{"timestamp":"2026-06-07T08:17:54.680Z","request_id":"5a6bddc3-1271-462e-a89d-37a7ab35c971"},"status":"ok","message":"Pure gold weight","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Karat = 24ths pure gold; fineness = karat/24·1000 ‰. pure = total·karat/24; total = pure·24/target_karat. Grams. Metal-value and refining context only — for a metal's weight from its dimensions use a metal-weight API.","service":"goldpurity-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/alloy-mix":"Alloy to add to fine gold to reach a target karat.","GET /v1/pure-gold-weight":"Pure gold and alloy weight from total weight and karat.","GET /v1/karat-to-fineness":"Fineness (per mille) and gold percent from a karat."},"description":"Gold purity / karat maths: karat to fineness and percent, pure-gold weight in a piece, and alloy mix to a target karat."},"meta":{"timestamp":"2026-06-07T08:17:54.776Z","request_id":"ed6bd1f3-96e5-4e85-8126-cdff5fa53165"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":6800,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":740,"monthly_call_quota":60000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2460,"monthly_call_quota":248000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7600,"monthly_call_quota":1150000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/goldpurity-api"}