Chemistry
Ideal gas law PV=nRT API
Solves the ideal gas law PV = nRT for the one omitted variable (pressure atm, volume L, moles, temperature K) and reports the gas constant used. Answers 'How many moles fill 22.4 L at STP?', 'What pressure does 1 mol exert in 10 L at 300 K?'.
Price$0.04per request
MethodPOST
Route/v1/chemistry/ideal-gas
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
chemistryideal-gaspv-nrtgas-lawpressurevolumemolesthermodynamics
API URL
Integration docshttps://x402.hexl.dev/v1/chemistry/ideal-gasExample request
{
"pressureAtm": 1,
"volumeL": 22.414,
"temperatureK": 273.15
}Example response
{
"solvedVariable": "moles",
"solvedValue": 1.000001,
"pressureAtm": 1,
"volumeL": 22.414,
"moles": null,
"temperatureK": 273.15,
"gasConstant": 0.082057366,
"gasConstantUnits": "L·atm·K⁻¹·mol⁻¹",
"formula": "PV = nRT"
}Input schema
{
"type": "object",
"properties": {
"pressureAtm": {
"type": "number",
"examples": [
1
]
},
"volumeL": {
"type": "number",
"examples": [
22.414
]
},
"moles": {
"type": "number"
},
"temperatureK": {
"type": "number",
"examples": [
273.15
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}