Sprixen DnD Tools API

The DnD Tools API from Sprixen — 10 operation(s) for dnd tools.

GitHub OpenAPI

Operations 10

POST /v1/tools/dnd/token Create a VTT token from an image upload or an AI prompt #
POST /v1/tools/dnd/portrait Generate a character portrait by prompt (includes a token) #
POST /v1/tools/dnd/battle-map Generate a top-down battle map with an optional grid and .dd2vtt export #
POST /v1/tools/dnd/npc Generate an NPC (free text, optional +2-credit art) #
POST /v1/tools/dnd/encounter Generate a combat encounter (free, SRD monsters only) #
POST /v1/tools/dnd/monster Generate a homebrew monster stat block (free, SRD-safe) #
GET /v1/tools/dnd/jobs/{jobId} Poll a DnD Tools job by ID (caller must own the job) #
GET /v1/tools/dnd/quota Get the caller tier, size limits, credit costs, and remaining daily free-text… #
GET /v1/tools/dnd/history List the current user's last 50 completed DnD Tools jobs #
POST /v1/tools/dnd/foundry-package Bundle completed jobs into a Foundry VTT import ZIP #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sprixen-com:sprixen-com-dnd-tools-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sprixen-com-dnd-tools-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sprixen DnD Tools API
  description: Sprixen AI Game Asset Generator, REST API & MCP Server
  version: '1.0'
  contact: {}
servers:
- url: https://api.sprixen.com
  description: Production
- url: http://localhost:8080
  description: Local Development
tags:
- name: DnD Tools
paths:
  /v1/tools/dnd/token:
    post:
      operationId: DndToolsController_createToken
      summary: Create a VTT token from an image upload or an AI prompt
      description: Multipart upload is free (no AI); a prompt-generated token costs 1 credit.
      parameters: []
      requestBody:
        required: true
        description: 'Multipart form: image file + optional fields, OR JSON body with prompt/style'
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
                  description: Source image (PNG/JPG/WebP, max 8 MB)
                prompt:
                  type: string
                style:
                  type: string
                border:
                  type: string
                size:
                  type: number
                shape:
                  type: string
          application/json:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
                  description: Source image (PNG/JPG/WebP, max 8 MB)
                prompt:
                  type: string
                style:
                  type: string
                border:
                  type: string
                size:
                  type: number
                shape:
                  type: string
      responses:
        '202':
          description: Token job queued
        '402':
          description: Insufficient credits
      tags:
      - DnD Tools
      security:
      - bearer: []
  /v1/tools/dnd/portrait:
    post:
      operationId: DndToolsController_createPortrait
      summary: Generate a character portrait by prompt (includes a token)
      description: Costs 1 credit. Result includes portraitUrl and tokenUrl.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDndPortraitDto'
      responses:
        '202':
          description: Portrait job queued
        '402':
          description: Insufficient credits
      tags:
      - DnD Tools
      security:
      - bearer: []
  /v1/tools/dnd/battle-map:
    post:
      operationId: DndToolsController_createBattleMap
      summary: Generate a top-down battle map with an optional grid and .dd2vtt export
      description: Costs 2 credits.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDndBattleMapDto'
      responses:
        '202':
          description: Battle map job queued
        '402':
          description: Insufficient credits
      tags:
      - DnD Tools
      security:
      - bearer: []
  /v1/tools/dnd/npc:
    post:
      operationId: DndToolsController_createNpc
      summary: Generate an NPC (free text, optional +2-credit art)
      description: Text-only requests answer 200 synchronously and count against the daily free-text limit. With includeArt=true they return a 202 job like the image tools and are charged credits instead.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDndNpcDto'
      responses:
        '200':
          description: NPC text result (no art requested)
        '202':
          description: NPC job queued (art requested)
        '402':
          description: Insufficient credits (art requested)
        '429':
          description: Daily free-text limit reached (no art requested)
      tags:
      - DnD Tools
      security:
      - bearer: []
  /v1/tools/dnd/encounter:
    post:
      operationId: DndToolsController_createEncounter
      summary: Generate a combat encounter (free, SRD monsters only)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDndEncounterDto'
      responses:
        '200':
          description: Encounter result
        '429':
          description: Daily free-text limit reached
      tags:
      - DnD Tools
      security:
      - bearer: []
  /v1/tools/dnd/monster:
    post:
      operationId: DndToolsController_createMonster
      summary: Generate a homebrew monster stat block (free, SRD-safe)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDndMonsterDto'
      responses:
        '200':
          description: Monster result
        '429':
          description: Daily free-text limit reached
      tags:
      - DnD Tools
      security:
      - bearer: []
  /v1/tools/dnd/jobs/{jobId}:
    get:
      operationId: DndToolsController_getJob
      summary: Poll a DnD Tools job by ID (caller must own the job)
      parameters:
      - name: jobId
        required: true
        in: path
        description: Job ID returned at creation
        schema:
          type: string
      responses:
        '200':
          description: Job status/result
        '403':
          description: Job exists but is owned by another user
        '404':
          description: Job not found
      tags:
      - DnD Tools
      security:
      - bearer: []
  /v1/tools/dnd/quota:
    get:
      operationId: DndToolsController_getQuota
      summary: Get the caller tier, size limits, credit costs, and remaining daily free-text…
      parameters: []
      responses:
        '200':
          description: Tier, limits, credits and quota status
      tags:
      - DnD Tools
      security:
      - bearer: []
  /v1/tools/dnd/history:
    get:
      operationId: DndToolsController_getHistory
      summary: List the current user's last 50 completed DnD Tools jobs
      parameters: []
      responses:
        '200':
          description: Job history
      tags:
      - DnD Tools
      security:
      - bearer: []
  /v1/tools/dnd/foundry-package:
    post:
      operationId: DndToolsController_foundryPackage
      summary: Bundle completed jobs into a Foundry VTT import ZIP
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FoundryPackageDto'
      responses:
        '200':
          description: ZIP archive
        '400':
          description: No completed jobs found for the given IDs
      tags:
      - DnD Tools
      security:
      - bearer: []
