{"openapi":"3.1.0","info":{"title":"Metal Casting API","version":"1.0.0","description":"Metal-casting and foundry maths as an API, computed locally and deterministically — the solidification-time, shrinkage and melt-weight numbers a foundryman, patternmaker or casting designer works a job to. The solidification-time endpoint applies Chvorinov's rule, t = B × (V/A)², where V/A is the casting modulus (volume ÷ cooling surface area) and B is the mould constant (~2–4 min/cm² for sand): a chunky part with little surface for its volume freezes slowly, a thin one fast — and because a riser must stay molten longer than the casting it feeds, its modulus has to be larger, which is the number that sizes it. The pattern-shrinkage endpoint makes the pattern oversize for the metal that shrinks as it cools: pattern = casting dimension × (1 + shrinkage/100), the patternmaker's contraction rule — about 1.0–1.6 % for grey iron, ~2 % for steel and aluminium — so a 100 mm steel feature needs a 102 mm pattern. The melt-weight endpoint gives the casting weight = volume × metal density (iron ~7.2, steel ~7.85, aluminium ~2.70 g/cm³) and the metal to actually pour = casting weight ÷ the casting yield, because the sprue, runners and risers are remelted scrap — a 7 kg iron casting at 70 % yield needs about 10 kg in the ladle. Everything is computed locally and deterministically, so it is instant and private. Ideal for foundry and patternmaking tools, casting-design and estimating apps, and metalworking calculators. Pure local computation — no key, no third-party service, instant. 3 compute endpoints. For a part's weight from its dimensions use a metal-weight API; for welded joints a welding API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/casting-api","description":"oanor gateway"}],"tags":[{"name":"Casting"},{"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/melt-weight":{"get":{"operationId":"get_v1_melt_weight","tags":["Casting"],"summary":"Cast weight and metal to melt","description":"","parameters":[{"name":"volume_cm3","in":"query","required":true,"description":"Casting volume (cm³)","schema":{"type":"string"},"example":"1000"},{"name":"density_g_cm3","in":"query","required":true,"description":"Metal density (g/cm³)","schema":{"type":"string"},"example":"7.0"},{"name":"yield_pct","in":"query","required":false,"description":"Casting yield (%, default 70)","schema":{"type":"string"},"example":"70"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The casting weight = its volume × the metal density (grey iron ~7.2, steel ~7.85, aluminium ~2.70, brass ~8.5 g/cm³). But you must melt more than the part: the sprue, runners and risers are remelted scrap, so the metal to pour = casting weight ÷ the casting yield (the fraction that ends up as good casting, often 50–75 % for sand work). A 7 kg iron casting at 70 % yield needs about 10 kg in the ladle.","inputs":{"yield_pct":70,"volume_cm3":1000,"density_g_cm3":7},"cast_weight_g":7000,"cast_weight_kg":7,"metal_to_melt_g":10000,"metal_to_melt_kg":10},"meta":{"timestamp":"2026-06-07T08:17:50.241Z","request_id":"ee9060ea-8668-4ea1-9373-f339a8e3631d"},"status":"ok","message":"Melt 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/pattern-shrinkage":{"get":{"operationId":"get_v1_pattern_shrinkage","tags":["Casting"],"summary":"Oversize pattern dimension","description":"","parameters":[{"name":"casting_dimension_mm","in":"query","required":true,"description":"Finished casting dimension (mm)","schema":{"type":"string"},"example":"100"},{"name":"shrinkage_pct","in":"query","required":false,"description":"Shrinkage (%, default 2.0)","schema":{"type":"string"},"example":"2.0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Metal shrinks as it cools from freezing to room temperature, so the pattern must be made oversize: pattern = casting dimension × (1 + shrinkage/100). The patternmaker's 'contraction rule' bakes this in — about 1.0–1.6 % for grey iron, ~2 % for steel and aluminium, ~1.5 % for brass. A 100 mm steel feature needs a 102 mm pattern. This is solid (linear) contraction only; liquid and freezing shrinkage are fed by the risers.","inputs":{"shrinkage_pct":2,"casting_dimension_mm":100},"allowance_mm":2,"pattern_dimension_mm":102},"meta":{"timestamp":"2026-06-07T08:17:50.321Z","request_id":"c9dbd87f-de1d-419a-ac89-1913d5e6f10e"},"status":"ok","message":"Pattern shrinkage","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/solidification-time":{"get":{"operationId":"get_v1_solidification_time","tags":["Casting"],"summary":"Chvorinov solidification time","description":"","parameters":[{"name":"volume_cm3","in":"query","required":true,"description":"Casting volume (cm³)","schema":{"type":"string"},"example":"1000"},{"name":"surface_area_cm2","in":"query","required":true,"description":"Cooling surface area (cm²)","schema":{"type":"string"},"example":"600"},{"name":"mold_constant_min_cm2","in":"query","required":false,"description":"Mould constant (min/cm², default 2.0)","schema":{"type":"string"},"example":"2.0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Chvorinov's rule sets how long a casting takes to freeze: t = B × (V/A)², where V/A is the casting modulus (volume ÷ cooling surface area) and B is the mould constant (~2–4 min/cm² for sand). A chunky part with a small surface for its volume cools slowly; a thin one freezes fast. Risers must have a larger modulus than the casting so they stay molten longer and feed the shrinkage — this is the number that sizes them.","inputs":{"volume_cm3":1000,"surface_area_cm2":600,"mold_constant_min_cm2":2},"casting_modulus_cm":1.6667,"solidification_time_min":5.556},"meta":{"timestamp":"2026-06-07T08:17:50.420Z","request_id":"906d1c54-e74e-40d2-8ea9-d393328fdb61"},"status":"ok","message":"Solidification time","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":"cm³, cm², mm, g/cm³, min. t = B·(V/A)²; pattern = casting·(1+shrink/100); cast = V·ρ, melt = cast/yield. For a part's weight from dimensions use a metal-weight API; for welding a welding API.","service":"casting-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/melt-weight":"Cast weight and metal to melt from volume, density and yield.","GET /v1/pattern-shrinkage":"Oversize pattern dimension for shrinkage.","GET /v1/solidification-time":"Solidification time and modulus by Chvorinov's rule."},"description":"Metal-casting / foundry maths: Chvorinov solidification time, pattern shrinkage allowance, and melt weight from volume and density."},"meta":{"timestamp":"2026-06-07T08:17:50.521Z","request_id":"0b2eed4a-fe32-4464-abdc-21f0fc604f6e"},"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":6900,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":870,"monthly_call_quota":63500,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2900,"monthly_call_quota":258000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":8900,"monthly_call_quota":1195000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/casting-api"}