Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Sprixen 3D Studio 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: 3D Studio
paths:
/v1/models-3d:
post:
operationId: Models3dController_create
summary: Create a 3D model from image upload, sprite ID, or text prompt
description: 'Async image-to-3D: a textured GLB in real-world meters. Cost: 10 credits (fast) or 14 (quality). With a projectId whose project has a style, a text prompt first becomes a concept image in that style. Poll GET /models-3d/:id for status. When status=completed, modelUrl holds the GLB URL.'
parameters: []
requestBody:
required: true
description: 'Multipart form: image file + optional JSON fields, OR JSON body with spriteId/prompt'
content:
multipart/form-data:
schema:
type: object
properties:
image:
type: string
format: binary
description: Source image (PNG/JPG/WebP, max 10 MB)
projectId:
type: string
prompt:
type: string
spriteId:
type: string
name:
type: string
application/json:
schema:
type: object
properties:
image:
type: string
format: binary
description: Source image (PNG/JPG/WebP, max 10 MB)
projectId:
type: string
prompt:
type: string
spriteId:
type: string
name:
type: string
responses:
'201':
description: 3D model job created (pending)
'400':
description: Invalid input or rate limit exceeded
'402':
description: Insufficient credits
'403':
description: Access denied to project or sprite
'404':
description: Project or sprite not found
tags:
- 3D Studio
security:
- bearer: []
get:
operationId: Models3dController_findAll
summary: List current user's 3D models
parameters:
- name: projectId
required: false
in: query
description: Only this project's models (no built-ins)
schema:
type: string
- name: limit
required: false
in: query
schema:
example: 20
type: number
- name: page
required: false
in: query
schema:
example: 1
type: number
responses:
'200':
description: Paginated 3D models list
tags:
- 3D Studio
security:
- bearer: []
/v1/models-3d/gallery:
get:
operationId: Models3dController_gallery
summary: List gallery models (public, no auth required)
parameters:
- name: category
required: false
in: query
schema:
type: string
- name: theme
required: false
in: query
schema:
type: string
- name: search
required: false
in: query
schema:
type: string
responses:
'200':
description: Gallery models list
tags:
- 3D Studio
security:
- bearer: []
/v1/models-3d/admin/import:
post:
operationId: Models3dController_adminImport
summary: 'Admin: import an existing GLB file as a built-in 3D model'
description: Saves the uploaded GLB to storage and creates a Model3D record with sourceType=builtin, userId=null, status=completed. No credits deducted.
parameters: []
requestBody:
required: true
description: GLB file + model metadata
content:
multipart/form-data:
schema:
type: object
required:
- glb
- name
properties:
glb:
type: string
format: binary
description: GLB file (max 100 MB)
name:
type: string
description: Display name for the model
category:
type: string
description: Category tag, e.g. dungeon, medieval, nature
source:
type: string
description: Attribution source, e.g. KayKit, Quaternius
responses:
'201':
description: Built-in model created
'400':
description: Missing file or invalid input
tags:
- 3D Studio
security:
- bearer: []
/v1/models-3d/admin/thumbnail/{id}:
post:
operationId: Models3dController_adminUploadThumbnail
summary: 'Admin: upload thumbnail for any model (including builtin)'
parameters:
- name: id
required: true
in: path
description: Model3D ID
schema:
type: string
responses:
'200':
description: Thumbnail uploaded
tags:
- 3D Studio
security:
- bearer: []
/v1/models-3d/library:
get:
operationId: Models3dController_searchLibrary
summary: Search the 3D library (license-safe models you can adapt to your project)
description: 'Free. About 6,900 CC0 models (Kenney, KayKit, Quaternius, Poly Haven): props, furniture, buildings and modular kits, nature, vehicles, characters. Each result has a previewUrl when the publisher ships one, the original fileUrl, license and author. Adapt one to your project with POST /v1/models-3d/from-library (2 credits).'
parameters:
- name: q
required: true
in: query
description: What you are looking for, in plain words (e.g. "wooden barrel", "street light", "pine tree", "knight").
schema:
maxLength: 120
example: wooden barrel
type: string
- name: limit
required: false
in: query
description: Max results (1-60, default 24).
schema:
example: 24
type: number
- name: style
required: false
in: query
description: Only this style.
schema:
enum:
- low-poly
- realistic
type: string
responses:
'200':
description: ''
tags:
- 3D Studio
security:
- bearer: []
/v1/models-3d/library/{libraryModelId}:
get:
operationId: Models3dController_getLibraryModel
summary: One 3D library model (free)
parameters:
- name: libraryModelId
required: true
in: path
schema:
type: string
responses:
'200':
description: ''
tags:
- 3D Studio
security:
- bearer: []
/v1/models-3d/from-library:
post:
operationId: Models3dController_adaptFromLibrary
summary: Adapt a 3D library model to your project style (2 credits)
description: 'Async. With a project that has a style, the model''s colors move to the project''s materials and palette (pixel-art styles also get palette lock, texel density and nearest filtering); without a style it keeps its look. Always: real size in meters and the pivot at the center of the base. Poll GET /v1/models-3d/:id; when completed, modelUrl is the GLB and providerData carries the license and author.'
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdaptLibraryModelDto'
responses:
'201':
description: Adaptation queued (pending)
'402':
description: Insufficient credits
'404':
description: Library model or project not found
tags:
- 3D Studio
security:
- bearer: []
/v1/models-3d/{id}:
get:
operationId: Models3dController_findOne
summary: Get 3D model by ID (poll for status/results)
parameters:
- name: id
required: true
in: path
description: Model3D ID
schema:
type: string
responses:
'200':
description: 3D model details
'403':
description: Access denied
'404':
description: 3D model not found
tags:
- 3D Studio
security:
- bearer: []
delete:
operationId: Models3dController_remove
summary: Soft-delete a 3D model
parameters:
- name: id
required: true
in: path
description: Model3D ID
schema:
type: string
responses:
'200':
description: Model deleted
'403':
description: Access denied
'404':
description: 3D model not found
tags:
- 3D Studio
security:
- bearer: []
/v1/models-3d/{id}/thumbnail:
post:
operationId: Models3dController_uploadThumbnail
summary: Upload rendered thumbnail for a 3D model
parameters:
- name: id
required: true
in: path
description: Model3D ID
schema:
type: string
responses:
'200':
description: Thumbnail uploaded
tags:
- 3D Studio
security:
- bearer: []
/v1/models-3d/{id}/download:
get:
operationId: Models3dController_download
summary: Get GLB download URL for a completed 3D model
parameters:
- name: id
required: true
in: path
description: Model3D ID
schema:
type: string
responses:
'200':
description: GLB download URL
'400':
description: Model not yet completed
'403':
description: Access denied
'404':
description: 3D model not found
tags:
- 3D Studio
security:
- bearer: []
/v1/models-3d/health/trellis:
get:
operationId: Models3dController_trellisHealth
summary: Check TRELLIS GPU server health
parameters: []
responses:
'200':
description: TRELLIS server health status
tags:
- 3D Studio
security:
- bearer: []
/v1/models-3d/{id}/animations:
post:
operationId: Models3dController_createAnimation
summary: Create an animation for a 3D model
description: 'Async: automatic rig on the first animation (Mixamo-named skeleton for humanoids), then a preset animation retargeted in place. Cost: 3 credits per animation, plus 6 for the rig on the first one. Works on generated models; library models keep their own animations. Poll GET /animations-3d/:animId for status.'
parameters:
- name: id
required: true
in: path
description: Model3D ID (must be completed)
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAnimation3dDto'
responses:
'201':
description: Animation job created (pending)
'400':
description: Model not completed or rate limit
'402':
description: Insufficient credits
tags:
- 3D Studio
security:
- bearer: []
get:
operationId: Models3dController_listAnimations
summary: List animations for a 3D model
parameters:
- name: id
required: true
in: path
description: Model3D ID
schema:
type: string
responses:
'200':
description: List of animations
tags:
- 3D Studio
security:
- bearer: []
/v1/animations-3d/{animId}:
get:
operationId: Models3dController_findAnimation
summary: Get animation by ID (poll for status)
parameters:
- name: animId
required: true
in: path
description: Animation3D ID
schema:
type: string
responses:
'200':
description: Animation details
tags:
- 3D Studio
security:
- bearer: []
delete:
operationId: Models3dController_removeAnimation
summary: Soft-delete an animation
parameters:
- name: animId
required: true
in: path
description: Animation3D ID
schema:
type: string
responses:
'200':
description: Animation deleted
tags:
- 3D Studio
security:
- bearer: []
/v1/animations-3d/{animId}/download:
get:
operationId: Models3dController_downloadAnimation
summary: Get animated GLB download URL
parameters:
- name: animId
required: true
in: path
description: Animation3D ID
schema:
type: string
responses:
'200':
description: Animated GLB download URL
tags:
- 3D Studio
security:
- bearer: []
/v1/projects/{projectId}/kits/plan:
post:
operationId: KitsController_plan
summary: Plan a 3D kit from a description (free)
description: 'Free. Turns one description ("a medieval tavern room") into the distinct pieces a scene needs, each with a real height, the closest license-safe library models and a recommended route: library (2 credits, adapted to the project style) or custom (10 credits, generated in the style). Nothing is charged until POST .../build.'
parameters:
- name: projectId
required: true
in: path
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PlanKitDto'
responses:
'201':
description: ''
tags:
- 3D Studio
security:
- bearer: []
/v1/projects/{projectId}/kits:
get:
operationId: KitsController_list
summary: List the project's 3D kits with piece status
parameters:
- name: projectId
required: true
in: path
schema:
type: string
responses:
'200':
description: ''
tags:
- 3D Studio
security:
- bearer: []
/v1/projects/{projectId}/kits/{kitId}:
get:
operationId: KitsController_get
summary: 'One 3D kit: planned pieces, chosen routes, model status and the download path…'
parameters:
- name: projectId
required: true
in: path
schema:
type: string
- name: kitId
required: true
in: path
schema:
type: string
responses:
'200':
description: ''
tags:
- 3D Studio
security:
- bearer: []
/v1/projects/{projectId}/kits/{kitId}/build:
post:
operationId: KitsController_build
summary: Build a planned 3D kit (charged per piece)
description: 'Builds the selected pieces once: each becomes a 3D model of the project (library pieces 2 credits, custom 10 fast or 14 quality), all following the project style. Send `pieces` to change routes, library picks, heights or prompts, or omit it to build the plan as recommended. `maxCredits` refuses a build above that cost. Poll GET .../kits/:kitId until every piece is ready, then download.'
parameters:
- name: projectId
required: true
in: path
schema:
type: string
- name: kitId
required: true
in: path
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BuildKitDto'
responses:
'402':
description: Insufficient credits for the whole kit
tags:
- 3D Studio
security:
- bearer: []
/v1/projects/{projectId}/kits/{kitId}/download:
get:
operationId: KitsController_download
summary: Download a built 3D kit as a ZIP
description: models/*.glb (meters, base pivot), previews/*.png, kit.json (sizes, roles, pivots, licenses), style.json and materials/*.png of the project style, README.md and ATTRIBUTION.md.
parameters:
- name: projectId
required: true
in: path
schema:
type: string
- name: kitId
required: true
in: path
schema:
type: string
responses:
'200':
description: ''
tags:
- 3D Studio
security:
- bearer: []
components:
schemas:
CreateAnimation3dDto:
type: object
properties:
prompt:
type: string
description: Text prompt describing the desired animation motion
example: A person walking forward at a normal pace with natural arm swing
presetSlug:
type: string
description: 'Preset slug (required): idle, walk, run, sprint, jump, attack, shoot, hurt, die, dodge, climb, turn, crawl, slither, swim.'
example: walk
name:
type: string
description: Human-readable name for the animation. Defaults to the preset label or a truncated prompt.
example: Walk Cycle
animationType:
type: string
description: Skeleton choice for the first animation of a model. "auto" (default) detects it (biped, quadruped, insect, snake, fish...). "humanoid" forces a biped Mixamo skeleton. "non_humanoid" also detects, for creatures.
example: auto
enum:
- auto
- humanoid
- non_humanoid
required:
- prompt
BuildKitDto:
type: object
properties:
pieces:
description: Changes to the planned pieces (route, library pick, height, prompt, include). Omit to build the plan as recommended.
type: array
items:
$ref: '#/components/schemas/KitPieceChoiceDto'
maxCredits:
type: number
description: Refuse the build when it would cost more than this many credits (useful for agents building on their own).
example: 30
AdaptLibraryModelDto:
type: object
properties:
libraryModelId:
type: string
description: Library model id from GET /v1/models-3d/library (every library model is CC0; the license and author travel with the result).
example: b78e24f807209a7338f0f1fe
projectId:
type: string
description: Project to adapt the model to. When the project has a style (POST /v1/projects/:id/style), the model's colors move to the project's materials and palette, and pixel-art styles get palette lock, texel density and nearest filtering. Without a style the model keeps its look and only gets real size and a ground pivot.
example: cld1234...
name:
type: string
description: Name for the resulting 3D model. Defaults to the library title.
maxLength: 80
heightMeters:
type: number
description: 'Real height in meters. Default: a size table by object class (chair 0.95 m, car 1.5 m, tree 6 m, character 1.8 m...) for standalone props; modular architecture pieces keep their kit scale.'
example: 0.9
webhookUrl:
type: string
description: Webhook URL that receives a POST when the model is ready or failed.
required:
- libraryModelId
KitPieceChoiceDto:
type: object
properties:
key:
type: string
description: Piece key from the plan.
example: wooden-stool
include:
type: boolean
description: false drops the piece from the build.
route:
type: string
description: library (2 credits) or custom (10 fast, 14 quality).
enum:
- library
- custom
libraryModelId:
type: string
description: Library model to adapt (any id from GET /v1/models-3d/library).
heightMeters:
type: number
description: Real height in meters.
prompt:
type: string
description: Description for a custom piece.
maxLength: 400
quality:
type: string
enum:
- fast
- quality
required:
- key
PlanKitDto:
type: object
properties:
prompt:
type: string
description: 'What the kit is for, in plain words. Example: "a medieval tavern room with a bar, tables, stools, barrels and candles".'
minLength: 4
maxLength: 600
maxPieces:
type: number
description: Most pieces to plan (4 to 15, default 10).
example: 10
required:
- prompt
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