---
title: "Add a new NPC with generated portrait and token (costs 1 credit)"
method: POST
path: "/v1/ttrpg/{id}/npcs"
tags: ["AI Tabletop"]
---

# Add a new NPC with generated portrait and token (costs 1 credit)

`POST /v1/ttrpg/{id}/npcs`

## Request

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

## Path parameters

- `id` string, required

## Request body

- CreateTtrpgNpcDto
  - `name` string, required
  - `role` string
  - `personality` string
  - `motivation` string
  - `secret` string
  - `sampleLine` string
  - `visualPrompt` string

## Response `201`

Updated adventure with new NPC

## 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)
