---
title: "Generate a character portrait by prompt (includes a token)"
method: POST
path: "/v1/tools/dnd/portrait"
tags: ["DnD Tools"]
---

# Generate a character portrait by prompt (includes a token)

`POST /v1/tools/dnd/portrait`

## Request

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

Costs 1 credit. Result includes portraitUrl and tokenUrl.

## Request body

- CreateDndPortraitDto
  - `prompt` string, required
  - `style` 'painted' | 'ink' | 'pixel' | 'anime' | 'watercolor', required
  - `border` 'gold' | 'silver' | 'iron' | 'wood' | 'arcane' | 'none'
  - `size` 512 | 1024: Clamped down to the caller tier max (free 512, pro 1024).

## Response `202`

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