---
title: "Regenerate the battlemap for a scene (costs 1 credit)"
method: POST
path: "/v1/ttrpg/{id}/scenes/{index}/regenerate-map"
tags: ["AI Tabletop"]
---

# Regenerate the battlemap for a scene (costs 1 credit)

`POST /v1/ttrpg/{id}/scenes/{index}/regenerate-map`

## Request

- Base URL: `https://api.sprixen.com`
- URL: `https://api.sprixen.com/v1/ttrpg/{id}/scenes/{index}/regenerate-map`
- Auth: `bearer` (a scheme the document does not define)

## Path parameters

- `id` string, required
- `index` number, required

## Request body

- RegenerateTtrpgSceneMapDto
  - `mapPrompt` string: Optional override for the battlemap prompt. If provided, the scene mapPrompt is also updated.

## Response `200`

Updated adventure with new map

## Other responses

- `400`: Adventure not completed yet
- `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)