components:
  schemas:
    CreateDndMonsterDto:
      type: object
      properties:
        concept:
          type: string
          example: A crystalline elemental that feeds on sound and shatters when it screams
          minLength: 3
          maxLength: 6000
        cr:
          type: string
          example: '5'
          description: Challenge rating, e.g. "1/4", "5", "12".
        type:
          type: string
          example: elemental
          maxLength: 40
        size:
          type: string
          enum:
          - tiny
          - small
          - medium
          - large
          - huge
          - gargantuan
      required:
      - concept
    CreateDndNpcDto:
      type: object
      properties:
        prompt:
          type: string
          example: A retired pirate quartermaster who now runs the harbor tavern and still owes debts to old crewmates
          minLength: 3
          maxLength: 6000
        includeArt:
          type: boolean
          default: false
        style:
          type: string
          enum:
          - painted
          - ink
          - pixel
          - anime
          - watercolor
          default: painted
      required:
      - prompt
    CreateDndEncounterDto:
      type: object
      properties:
        partyLevel:
          type: number
          example: 4
          minimum: 1
          maximum: 20
        partySize:
          type: number
          example: 4
          minimum: 1
          maximum: 10
        difficulty:
          type: string
          enum:
          - easy
          - medium
          - hard
          - deadly
          default: medium
        environment:
          type: string
          example: ruined temple
          maxLength: 80
        theme:
          type: string
          example: cultists guarding a sealed vault
          maxLength: 200
      required:
      - partyLevel
      - partySize
    CreateDndPortraitDto:
      type: object
      properties:
        prompt:
          type: string
          example: A one-eyed half-orc mercenary captain with a cracked tusk and a wolf-fur cloak
          minLength: 3
          maxLength: 6000
        style:
          type: string
          enum:
          - painted
          - ink
          - pixel
          - anime
          - watercolor
        border:
          type: string
          enum:
          - gold
          - silver
          - iron
          - wood
          - arcane
          - none
          default: gold
        size:
          type: number
          enum:
          - 512
          - 1024
          description: Clamped down to the caller tier max (free 512, pro 1024).
      required:
      - prompt
      - style
    CreateDndBattleMapDto:
      type: object
      properties:
        prompt:
          type: string
          example: A collapsed watchtower overgrown with vines beside a shallow river ford
          minLength: 3
          maxLength: 6000
        setting:
          type: string
          enum:
          - fantasy
          - dungeon
          - scifi
          - cyberpunk
          - modern
          default: fantasy
        gridCells:
          description: Default 30x22, capped at 60x45.
          allOf:
          - $ref: '#/components/schemas/DndGridCellsDto'
        gridVisible:
          type: boolean
          default: true
        size:
          type: number
          enum:
          - 1024
          - 1536
          description: Width in px; height is always 3:4 of width. Clamped down to the caller tier max.
      required:
      - prompt
    DndGridCellsDto:
      type: object
      properties:
        cols:
          type: number
          example: 30
          minimum: 4
          maximum: 60
        rows:
          type: number
          example: 22
          minimum: 4
          maximum: 45
      required:
      - cols
      - rows
    FoundryPackageDto:
      type: object
      properties:
        jobIds:
          example:
          - cljob1
          - cljob2
          description: Completed DnD Tools job IDs owned by the caller (max 50).
          type: array
          items:
            type: string
      required:
      - jobIds
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Sprixen API key (spx_live_...)
      name: Authorization
      in: header
    cookie:
      type: apiKey
      in: cookie
      name: sprixen_session