Aller au contenu
GET /v1/score

Score five dice

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/yahtzee-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/yahtzee-api/v1/score" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/yahtzee-api/v1/score", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/yahtzee-api/v1/score");
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/yahtzee-api/v1/score",
    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": {
        "note": "Every category's value for this roll. Upper boxes score the sum of that face; 3/4-of-a-kind and chance score all five dice; full house 25, small straight 30, large straight 40, Yahtzee 50. Pick the box that's worth most — or save a category for later.",
        "inputs": {
            "dice": [
                3,
                3,
                3,
                5,
                6
            ]
        },
        "scores": {
            "ones": 0,
            "twos": 0,
            "fives": 5,
            "fours": 0,
            "sixes": 6,
            "chance": 20,
            "threes": 9,
            "yahtzee": 0,
            "full_house": 0,
            "four_of_a_kind": 0,
            "large_straight": 0,
            "small_straight": 0,
            "three_of_a_kind": 20
        },
        "best_score": 20,
        "best_category": "three_of_a_kind"
    },
    "meta": {
        "timestamp": "2026-06-06T07:13:56.184Z",
        "request_id": "3808249c-f46f-4090-a243-ebc9014fe888"
    },
    "status": "ok",
    "message": "Score roll",
    "success": true
}