API Gravity Calculator
Converts between API gravity, specific gravity and density at 60 °F using the API 2540 definition, with the formula returned.
POST /v1/petroleum/api-gravity $0.01 per call
Specification
- Endpoint
POST /v1/petroleum/api-gravity- Price
- $0.01 per call · tier
standard_data - Payment
-
x402 on X Layer (chain 196) · settled in USDG or USDT0 · scheme
exact - Data source
- Published petroleum-engineering correlations, cited per endpoint
- Timeout
- 15 seconds
- Max request
- 64 KB
- Version
1.0.0
Calling it
The first call returns a 402 with the payment challenge. Retry with a
signed authorisation in the X-PAYMENT header — see
the payment guide for the exact shape.
curl -i -X POST "https://api.dana-edu.pp.ua/v1/petroleum/api-gravity" \
-H "content-type: application/json" \
-d '{ ... }' Response
Real output, captured by running this endpoint at build time — not written by hand. Volatile fields such as timestamps are elided. Captured 2026-07-30.
{
"api_gravity": 34.5,
"specific_gravity": 0.8524,
"density_kg_m3": 851.57,
"density_lbm_ft3": 53.16,
"classification": "light crude",
"formula": "API = 141.5 / SG(60/60 °F) − 131.5",
"reference": "API MPMS Chapter 11.1 / ASTM D1298",
"reference_temperature": "60 °F (15.56 °C)",
"water_density_basis_kg_m3": 999.016,
"input_used": "api_gravity",
"note": "Screening-level engineering result. It does not replace a commercial simulator, a laboratory PVT measurement, or review by a qualified engineer."
}
Every response is wrapped in the same envelope: data plus
warnings, sources, confidence,
informational_only and a measured processing_ms.
See the envelope reference.
Related endpoints
Pressure Converter
Converts among psi, bar, kPa, MPa, atm, kg/cm², inH₂O and mmHg, and between gauge and absolute with a stated atmospheric reference.
Temperature Converter
Converts among Celsius, Fahrenheit, Kelvin and Rankine with absolute-zero bounds enforced.
Gas Z-Factor
Gas compressibility factor by the Dranchuk–Abou-Kassem correlation with Sutton pseudo-critical properties and optional sour-gas correction, reporting convergence and whether inputs are inside the correlation's validated range.
Oil Viscosity Correlation
Dead, saturated and undersaturated oil viscosity by Beggs–Robinson with Vasquez–Beggs above bubble point, with valid ranges and extrapolation warnings.