Naar de inhoud
GET /v1/budget

Party XP thresholds

Probeer het live

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

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

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

Verkrijg een API-sleutel

Codefragmenten

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

Voorbeeldrespons

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

{
    "data": {
        "note": "Per-character XP thresholds (DMG) summed across the party set the easy/medium/hard/deadly budget for one encounter. The daily XP budget is the total adventuring-day allowance.",
        "inputs": {
            "levels": [
                3,
                4,
                5,
                5
            ],
            "party_size": 4
        },
        "xp_thresholds": {
            "easy": 700,
            "hard": 2100,
            "deadly": 3100,
            "medium": 1400
        },
        "daily_xp_budget": 9900
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:07.612Z",
        "request_id": "d1176ae5-cd47-4ff6-abad-fc02a21ebcb8"
    },
    "status": "ok",
    "message": "XP budget",
    "success": true
}