---
title: "Create a VTT token from an image upload or an AI prompt"
method: POST
path: "/v1/tools/dnd/token"
tags: ["DnD Tools"]
---

# Create a VTT token from an image upload or an AI prompt

`POST /v1/tools/dnd/token`

## Request

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

Multipart upload is free (no AI); a prompt-generated token costs 1 credit.

## Request body

- object
  - `image` string, binary: Source image (PNG/JPG/WebP, max 8 MB)
  - `prompt` string
  - `style` string
  - `border` string
  - `size` number
  - `shape` string

## Response `202`

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