Sprixen Generation API
The Generation API from Sprixen — 6 operation(s) for generation.
The Generation API from Sprixen — 6 operation(s) for generation.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/sprixen-com:sprixen-com-generation-api"
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.
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: 3.2.0
info:
title: Sprixen Generation 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: Generation
paths:
/v1/generations:
post:
operationId: GenerationController_create
summary: Create new generation (sprite/variation)
description: Dispatches async job to Gemini. Poll GET /generations/:id for status.
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateGenerationDto'
responses:
'201':
description: Generation job created (pending)
'402':
description: Credit limit reached
tags:
- Generation
security:
- bearer: []
get:
operationId: GenerationController_findAll
summary: List current user's generations
parameters:
- 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 generations list
tags:
- Generation
security:
- bearer: []
/v1/projects/{projectId}/generations:
get:
operationId: GenerationController_findByProject
summary: List generations for a specific project
parameters:
- name: projectId
required: true
in: path
description: Project ID
schema:
type: string
- name: limit
required: false
in: query
schema:
type: number
- name: page
required: false
in: query
schema:
type: number
responses:
'200':
description: Paginated generations list for project
'403':
description: Access denied
tags:
- Generation
security:
- bearer: []
/v1/generations/select:
post:
operationId: GenerationController_selectVariation
summary: Select a generation variation to save as a Sprite
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SelectVariationDto'
responses:
'201':
description: Sprite created from selected variation
'403':
description: Access denied
'404':
description: Generation not found
tags:
- Generation
security:
- bearer: []
/v1/generations/{id}:
get:
operationId: GenerationController_findOne
summary: Get generation by ID (poll for status/results)
parameters:
- name: id
required: true
in: path
description: Generation ID
schema:
type: string
responses:
'200':
description: Generation status and result
'403':
description: Access denied
'404':
description: Generation not found
tags:
- Generation
security:
- bearer: []
/v1/generations/{id}/image:
get:
operationId: GenerationController_getImage
summary: Stable public redirect to a result image of a generation
description: Returns 302 redirect when the generation is completed, 202 while still pending. Use ?index=N for multi-output generations. No auth required.
parameters:
- name: id
required: true
in: path
description: Generation ID
schema:
type: string
- name: index
required: false
in: query
description: Result image index, defaults to 0
schema:
type: number
responses:
'202':
description: Generation still pending
'302':
description: Redirect to the image URL
'404':
description: Generation not found
tags:
- Generation
security:
- bearer: []
/v1/generations/{id}/animation:
get:
operationId: GenerationController_getAnimation
summary: Returns animation spritesheet data for a character generation
description: Returns 202 while the animation is still pending, 200 with spritesheet data when ready. No auth required.
parameters:
- name: id
required: true
in: path
description: Generation ID
schema:
type: string
- name: type
required: false
in: query
description: Animation type filter (e.g. walk, idle)
schema:
type: string
responses:
'200':
description: Animation ready with spritesheet data
'202':
description: Animation still pending
'404':
description: Generation not found
tags:
- Generation
security:
- bearer: []
components:
schemas:
ChainAnimationDto:
type: object
properties:
type:
type: string
example: idle
enum:
- idle
- walk
- run
- attack
- jump
- death
- hurt
- custom
description: Animation type to generate automatically after sprite completes
frameCount:
type: number
example: 8
description: Number of frames (defaults per type if omitted)
fps:
type: number
example: 12
description: Frames per second (default 12)
direction:
type: string
example: down
enum:
- right
- left
- up
- down
- up-right
- up-left
- down-right
- down-left
description: 'Facing direction for top-down/isometric games. When omitted Gemini picks a default (typically right side view). Use this with `chainAnimations: []` to chain the same animation type in multiple directions.'
resolution:
type: string
example: 28x32
description: 'Override resolution for this chained animation (e.g. "28x32"). If omitted, falls back to project resolution. Match this with the sprite''s resolution (when CreateGenerationDto.resolution was set) so the animation preserves the same chunky pixel-art style as the base sprite instead of being upscaled. Format: "WIDTHxHEIGHT" with each side between 8 and 4096, e.g. "256x256" or "28x32".'
idlePreset:
type: string
example: lively
enum:
- breath
- lively
- looking
- item
description: Pre-baked idle style. Only honored when type="idle". Translates to a customDescription internally.
quality:
type: string
example: standard
enum:
- standard
- premium
description: Animation quality. "standard" is a Gemini sprite sheet. "premium" produces a richer, higher-frame animation (costs more credits). Defaults to "standard".
required:
- type
CreateGenerationDto:
type: object
properties:
prompt:
type: string
example: knight warrior with sword and shield
description: Describe the sprite to generate. Max 6000 characters.
projectId:
type: string
example: proj_abc123
description: Project ID to use style config from (optional)
type:
type: string
example: sprite
enum:
- sprite
- variation
default: sprite
referenceImageUrl:
type: string
example: /api/public/uploads/generations/user123/gen456_0.png
description: Optional reference image URL or path to guide style (passed to Gemini)
webhookUrl:
type: string
example: https://your-server.com/webhooks/sprixen
description: Optional webhook URL — receives a POST when generation completes or fails
variantCount:
type: number
example: 1
description: Number of sprite variants to generate (1-3). Each variant costs 2 credits. Locked to 1 when chainAnimation is used.
default: 1
minimum: 1
maximum: 3
chainAnimation:
description: When provided, the sprite generation automatically chains into an animation job. Requires projectId to be set. Costs 6 credits instead of 2.
allOf:
- $ref: '#/components/schemas/ChainAnimationDto'
chainAnimations:
description: Multiple animation types to chain after sprite completes. Use instead of chainAnimation when you want multiple animations. Requires projectId. Costs 4 credits per animation.
type: array
items:
$ref: '#/components/schemas/ChainAnimationDto'
skipBgRemoval:
type: boolean
description: Skip background removal (RMBG-2.0). Use for full-scene images like game backgrounds where bg removal would damage the image.
default: false
resolution:
type: string
description: 'Override resolution for this generation (e.g. "256x256"). If not provided, uses the project resolution or the default 128x128. Format: "WIDTHxHEIGHT" with each side between 8 and 4096, e.g. "256x256" or "28x32".'
example: 256x256
noBase:
type: boolean
description: When true, adds "NO base, NO pedestal, NO ground plane, NO ground shadow" to the prompt. Useful for character sprites that should float freely without any surface underneath.
default: false
packItems:
description: 'For pack generation: list of items to generate in a single sheet. Each item becomes a separate sprite. Max 8 items.'
example:
- wall torch
- vine roots
- stone crack
- moss patch
type: array
items:
type: string
packType:
type: string
description: 'For pack generation: prompt contract preset for generic items/props, ability icons, or HUD/UI pieces.'
enum:
- items_props
- ability_icons
- hud_ui
example: hud_ui
pixelPerfect:
type: string
description: 'Pixel Perfect resize mode for this generation (overrides project setting). "auto" (recommended): system picks the right algorithm based on artStyle + resolution. "on": forces crispy nearest-neighbor kernel (retro pixel art, Gungeon/NES-style). "off": forces smooth Lanczos kernel (cartoon, anime, higher-res art). IMPORTANT: nearest-neighbor is NOT universally "better" - it destroys fine detail at higher resolutions. Use "auto" unless you have a specific reason.'
enum:
- auto
- 'on'
- 'off'
example: auto
required:
- prompt
SelectVariationDto:
type: object
properties:
generationId:
type: string
example: gen_abc123
description: ID of the Generation to select a variation from
variationId:
type: string
example: var_xyz456
description: ID of the specific variation (resultUrl index) to select
spriteName:
type: string
example: Knight Hero
description: Name to give the new Sprite record
required:
- generationId
- variationId
- spriteName
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