/v1/float
Float-or-sink analysis
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/buoyancy-api/v1/float" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/buoyancy-api/v1/float", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/buoyancy-api/v1/float");
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/buoyancy-api/v1/float",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"fluid": "water",
"state": "floats",
"formula": "floats when ρ_object < ρ_fluid; fraction submerged = ρ_object/ρ_fluid.",
"density_ratio": 0.6,
"percent_submerged": 60,
"fraction_submerged": 0.6,
"fluid_density_kg_m3": 1000,
"object_density_kg_m3": 600,
"object_density_source": "given",
"percent_above_surface": 40
},
"meta": {
"timestamp": "2026-06-04T10:18:48.325Z",
"request_id": "f8fe0d9c-accf-486b-a53f-ec1265fc8ace"
},
"status": "ok",
"message": "Float-or-sink analysis",
"success": true
}