# D&D Generator API

> D&D Generator creates random content for tabletop role-playing games including characters, NPCs, monsters, treasure, encounters, taverns, and quests.

**Endpoint:** `GET https://api.apiverve.com/v1/dndgenerator`  
**Category:** Entertainment  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/dndgenerator

## Overview

D&D Generator produces random content for tabletop role-playing games: characters, NPCs, monsters, treasure, encounters, taverns, quests and fantasy names. It is built for dungeon masters who need quick inspiration mid-session, for game preparation tools, and for procedural content generation for RPG applications such as Discord bots and campaign managers.

Choose a type, or leave it on all to get one of each of the seven content types in one response, and ask for up to 10 results per call. A character comes with a race, class and name; an NPC with an occupation, personality, quirk and secret; a tavern with a name, house specialty, atmosphere and a rumor to hook the party.

On the Free plan a generated character includes its name, race and class. Paid plans fill in the rest of the sheet: level, background, alignment, the six ability scores and hit points.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/dndgenerator?type=character&count=1" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | string | No | Content type to generate. default all. One of: all, character, npc, monster, treasure, encounter, tavern, quest, name |
| `count` | integer | No | Number of items to generate. default 1. range 1-10 |

## Response fields

- `type` — string · Type of D&D content that was generated
- `count` — number · Number of items returned in results
- `results` — object · Generated D&D content with details and attributes. A single object when count is 1, an array of that many objects when count is above 1. The fields below are the character shape; each other type returns its own fields
  - `results.name` — string · Name of the generated character or entity
  - `results.race` — string · Character race for D&D gameplay
  - `results.class` — string · Character class defining abilities and skills
  - `results.level` — number · Character experience level in progression · (premium)
  - `results.background` — string · Character background providing narrative context · (premium)
  - `results.alignment` — string · Character moral alignment for roleplay · (premium)
  - `results.stats` — object · Core ability scores for character statistics · (premium)
    - `results.stats.strength` — number · Strength ability score value · (premium)
    - `results.stats.dexterity` — number · Dexterity ability score value · (premium)
    - `results.stats.constitution` — number · Constitution ability score value · (premium)
    - `results.stats.intelligence` — number · Intelligence ability score value · (premium)
    - `results.stats.wisdom` — number · Wisdom ability score value · (premium)
    - `results.stats.charisma` — number · Charisma ability score value · (premium)
  - `results.hitPoints` — number · Character hit points for combat · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "type": "character",
    "count": 1,
    "results": {
      "name": "Ashorshadow",
      "race": "Elf",
      "class": "Warlock",
      "level": 6,
      "background": "Criminal",
      "alignment": "Lawful Good",
      "stats": {
        "strength": 10,
        "dexterity": 12,
        "constitution": 7,
        "intelligence": 15,
        "wisdom": 12,
        "charisma": 10
      },
      "hitPoints": 20
    }
  }
}
```

## Use cases

- **Game Preparation** — Generate NPCs, encounters, and quests for tabletop RPG sessions
- **Character Creation** — Create random characters with stats, backgrounds, and personalities
- **World Building** — Generate taverns, locations, and story hooks for campaign settings
- **RPG Applications** — Integrate procedural content generation into gaming platforms

## SDKs

- **npm** — `npm install @apiverve/dndgenerator` (https://www.npmjs.com/package/@apiverve/dndgenerator)
- **NuGet** — `dotnet add package APIVerve.API.DDGenerator` (https://www.nuget.org/packages/APIVerve.API.DDGenerator)
- **Source** — https://github.com/apiverve/dndgenerator-api

## More

- Full reference: https://docs.apiverve.com/ref/dndgenerator
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
