Sprixen AI Tabletop API

The AI Tabletop API from Sprixen — 18 operation(s) for ai tabletop.

GitHub OpenAPI

Operations 26

POST /v1/ttrpg Create an AI tabletop adventure generation job #
GET /v1/ttrpg List current user's AI tabletop adventures #
GET /v1/ttrpg/sessions/{sessionId} Get an active AI-DM play session #
POST /v1/ttrpg/sessions/{sessionId}/turns Send a player action to the AI-DM #
POST /v1/ttrpg/characters Create a reusable player character (AI sheet + portrait, async) #
GET /v1/ttrpg/characters List the current user's player characters #
GET /v1/ttrpg/characters/{characterId} Get a player character by ID #
PATCH /v1/ttrpg/characters/{characterId} Update a character (name / sheet text, free) #
DELETE /v1/ttrpg/characters/{characterId} Soft-delete a player character #
POST /v1/ttrpg/characters/{characterId}/regenerate-portrait Regenerate a character portrait + token (1 credit) #
PATCH /v1/ttrpg/{id}/scenes/{index} Update scene text fields (free, no image regeneration) #
DELETE /v1/ttrpg/{id}/scenes/{index} Delete a scene (free; minimum 1 scene enforced) #
POST /v1/ttrpg/{id}/scenes/{index}/regenerate-map Regenerate the battlemap for a scene (costs 1 credit) #
POST /v1/ttrpg/{id}/scenes Add a new scene with a generated battlemap (costs 1 credit) #
PATCH /v1/ttrpg/{id}/npcs/{index} Update NPC text fields (free, no image regeneration) #
DELETE /v1/ttrpg/{id}/npcs/{index} Delete an NPC (free) #
POST /v1/ttrpg/{id}/npcs/{index}/regenerate-art Regenerate portrait and token for an NPC (costs 1 credit) #
POST /v1/ttrpg/{id}/npcs Add a new NPC with generated portrait and token (costs 1 credit) #
POST /v1/ttrpg/{id}/regenerate-cover Regenerate the cinematic cover / key art (1 credit) #
GET /v1/ttrpg/{id}/party List the characters in an adventure's party #
POST /v1/ttrpg/{id}/party/{characterId} Add a character to an adventure party #
DELETE /v1/ttrpg/{id}/party/{characterId} Remove a character from an adventure party #
POST /v1/ttrpg/{id}/sessions Start or resume an AI-DM play session for an adventure #
GET /v1/ttrpg/{id}/export Export an adventure as JSON or plain text #
GET /v1/ttrpg/{id} Get an AI tabletop adventure by ID #
DELETE /v1/ttrpg/{id} Soft-delete an AI tabletop adventure #

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-ai-tabletop-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-ai-tabletop-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sprixen AI Tabletop 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: AI Tabletop
paths:
  /v1/ttrpg:
    post:
      operationId: TtrpgController_create
      summary: Create an AI tabletop adventure generation job
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTtrpgAdventureDto'
      responses:
        '201':
          description: Adventure queued for generation
        '402':
          description: Insufficient credits
      tags:
      - AI Tabletop
      security:
      - bearer: []
    get:
      operationId: TtrpgController_findAll
      summary: List current user's AI tabletop adventures
      parameters: []
      responses:
        '200':
          description: Adventure list
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/sessions/{sessionId}:
    get:
      operationId: TtrpgController_getSession
      summary: Get an active AI-DM play session
      parameters:
      - name: sessionId
        required: true
        in: path
        description: TTRPG session ID
        schema:
          type: string
      responses:
        '200':
          description: Session with transcript
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/sessions/{sessionId}/turns:
    post:
      operationId: TtrpgController_sendTurn
      summary: Send a player action to the AI-DM
      parameters:
      - name: sessionId
        required: true
        in: path
        description: TTRPG session ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendTtrpgTurnDto'
      responses:
        '201':
          description: Player and AI-DM messages created
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/characters:
    post:
      operationId: TtrpgController_createCharacter
      summary: Create a reusable player character (AI sheet + portrait, async)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTtrpgCharacterDto'
      responses:
        '201':
          description: Character queued for generation
        '402':
          description: Insufficient credits
      tags:
      - AI Tabletop
      security:
      - bearer: []
    get:
      operationId: TtrpgController_listCharacters
      summary: List the current user's player characters
      parameters: []
      responses:
        '200':
          description: Character list
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/characters/{characterId}:
    get:
      operationId: TtrpgController_getCharacter
      summary: Get a player character by ID
      parameters:
      - name: characterId
        required: true
        in: path
        description: Character ID
        schema:
          type: string
      responses:
        '200':
          description: Character details
      tags:
      - AI Tabletop
      security:
      - bearer: []
    patch:
      operationId: TtrpgController_updateCharacter
      summary: Update a character (name / sheet text, free)
      parameters:
      - name: characterId
        required: true
        in: path
        description: Character ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTtrpgCharacterDto'
      responses:
        '200':
          description: Updated character
      tags:
      - AI Tabletop
      security:
      - bearer: []
    delete:
      operationId: TtrpgController_removeCharacter
      summary: Soft-delete a player character
      parameters:
      - name: characterId
        required: true
        in: path
        description: Character ID
        schema:
          type: string
      responses:
        '200':
          description: Character deleted
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/characters/{characterId}/regenerate-portrait:
    post:
      operationId: TtrpgController_regenerateCharacterPortrait
      summary: Regenerate a character portrait + token (1 credit)
      parameters:
      - name: characterId
        required: true
        in: path
        description: Character ID
        schema:
          type: string
      responses:
        '200':
          description: Updated character with new art
        '402':
          description: Insufficient credits
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}/scenes/{index}:
    patch:
      operationId: TtrpgController_updateScene
      summary: Update scene text fields (free, no image regeneration)
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      - name: index
        required: true
        in: path
        description: Zero-based scene index
        schema:
          type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTtrpgSceneDto'
      responses:
        '200':
          description: Updated adventure
      tags:
      - AI Tabletop
      security:
      - bearer: []
    delete:
      operationId: TtrpgController_deleteScene
      summary: Delete a scene (free; minimum 1 scene enforced)
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      - name: index
        required: true
        in: path
        description: Zero-based scene index
        schema:
          type: number
      responses:
        '200':
          description: Updated adventure
        '400':
          description: Cannot delete the last scene
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}/scenes/{index}/regenerate-map:
    post:
      operationId: TtrpgController_regenerateSceneMap
      summary: Regenerate the battlemap for a scene (costs 1 credit)
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      - name: index
        required: true
        in: path
        description: Zero-based scene index
        schema:
          type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegenerateTtrpgSceneMapDto'
      responses:
        '200':
          description: Updated adventure with new map
        '400':
          description: Adventure not completed yet
        '402':
          description: Insufficient credits
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}/scenes:
    post:
      operationId: TtrpgController_addScene
      summary: Add a new scene with a generated battlemap (costs 1 credit)
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTtrpgSceneDto'
      responses:
        '201':
          description: Updated adventure with new scene
        '400':
          description: Adventure not completed yet
        '402':
          description: Insufficient credits
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}/npcs/{index}:
    patch:
      operationId: TtrpgController_updateNpc
      summary: Update NPC text fields (free, no image regeneration)
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      - name: index
        required: true
        in: path
        description: Zero-based NPC index
        schema:
          type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTtrpgNpcDto'
      responses:
        '200':
          description: Updated adventure
      tags:
      - AI Tabletop
      security:
      - bearer: []
    delete:
      operationId: TtrpgController_deleteNpc
      summary: Delete an NPC (free)
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      - name: index
        required: true
        in: path
        description: Zero-based NPC index
        schema:
          type: number
      responses:
        '200':
          description: Updated adventure
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}/npcs/{index}/regenerate-art:
    post:
      operationId: TtrpgController_regenerateNpcArt
      summary: Regenerate portrait and token for an NPC (costs 1 credit)
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      - name: index
        required: true
        in: path
        description: Zero-based NPC index
        schema:
          type: number
      responses:
        '200':
          description: Updated adventure with new NPC art
        '400':
          description: Adventure not completed yet
        '402':
          description: Insufficient credits
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}/npcs:
    post:
      operationId: TtrpgController_addNpc
      summary: Add a new NPC with generated portrait and token (costs 1 credit)
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTtrpgNpcDto'
      responses:
        '201':
          description: Updated adventure with new NPC
        '400':
          description: Adventure not completed yet
        '402':
          description: Insufficient credits
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}/regenerate-cover:
    post:
      operationId: TtrpgController_regenerateCover
      summary: Regenerate the cinematic cover / key art (1 credit)
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      responses:
        '200':
          description: Updated adventure with new cover
        '402':
          description: Insufficient credits
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}/party:
    get:
      operationId: TtrpgController_getParty
      summary: List the characters in an adventure's party
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      responses:
        '200':
          description: Party characters
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}/party/{characterId}:
    post:
      operationId: TtrpgController_addPartyMember
      summary: Add a character to an adventure party
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      - name: characterId
        required: true
        in: path
        description: Character ID
        schema:
          type: string
      responses:
        '200':
          description: Updated party
      tags:
      - AI Tabletop
      security:
      - bearer: []
    delete:
      operationId: TtrpgController_removePartyMember
      summary: Remove a character from an adventure party
      parameters:
      - name: id
        required: true
        in: path
        description: Adventure ID
        schema:
          type: string
      - name: characterId
        required: true
        in: path
        description: Character ID
        schema:
          type: string
      responses:
        '200':
          description: Updated party
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}/sessions:
    post:
      operationId: TtrpgController_startSession
      summary: Start or resume an AI-DM play session for an adventure
      parameters:
      - name: id
        required: true
        in: path
        description: TTRPG adventure ID
        schema:
          type: string
      responses:
        '201':
          description: Active session with opening message
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}/export:
    get:
      operationId: TtrpgController_exportAdventure
      summary: Export an adventure as JSON or plain text
      parameters:
      - name: id
        required: true
        in: path
        description: TTRPG adventure ID
        schema:
          type: string
      - name: format
        required: false
        in: query
        schema:
          enum:
          - json
          - text
          type: string
      responses:
        '200':
          description: Adventure export file
      tags:
      - AI Tabletop
      security:
      - bearer: []
  /v1/ttrpg/{id}:
    get:
      operationId: TtrpgController_findOne
      summary: Get an AI tabletop adventure by ID
      parameters:
      - name: id
        required: true
        in: path
        description: TTRPG adventure ID
        schema:
          type: string
      responses:
        '200':
          description: Adventure details
      tags:
      - AI Tabletop
      security:
      - bearer: []
    delete:
      operationId: TtrpgController_remove
      summary: Soft-delete an AI tabletop adventure
      parameters:
      - name: id
        required: true
        in: path
        description: TTRPG adventure ID
        schema:
          type: string
      responses:
        '200':
          description: Adventure deleted
      tags:
      - AI Tabletop
      security:
      - bearer: []
