/v1/spell
A spell by index or name
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/dnd-api/v1/spell" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/dnd-api/v1/spell", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/dnd-api/v1/spell");
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/dnd-api/v1/spell",
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": {
"spell": {
"dc": {
"dc_type": {
"url": "/api/2014/ability-scores/dex",
"name": "DEX",
"index": "dex"
},
"dc_success": "half"
},
"name": "Fireball",
"index": "fireball",
"level": 3,
"range": "150 feet",
"damage": {
"damage_type": {
"url": "/api/2014/damage-types/fire",
"name": "Fire",
"index": "fire"
},
"damage_at_slot_level": {
"3": "8d6",
"4": "9d6",
"5": "10d6",
"6": "11d6",
"7": "12d6",
"8": "13d6",
"9": "14d6"
}
},
"ritual": false,
"school": "Evocation",
"classes": [
"Sorcerer",
"Wizard"
],
"duration": "Instantaneous",
"material": "A tiny ball of bat guano and sulfur.",
"components": [
"V",
"S",
"M"
],
"subclasses": [
"Lore",
"Fiend"
],
"description": "A bright streak flashes from your pointing finger to a point you choose within range and then blossoms with a low roar into an explosion of flame. Each creature in a 20-foot-radius sphere centered on that point must make a dexterity saving throw. A target takes 8d6 fire damage on a failed save, or half as much damage on a successful one.\n\nThe fire spreads around corners. It ignites flammable objects in the area that aren't being worn or carried.",
"casting_time": "1 action",
"higher_level": "When you cast this spell using a spell slot of 4th level or higher, the damage increases by 1d6 for each slot level above 3rd.",
"concentration": false,
"area_of_effect": {
"size": 20,
"type": "sphere"
}
}
},
"meta": {
"timestamp": "2026-06-01T00:04:39.715Z",
"request_id": "851e1063-b34f-403e-b95a-9110bb288621"
},
"status": "ok",
"message": "Spell retrieved",
"success": true
}