{"openapi":"3.1.0","info":{"title":"Carnot Heat Engine API","version":"1.0.0","description":"Heat-engine efficiency and coefficient of performance as an API, computed locally and deterministically. The efficiency endpoint gives the Carnot maximum efficiency of any heat engine working between two temperatures, η = 1 − Tc/Th (in kelvin) — the absolute upper limit no real engine can beat — and, given a heat input, the maximum work it could produce and the heat it must reject. The heat-pump endpoint gives the Carnot coefficient of performance of a heat pump, COP = Th/(Th − Tc), and of a refrigerator or air conditioner, COP = Tc/(Th − Tc), and the heat moved for a given work input. The engine endpoint analyses a real engine from its heat balance: from any two of the heat input, the work output, the efficiency or the heat rejected it returns the rest using η = W/Qh and Qc = Qh − W, and — given the reservoir temperatures — compares it to the Carnot limit and reports the second-law (exergy) efficiency. Temperatures accept kelvin, Celsius or Fahrenheit. Everything is computed locally and deterministically, so it is instant and private. Ideal for thermodynamics-education tools, engine, turbine and HVAC design, refrigeration and heat-pump apps, and energy-systems software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is heat-engine and refrigeration-cycle efficiency; for sensible heat use a specific-heat API and for heat-exchanger LMTD use a heat-exchanger API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/carnot-api","description":"oanor gateway"}],"tags":[{"name":"Carnot"},{"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/efficiency":{"get":{"operationId":"get_v1_efficiency","tags":["Carnot"],"summary":"Carnot maximum efficiency","description":"","parameters":[{"name":"hot_temperature","in":"query","required":true,"description":"Hot reservoir temperature","schema":{"type":"string"},"example":"600"},{"name":"cold_temperature","in":"query","required":true,"description":"Cold reservoir temperature","schema":{"type":"string"},"example":"300"},{"name":"unit","in":"query","required":false,"description":"k|c|f (default k)","schema":{"type":"string"},"example":"k"},{"name":"heat_input","in":"query","required":false,"description":"Heat input Qh (J) for max work","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"formula":"η = 1 − Tc/Th (temperatures in kelvin).","carnot_efficiency":0.5,"hot_temperature_k":600,"cold_temperature_k":300,"carnot_efficiency_percent":50},"meta":{"timestamp":"2026-06-04T10:18:42.758Z","request_id":"1cda0185-301f-467a-921d-2e25dc2b4b64"},"status":"ok","message":"Carnot efficiency","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/engine":{"get":{"operationId":"get_v1_engine","tags":["Carnot"],"summary":"Real engine efficiency & heat balance","description":"","parameters":[{"name":"heat_input","in":"query","required":false,"description":"Heat input Qh (J)","schema":{"type":"string"},"example":"1000"},{"name":"work_output","in":"query","required":false,"description":"Work output W (J)","schema":{"type":"string"},"example":"400"},{"name":"efficiency","in":"query","required":false,"description":"Or efficiency (0–1)","schema":{"type":"string"}},{"name":"heat_rejected","in":"query","required":false,"description":"Or heat rejected Qc (J)","schema":{"type":"string"}},{"name":"hot_temperature","in":"query","required":false,"description":"Hot temp for Carnot comparison","schema":{"type":"string"}},{"name":"cold_temperature","in":"query","required":false,"description":"Cold temp for Carnot comparison","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"formula":"η = W/Qh; Qc = Qh − W.","efficiency":0.4,"heat_input_j":1000,"work_output_j":400,"heat_rejected_j":600,"efficiency_percent":40},"meta":{"timestamp":"2026-06-04T10:18:42.862Z","request_id":"d96ad265-0944-4616-92ce-3c6b5d64a896"},"status":"ok","message":"Real engine efficiency","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/heat-pump":{"get":{"operationId":"get_v1_heat_pump","tags":["Carnot"],"summary":"Heat-pump / refrigerator COP","description":"","parameters":[{"name":"hot_temperature","in":"query","required":true,"description":"Hot reservoir temperature","schema":{"type":"string"},"example":"295"},{"name":"cold_temperature","in":"query","required":true,"description":"Cold reservoir temperature","schema":{"type":"string"},"example":"275"},{"name":"unit","in":"query","required":false,"description":"k|c|f (default k)","schema":{"type":"string"},"example":"k"},{"name":"work_input","in":"query","required":false,"description":"Work input (J) for heat moved","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"formula":"COP_heating = Th/(Th−Tc); COP_cooling = Tc/(Th−Tc).","cop_heating":14.75,"hot_temperature_k":295,"cold_temperature_k":275,"cop_cooling_refrigeration":13.75},"meta":{"timestamp":"2026-06-04T10:18:42.942Z","request_id":"0c7ce69b-f65f-4830-b85c-ced67c83d8e5"},"status":"ok","message":"Heat-pump / refrigerator COP","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":{"api":"carnot","note":"Carnot heat-engine efficiency & COP — computed locally and deterministically, no key, no third-party service.","endpoints":["/v1/efficiency","/v1/heat-pump","/v1/engine","/v1/meta"]},"meta":{"timestamp":"2026-06-04T10:18:43.046Z","request_id":"6fc64000-e995-4fd9-8989-88b9ff08e9e8"},"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":3000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":500,"monthly_call_quota":40000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1500,"monthly_call_quota":250000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4900,"monthly_call_quota":1510000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/carnot-api"}