components:
  schemas:
    UpdateTtrpgNpcDto:
      type: object
      properties:
        name:
          type: string
          example: Kael Dran
          maxLength: 80
        role:
          type: string
          example: Innkeeper turned spy
          maxLength: 120
        personality:
          type: string
          maxLength: 6000
        motivation:
          type: string
          maxLength: 6000
        secret:
          type: string
          maxLength: 6000
        sampleLine:
          type: string
          example: You should have turned back at the old stones.
          maxLength: 300
        visualPrompt:
          type: string
          example: weathered middle-aged woman with silver-streaked hair and watchful green eyes
          maxLength: 6000
    UpdateTtrpgSceneDto:
      type: object
      properties:
        title:
          type: string
          example: The Crumbling Bridge
          maxLength: 120
        description:
          type: string
          maxLength: 6000
        readAloud:
          type: string
          maxLength: 6000
        clue:
          type: string
          maxLength: 6000
        encounter:
          type: string
          maxLength: 6000
        difficultyNote:
          type: string
          example: 'Medium: social choices can avoid danger.'
          maxLength: 200
        mapPrompt:
          type: string
          example: top-down view of a crumbling stone bridge over a raging river
          maxLength: 6000
    CreateTtrpgNpcDto:
      type: object
      properties:
        name:
          type: string
          example: Kael Dran
          minLength: 1
          maxLength: 80
        role:
          type: string
          example: Innkeeper turned spy
          maxLength: 120
        personality:
          type: string
          maxLength: 6000
        motivation:
          type: string
          maxLength: 6000
        secret:
          type: string
          maxLength: 6000
        sampleLine:
          type: string
          example: You should have turned back at the old stones.
          maxLength: 300
        visualPrompt:
          type: string
          example: weathered middle-aged woman with silver-streaked hair and watchful green eyes
          maxLength: 6000
      required:
      - name
    CreateTtrpgAdventureDto:
      type: object
      properties:
        prompt:
          type: string
          example: A ruined moon temple where a lost knight asks for help before dawn
          minLength: 10
          maxLength: 6000
        templateSlug:
          type: string
          example: moonlit-ruins
        setting:
          type: string
          example: dark-fantasy
        tone:
          type: string
          enum:
          - heroic
          - dark
          - cozy
          - weird
          - mystery
          default: heroic
        length:
          type: string
          enum:
          - micro
          - short
          - one_shot
          - medium
          - long
          default: one_shot
          description: micro=1 scene, short=2, one_shot=3, medium=4, long=6. Credit cost scales with length.
        artStyle:
          type: string
          example: Fantasy painted game art with clean tabletop tokens
        railsLevel:
          type: number
          minimum: 0
          maximum: 100
          default: 50
        partyFantasy:
          type: string
          example: A clever rogue and a haunted cleric
      required:
      - prompt
    CreateTtrpgSceneDto:
      type: object
      properties:
        title:
          type: string
          example: The Amber Vault
          minLength: 1
          maxLength: 120
        description:
          type: string
          maxLength: 6000
        readAloud:
          type: string
          maxLength: 6000
        clue:
          type: string
          maxLength: 6000
        encounter:
          type: string
          maxLength: 6000
        difficultyNote:
          type: string
          example: 'Medium: choices matter more than combat.'
          maxLength: 200
        mapPrompt:
          type: string
          example: top-down view of a treasure vault with golden columns and trapped floors
          maxLength: 6000
      required:
      - title
    RegenerateTtrpgSceneMapDto:
      type: object
      properties:
        mapPrompt:
          type: string
          example: top-down dark dungeon chamber with a central altar and shadowed corridors
          description: Optional override for the battlemap prompt. If provided, the scene mapPrompt is also updated.
          maxLength: 6000
    UpdateTtrpgCharacterDto:
      type: object
      properties:
        name:
          type: string
          description: Rename the character.
        sheet:
          type: object
          description: Full replacement of the character sheet (light stat block + narrative fields). Text edits are free.
    CreateTtrpgCharacterDto:
      type: object
      properties:
        concept:
          type: string
          description: 'Free-text concept for the character (up to 6000 characters). The AI turns this into a full light stat sheet, portrait, and token. Example: "a grizzled dwarven storm-priest who lost her faith".'
          example: A nimble street thief with a haunted past and a silver tongue
        name:
          type: string
          description: Optional character name. If omitted, the AI invents a fitting one.
        artStyle:
          type: string
          description: Optional art-style direction for the portrait. Defaults to a clean painted fantasy character style.
      required:
      - concept
    SendTtrpgTurnDto:
      type: object
      properties:
        content:
          type: string
          example: I sneak behind the statue and inspect the silver keyhole.
          minLength: 1
          maxLength: 6000
        rollResult:
          type: number
          minimum: 1
          maximum: 20
          example: 14
      required:
      - content
  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