/v1/points
Triangle from points
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/triangle-api/v1/points" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/triangle-api/v1/points", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/triangle-api/v1/points");
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/triangle-api/v1/points",
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": {
"area": 6,
"note": "Side a = |BC|, b = |CA|, c = |AB|. Area by the shoelace formula; centroid is the average of the vertices.",
"inputs": {
"A": [
0,
0
],
"B": [
4,
0
],
"C": [
0,
3
]
},
"side_a": 5,
"side_b": 3,
"side_c": 4,
"centroid": [
1.333333,
1
],
"perimeter": 12,
"side_type": "scalene",
"angle_type": "right",
"angle_A_deg": 90,
"angle_B_deg": 36.869898,
"angle_C_deg": 53.130102
},
"meta": {
"timestamp": "2026-06-04T18:38:07.071Z",
"request_id": "432f669a-2777-4c65-a6e6-4f09543db665"
},
"status": "ok",
"message": "From points",
"success": true
}