{"openapi":"3.1.0","info":{"title":"Cable Tray Fill API","version":"1.0.0","description":"Cable-tray fill engineering maths as an API, computed locally and deterministically from NEC Article 392 — the allowable-fill, single-layer and tray-width numbers an electrician, estimator or designer runs for a tray run. The fill endpoint applies NEC 392.22(A)(1) Column 1 for multiconductor power and lighting cables no larger than 4/0 in a ladder or ventilated-bottom tray: the total cable cross-sectional area is capped at the tray width × 7/6, so a 12-inch tray allows 14 in² — sum every cable's csa, get the percentage fill and whether it is within code, with the spare area left. The large-cable endpoint covers cables 4/0 and larger, which must lie in a single layer with the sum of their diameters not exceeding the tray width — no stacking — so it returns the spare width and the code check. The min-width endpoint inverts the rule to size the tray: minimum width = cable area × 6/7, rounded up to a standard 6/9/12/18/24/30/36-inch width, leaving room for spare capacity and future cables. Everything is computed locally and deterministically, so it is instant and private. Ideal for electrical-design and estimating tools, industrial and OSP utilities, and code-check calculators. Pure local computation — no key, no third-party service, instant. Ladder/ventilated trays; solid-bottom and mixed fills use the other NEC columns, and ampacity must be derated for fill. 3 compute endpoints. For conduit and box fill use a conduit API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/cabletray-api","description":"oanor gateway"}],"tags":[{"name":"Tray"},{"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/fill":{"get":{"operationId":"get_v1_fill","tags":["Tray"],"summary":"Allowable fill for ≤4/0 cables","description":"","parameters":[{"name":"tray_width_in","in":"query","required":true,"description":"Tray inside width (in)","schema":{"type":"string"},"example":"12"},{"name":"cable_area_in2","in":"query","required":true,"description":"Total cable cross-sectional area (in²)","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"For multiconductor power/lighting cables no larger than 4/0 in a ladder or ventilated-bottom tray, NEC 392.22(A)(1) Column 1 caps the total cable cross-sectional area at the tray width × 7/6 (e.g. a 12-inch tray allows 14 in²). Sum every cable's csa and keep it under that. Solid-bottom trays and trays mixing large and small cables use the other columns/rows — and remember ampacity must be derated for fill under 392.80.","inputs":{"tray_width_in":12,"cable_area_in2":10},"fill_pct":71.4,"within_code":true,"spare_area_in2":4,"allowable_fill_area_in2":14},"meta":{"timestamp":"2026-06-07T08:18:04.453Z","request_id":"cb0d3ba9-3063-4100-99aa-a637b6baa361"},"status":"ok","message":"Cable tray fill","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/large-cable":{"get":{"operationId":"get_v1_large_cable","tags":["Tray"],"summary":"Single-layer check for ≥4/0 cables","description":"","parameters":[{"name":"tray_width_in","in":"query","required":true,"description":"Tray inside width (in)","schema":{"type":"string"},"example":"12"},{"name":"sum_of_diameters_in","in":"query","required":true,"description":"Sum of cable diameters (in)","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"For multiconductor cables 4/0 and larger, NEC 392.22(A)(1) requires them laid in a single layer with the sum of their diameters not exceeding the tray width — they cannot be stacked or bundled. So a 12-inch tray holds cables whose diameters add up to 12 inches side by side. Mixing these with smaller cables triggers the combination rule in 392.22(A)(1)(c).","inputs":{"tray_width_in":12,"sum_of_diameters_in":10},"within_code":true,"spare_width_in":2},"meta":{"timestamp":"2026-06-07T08:18:04.553Z","request_id":"d72ed833-b0bd-4760-a9c8-6bc86c3be658"},"status":"ok","message":"Large cable check","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/min-width":{"get":{"operationId":"get_v1_min_width","tags":["Tray"],"summary":"Minimum tray width for a bundle","description":"","parameters":[{"name":"cable_area_in2","in":"query","required":true,"description":"Total cable cross-sectional area (in²)","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The minimum ladder/ventilated tray width for a bundle of ≤ 4/0 cables = total cable area × 6/7 (the inverse of the Column-1 rule), then round up to a standard width (6, 9, 12, 18, 24, 30, 36 inches). Sizing up leaves room for spare capacity and future cables, and keeps the fill — and the ampacity derating that comes with it — comfortable.","inputs":{"cable_area_in2":10},"min_width_in":8.571,"recommended_standard_width_in":9},"meta":{"timestamp":"2026-06-07T08:18:04.659Z","request_id":"d026f235-af40-4898-a90d-26aa57984dba"},"status":"ok","message":"Min tray width","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":"Inches, in². NEC 392.22(A)(1) ladder/ventilated, ≤4/0: allowable area = width×7/6; ≥4/0: Σdiameters ≤ width; min width = area×6/7. Solid-bottom trays use other columns. For conduit/box fill use a conduit API.","service":"cabletray-api","endpoints":{"GET /v1/fill":"Allowable fill area and % for ≤4/0 cables in a ladder/ventilated tray.","GET /v1/meta":"This document.","GET /v1/min-width":"Minimum and next standard tray width for a cable bundle.","GET /v1/large-cable":"Single-layer diameter check for ≥4/0 cables."},"description":"Cable-tray fill maths (NEC 392.22): allowable fill for small cables, single-layer check for large cables, and minimum tray width."},"meta":{"timestamp":"2026-06-07T08:18:04.739Z","request_id":"565a21ca-7f58-4ef0-9299-5e9bcbcaf3fc"},"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":5500,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1140,"monthly_call_quota":56000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3620,"monthly_call_quota":237000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":11150,"monthly_call_quota":1180000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/cabletray-api"}