---
title: "Generate a top-down battle map with an optional grid and .dd2vtt export"
method: POST
path: "/v1/tools/dnd/battle-map"
tags: ["DnD Tools"]
---

# Generate a top-down battle map with an optional grid and .dd2vtt export

`POST /v1/tools/dnd/battle-map`

## Request

- Base URL: `https://api.sprixen.com`
- URL: `https://api.sprixen.com/v1/tools/dnd/battle-map`
- Auth: `bearer` (a scheme the document does not define)

Costs 2 credits.

## Request body

- CreateDndBattleMapDto
  - `prompt` string, required
  - `setting` 'fantasy' | 'dungeon' | 'scifi' | 'cyberpunk' | 'modern'
  - `gridCells` DndGridCellsDto
    - `cols` number, required
    - `rows` number, required
  - `gridVisible` boolean
  - `size` 1024 | 1536: Width in px; height is always 3:4 of width. Clamped down to the caller tier max.

## Response `202`

Battle map job queued

## Other responses

- `402`: Insufficient credits

---

[API](https://skmtc.dev/sprixen/apis/sprixen-api.md) · [All operations](https://skmtc.dev/sprixen/apis/sprixen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sprixen/apis/sprixen-api/revisions/6c0c57f6da58?raw)
