{"openapi":"3.1.0","info":{"title":"Off-Grid Solar Sizing API","version":"1.0.0","description":"Off-grid solar system-sizing maths as an API, computed locally and deterministically — the battery-bank, solar-array and charge-controller numbers an RV, cabin, boat or off-grid homeowner sizes a system with. The battery-bank endpoint gives the storage you need = (daily load × days of autonomy) ÷ (depth of discharge × round-trip efficiency), then ÷ the system voltage for amp-hours: the autonomy carries you through cloudy days and the depth-of-discharge limit protects the cells (lead-acid ~50 %, lithium 80–100 %, which is why lithium banks run smaller), so a 2 kWh/day load at 12 V with 2 days autonomy, 50 % DoD and 85 % efficiency needs about 785 Ah. The array endpoint gives the panels = daily energy ÷ (peak sun hours × system efficiency), where peak sun hours is the day's irradiance as equivalent full-sun hours (~3–6 by place and season) and the efficiency rolls up controller, wiring, heat and dust losses — about 670 W for that load at 4 sun hours and 75 %. The charge-controller endpoint sizes the controller = array watts ÷ battery voltage × a 1.25 safety factor, so a 700 W array on a 12 V bank wants roughly an 80 A controller. Everything is computed locally and deterministically, so it is instant and private. Ideal for solar-installer and DIY tools, RV/marine/cabin power planners, and renewable-energy calculators. Pure local computation — no key, no third-party service, instant. Size for the worst month. 3 compute endpoints. For solar irradiance and sun hours use a solar API; for battery runtime under load a battery API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/offgrid-api","description":"oanor gateway"}],"tags":[{"name":"OffGrid"},{"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/array":{"get":{"operationId":"get_v1_array","tags":["OffGrid"],"summary":"Solar-array wattage","description":"","parameters":[{"name":"daily_load_wh","in":"query","required":true,"description":"Daily energy use (Wh)","schema":{"type":"string"},"example":"2000"},{"name":"peak_sun_hours","in":"query","required":false,"description":"Peak sun hours (default 4)","schema":{"type":"string"},"example":"4"},{"name":"system_efficiency_pct","in":"query","required":false,"description":"System efficiency % (default 75)","schema":{"type":"string"},"example":"75"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Solar array = daily energy ÷ (peak sun hours × system efficiency). Peak sun hours is the day's irradiance expressed as equivalent hours at 1000 W/m² (about 3–6 depending on place and season — look it up for your site), and the efficiency rolls up charge-controller, wiring, temperature and dust losses (~70–80 %). A 2 kWh/day load at 4 sun hours and 75 % efficiency needs about 670 W of panels — size up for winter, the worst case.","inputs":{"daily_load_wh":2000,"peak_sun_hours":4,"system_efficiency_pct":75},"required_array_watts":667},"meta":{"timestamp":"2026-06-07T08:18:04.863Z","request_id":"6b14d588-47e8-4efb-a6f1-91684234eed3"},"status":"ok","message":"Solar array","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/battery-bank":{"get":{"operationId":"get_v1_battery_bank","tags":["OffGrid"],"summary":"Battery bank for autonomy","description":"","parameters":[{"name":"daily_load_wh","in":"query","required":true,"description":"Daily energy use (Wh)","schema":{"type":"string"},"example":"2000"},{"name":"system_voltage_v","in":"query","required":true,"description":"System voltage (V)","schema":{"type":"string"},"example":"12"},{"name":"days_autonomy","in":"query","required":false,"description":"Days of autonomy (default 2)","schema":{"type":"string"},"example":"2"},{"name":"depth_of_discharge_pct","in":"query","required":false,"description":"Depth of discharge % (default 50)","schema":{"type":"string"},"example":"50"},{"name":"battery_efficiency_pct","in":"query","required":false,"description":"Round-trip efficiency % (default 85)","schema":{"type":"string"},"example":"85"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Battery bank = (daily load × days of autonomy) ÷ (depth of discharge × round-trip efficiency), then ÷ the system voltage for amp-hours. The autonomy carries you through cloudy days, and the depth-of-discharge limit protects the cells — lead-acid likes ~50 %, lithium tolerates 80–100 %, which is why a lithium bank can be much smaller for the same usable energy. A 2 kWh/day load at 12 V with 2 days autonomy, 50 % DoD and 85 % efficiency needs ~785 Ah.","inputs":{"daily_load_wh":2000,"days_autonomy":2,"system_voltage_v":12,"battery_efficiency_pct":85,"depth_of_discharge_pct":50},"usable_capacity_wh":4000,"required_capacity_ah":784.3,"required_capacity_wh":9412},"meta":{"timestamp":"2026-06-07T08:18:04.964Z","request_id":"05ef1364-47eb-4254-a417-b37c4b297b57"},"status":"ok","message":"Battery bank","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/charge-controller":{"get":{"operationId":"get_v1_charge_controller","tags":["OffGrid"],"summary":"Charge-controller current","description":"","parameters":[{"name":"array_watts","in":"query","required":true,"description":"Array power (W)","schema":{"type":"string"},"example":"700"},{"name":"system_voltage_v","in":"query","required":true,"description":"System voltage (V)","schema":{"type":"string"},"example":"12"},{"name":"safety_factor","in":"query","required":false,"description":"Safety factor (default 1.25)","schema":{"type":"string"},"example":"1.25"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Charge-controller current = array watts ÷ battery voltage, then × a 1.25 safety factor (NEC) for irradiance edge-cases — a 700 W array on a 12 V bank is ~58 A, so rate the controller at ~73 A (round up to the next standard size, e.g. 80 A). An MPPT controller lets a higher-voltage panel string feed a lower-voltage battery and harvests more in cold or low light than a cheaper PWM unit. Mind the controller's own max PV voltage.","inputs":{"array_watts":700,"safety_factor":1.25,"system_voltage_v":12},"array_current_a":58.33,"min_controller_amps":72.9},"meta":{"timestamp":"2026-06-07T08:18:05.050Z","request_id":"c396c91e-2794-487c-a8e5-f4aac9126fe2"},"status":"ok","message":"Charge controller","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":"Wh, V, Ah, W, A, peak sun hours. bank = (load·days)/(DoD·eff)/V; array = load/(sun·eff); controller A = (array W/V)×1.25. Size for the worst month. For solar irradiance/sun hours use a solar API; for battery runtime under load a battery API.","service":"offgrid-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/array":"Solar-array wattage for the daily energy.","GET /v1/battery-bank":"Battery capacity (Ah/Wh) for a load and days of autonomy.","GET /v1/charge-controller":"Charge-controller current from array watts and voltage."},"description":"Off-grid solar sizing maths: battery bank for autonomy, solar-array wattage, and charge-controller current."},"meta":{"timestamp":"2026-06-07T08:18:05.125Z","request_id":"5984eb3f-7c6b-4653-8f82-e8f68fe839c9"},"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":6600,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1090,"monthly_call_quota":65000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3500,"monthly_call_quota":256000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":10850,"monthly_call_quota":1320000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/offgrid-api"}