Zum Inhalt springen
GET /v1/mole-fraction

Mole & mass fractions

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/gasmixture-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/gasmixture-api/v1/mole-fraction" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/gasmixture-api/v1/mole-fraction", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/gasmixture-api/v1/mole-fraction");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/gasmixture-api/v1/mole-fraction",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "note": "Mole fraction = nᵢ / Σn. With molar masses, mass fractions and the average molar mass are also returned.",
        "inputs": {
            "components": 2,
            "total_moles": 4
        },
        "mass_fractions": [
            0.157895,
            0.842105
        ],
        "mole_fractions": [
            0.75,
            0.25
        ],
        "partial_pressures": [
            3,
            1
        ],
        "average_molar_mass": 9.5
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:01.617Z",
        "request_id": "8c18559f-2c45-41fb-8978-1959e2bd6ad3"
    },
    "status": "ok",
    "message": "Mole fraction",
    "success": true
}