Naar de inhoud
GET /v1/score

Score a hand

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/cribbage-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

curl "https://api.oanor.com/cribbage-api/v1/score" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/cribbage-api/v1/score", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/cribbage-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/cribbage-api/v1/score",
    headers={"x-oanor-key": "oanor_test_..."}
)

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste health check.

{
    "data": {
        "note": "Cribbage hand value: every combination summing to fifteen = 2, each pair = 2, each run of 3+ = its length, a four-card flush = 4 (five = 5; the crib only scores a five-card flush), and his nobs — a Jack matching the starter's suit — = 1. The legendary best hand, J5-555 with a matching 5 cut, scores 29.",
        "total": 29,
        "inputs": {
            "hand": [
                "5H",
                "5S",
                "5C",
                "JD"
            ],
            "is_crib": false,
            "starter": "5D"
        },
        "breakdown": {
            "nobs": 1,
            "runs": 0,
            "flush": 0,
            "pairs": 12,
            "fifteens": 16
        }
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:51.088Z",
        "request_id": "dfa72289-642c-4bb0-a87a-291ce68c8f49"
    },
    "status": "ok",
    "message": "Hand score",
    "success": true
}