Zum Inhalt springen
GET /v1/budget

Party XP thresholds

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/dndencounter-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

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_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten 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
}