API Documentation
Generate sprites, animations, isometric tiles, game music, and playable games programmatically. Full REST API with webhooks and native MCP support for AI coding agents.
Authentication
All API requests must include your API key in the Authorization header. Keys follow the format spx_live_{random} and are scoped to your account.
Authorization: Bearer spx_live_7xK9mP2nQvRtL4jWaBcD8fY3httpTo generate an API key, go to Settings › API in your Sprixen dashboard. You can create multiple keys and revoke them individually.
Quick Start
Generating a sprite takes two steps: create a generation job, then poll until it completes. Most generations finish in 5–15 seconds.
Step 1 - Create a generation
curl -X POST https://api.sprixen.com/v1/generations \
-H "Authorization: Bearer spx_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a warrior knight in pixel art, 32x32, dark fantasy style",
"type": "character"
}'curlStep 2 - Poll for completion
curl https://api.sprixen.com/v1/generations/gen_abc123 \
-H "Authorization: Bearer spx_live_YOUR_KEY"curlResponse when complete
{
"id": "gen_abc123",
"status": "completed",
"prompt": "a warrior knight in pixel art, 32x32, dark fantasy style",
"resultUrls": [
"https://api.sprixen.com/public/uploads/gen_abc123_v1.png",
"https://api.sprixen.com/public/uploads/gen_abc123_v2.png",
"https://api.sprixen.com/public/uploads/gen_abc123_v3.png"
],
"completedAt": "2026-01-15T12:00:15.000Z"
}jsonwebhookUrl parameter to receive a POST callback when generation completes - no polling required. See the Webhooks section.Endpoints
Generations (Sprites)
The core generation pipeline. Each variant costs 2 credits (default 1 variant, max 3). Supports sprites, character sheets, items, environments, packs, and chained animations.
/v1/generationsCreate a new sprite generation job. Returns immediately with a job ID - use GET /v1/generations/:id to poll, or pass webhookUrl for a callback.
Request Body
{
"prompt": "string (required, 3-500 chars)",
"projectId": "string (optional, inherits style/resolution; required for chainAnimation)",
"type": "sprite | variation (default: sprite)",
"referenceImageUrl": "string (optional, guides style)",
"variantCount": 1, // 1-3, locked to 1 when chaining
"resolution": "256x256", // optional override
"pixelPerfect": "auto | on | off", // resize kernel - see below
"noBase": false, // strips ground/pedestal
"skipBgRemoval": false, // skip RMBG-2.0 (use for full scenes)
"packItems": ["torch", "vine", "moss"], // up to 8 items in one sheet
"chainAnimation": { // auto-chain animation after sprite
"type": "walk", "frameCount": 8, "fps": 12
},
"chainAnimations": [ // multiple chained animations
{ "type": "idle" }, { "type": "walk" }
],
"webhookUrl": "string (optional)"
}Response
{
"id": "gen_abc123",
"status": "pending",
"prompt": "...",
"createdAt": "2026-01-15T12:00:00.000Z"
}auto (recommended) lets the system pick the right resize kernel from artStyle + resolution. on forces nearest-neighbor - crispy retro pixel art (NES, Gungeon-style). off forces Lanczos - smooth output for cartoon, anime, or higher-res art. Nearest-neighbor is not universally better; it destroys fine detail at higher resolutions./v1/generations/:idGet generation status and results. Poll this endpoint until status is 'completed' or 'failed'. Recommended polling interval: 2 seconds.
Response
{
"id": "gen_abc123",
"status": "completed",
"resultUrls": ["url1", "url2", "url3"],
"error": null,
"completedAt": "2026-01-15T12:00:15.000Z"
}/v1/generationsList all generations for your account, paginated. Supports ?page=1&limit=20 query parameters.
Response
{
"data": [{ "id": "...", "status": "..." }],
"total": 142,
"page": 1,
"limit": 20
}/v1/generations/selectPromote one variation from a completed generation to a sprite in your project. Saves the asset to the project library.
Request Body
{
"generationId": "gen_abc123",
"variationIndex": 0
}Response
{
"spriteId": "spr_xyz789",
"projectId": "prj_...",
"imageUrl": "https://..."
}Animations (Sprite Sheets)
Generate animated sprite sheets from existing sprites. Supports idle, walk, run, attack, jump, death, hurt, and custom animation types. Each animation costs 4 credits (premium quality: 8).
/v1/sprites/:spriteId/animationsGenerate an animated sprite sheet from a sprite. Returns a job ID - poll GET /v1/animations/:id for results.
Request Body
{
"type": "walk|run|idle|attack|jump|death|hurt|custom",
"frameCount": 8, // 2-12, defaults per type
"fps": 12, // 4-60
"customDescription": "string (optional, motion guidance, max 500 chars)",
// Body archetype - drives motion physics for non-humanoid characters
"archetype": "humanoid_biped | quadruped | winged | amorphous | serpentine",
// Weapon props - enforce frame-to-frame consistency
"weaponHand": "left | right | both", // omit if no weapon
"weaponType": "sword | axe | bow | staff | ...",
"hasShield": false,
// Direction - cardinal or isometric
"direction": "right|left|up|down|up-right|up-left|down-right|down-left",
"normalizeSize": false, // match base sprite size (multi-direction sets)
"locomotionType": "auto|biped|quadruped" // DEPRECATED - use archetype
}Response
{
"id": "anim_...",
"status": "pending",
"type": "walk",
"frameCount": 8,
"createdAt": "2026-01-15T12:00:00.000Z"
}humanoid_biped (two-legged upright), quadruped (four-legged - wolf, horse), winged (flying - dragon, bird), amorphous (slime, blob), serpentine (snake-like). If omitted, the backend uses cached sprite metadata or runs a vision-based classifier. The legacy locomotionType field still works but only maps to humanoid_biped/quadruped - prefer archetype for new integrations./v1/animations/:idGet animation status and sprite sheet URL when complete.
Response
{
"id": "anim_...",
"status": "completed",
"type": "walk",
"spriteSheetUrl": "https://api.sprixen.com/public/uploads/anim_....png",
"frameCount": 8,
"fps": 12,
"completedAt": "2026-01-15T12:00:20.000Z"
}/v1/sprites/:spriteId/animationsList all animations for a specific sprite.
/v1/animations/:id/gifDownload the animation as an animated GIF for quick preview.
/v1/animations/:id/processCreate a non-destructive processed copy of an animation. Useful when frames have too much transparent padding, drift, or need stronger canvas fit without losing the original.
Request Body
{
"mode": "stabilize|tight|aggressive"
}Response
{
"id": "anim_processed_...",
"type": "walk",
"spriteSheetUrl": "https://api.sprixen.com/public/uploads/processed_....png",
"frameCount": 8,
"fps": 12
}/v1/animations/:idDelete an animation.
Character Package
Package a sprite and every completed animation into a single, engine-ready ZIP: normalized sprite sheets (uniform cell size, bottom-center pivot), a packed atlas.png with atlas.json (TexturePacker JSON Hash) and atlas-aseprite.json, a manifest.json, a README, and project files native to the chosen engine. No credits are charged - this repackages animations you already generated.
/v1/sprites/:id/package?engine=godot&animations=idle,walk,attackDownload the character package as a ZIP. engine defaults to generic. animations is optional (comma-separated types) and defaults to every completed animation, latest version per type+direction.
Response
Content-Type: application/zip Content-Disposition: attachment; filename="<slug>-<engine>.zip"
/v1/sprites/:id/package/manifest?engine=godotGet the package manifest (sprite metadata, cell size, pivot, animation list) without building the ZIP - cheap, for agents and the UI.
Response
{
"sprite": { "id": "...", "name": "...", "width": 128, "height": 128, "artStyle": "pixel_art" },
"cell": { "width": 128, "height": 128 },
"pivot": { "x": 0.5, "y": 1.0 },
"animations": [
{ "name": "walk", "direction": null, "frames": 8, "fps": 12, "file": "sheets/walk.png", "loop": true }
],
"engine": "godot",
"warnings": []
}| Engine | What you get |
|---|---|
godot | character.tres (SpriteFrames over atlas.png) + character.tscn (CharacterBody2D + AnimatedSprite2D), ready to instance |
phaser | example.js registering every animation with this.anims.create from the atlas |
unity | atlas.png.meta (sliced TextureImporter) + README-unity.md for Animation Clip setup |
gamemaker | spr_<slug>_<anim>_strip<N>.png per animation, GameMaker's strip naming convention |
rpgmaker-mz | $<slug>.png (144x192 walking sheet, 4 directions) with automatic direction mirroring/fallback |
generic | Just the normalized sheets, atlas and manifests - bring your own importer |
export_character_package with spriteId, optional engine and animations - it returns the manifest plus an authenticated downloadUrl to fetch the ZIP with your API key.Sprixen for Godot (editor addon)
A free, open-source (MIT) Godot 4 plugin that adds a "Sprixen" dock to the editor: paste your API key, browse your projects and sprites, and click "Import to Project" to drop a ready-to-use character.tscn straight into res://sprixen/<sprite-name>/.
- Download the ZIP below and copy
addons/sprixen/into your project'saddons/folder. - Project > Project Settings > Plugins > enable "Sprixen".
- Open the new Sprixen dock, paste your API key, and import a sprite.
Projects
Projects group related sprites and enforce a shared art style (Style Lock). All generations within a project inherit its palette, resolution, and art direction.
/v1/projectsList all projects for the authenticated user.
Response
[{
"id": "prj_...",
"name": "Dungeon Crawler",
"artStyle": "pixel",
"resolution": "32x32",
"spriteCount": 14
}]/v1/projects/:idGet a project with its full sprite library attached.
Response
{
"id": "prj_...",
"name": "Dungeon Crawler",
"artStyle": "pixel",
"resolution": "32x32",
"sprites": [{ "id": "spr_...", "imageUrl": "..." }]
}/v1/projectsCreate a new project with optional Style Lock configuration.
Request Body
{
"name": "string (required)",
"description": "string",
"artStyle": "pixel|vector|painterly",
"resolution": "16x16|32x32|64x64",
"viewAngle": "side|top-down|isometric"
}Response
{
"id": "prj_...",
"name": "My Game",
"artStyle": "pixel",
"resolution": "32x32",
"createdAt": "2026-01-15T12:00:00.000Z"
}Tiles
Generate custom isometric tiles for the Map Builder. Sprixen uses a two-step pipeline: flat texture → isometric projection, producing 130×230px sprites. Each tile costs 1 credit.
/v1/tile-packs/generateGenerate a custom isometric tile from a text description. The tile is added to your custom tile library.
Request Body
{
"prompt": "mossy stone floor tile",
"tileLabel": "Mossy Stone",
"collision": false,
"projectionType": "floor|wall|prop",
"webhookUrl": "string (optional)"
}Response
{
"id": "tile_...",
"status": "pending",
"label": "Mossy Stone",
"createdAt": "2026-01-15T12:00:00.000Z"
}/v1/tile-packsList all available tile packs (built-in and custom). Built-in packs are free; custom tiles are scoped to your account.
Response
[{
"id": "pack_...",
"name": "Fantasy Terrain",
"isBuiltIn": true,
"tiles": [{ "id": "...", "label": "Grass", "imageUrl": "..." }]
}]World Builder (Maps)
Create and manage tile-based maps for 2D worlds (isometric, top-down, side-view) and 3D world layouts. Export to Godot, Unity, GameMaker, or Tiled formats.
/v1/mapsCreate a new map with configurable grid size and projection type.
Request Body
{
"name": "Forest Level",
"projectionType": "isometric|top_down|side_view|world",
"gridWidth": 16,
"gridHeight": 16
}Response
{
"id": "map_...",
"name": "Forest Level",
"projectionType": "isometric",
"createdAt": "2026-01-15T12:00:00.000Z"
}/v1/mapsList all maps for the authenticated user.
/v1/maps/:idGet a map with full layer data (terrain, decorations, entities).
/v1/maps/:idUpdate map layers, name, or tile pack assignments.
/v1/maps/:id/ai-editEdit a map using natural language commands. Returns a job ID for polling.
Request Body
{
"prompt": "Add a river running through the center"
}/v1/maps/:id/export/:formatExport map to engine-ready format. Supports json, tmx (Tiled), godot, unity, and gamemaker.
/v1/maps/:idDelete a map.
Music Generation
Generate game soundtracks with AI. Supports 10 genre presets, custom prompts, and configurable BPM/key/duration. Output format is FLAC. Each track costs 3 credits.
/v1/musicGenerate a music track from a preset or custom prompt. Supports optional reference audio upload.
Request Body
{
"prompt": "epic orchestral battle theme with brass",
"presetSlug": "epic_orchestral",
"bpm": 140,
"key": "D minor",
"duration": 30
}Response
{
"id": "mus_...",
"status": "pending",
"prompt": "epic orchestral battle theme with brass",
"duration": 30,
"createdAt": "2026-01-15T12:00:00.000Z"
}/v1/music/:idGet music generation status and audio URL when complete.
Response
{
"id": "mus_...",
"status": "completed",
"audioUrl": "https://api.sprixen.com/public/uploads/mus_....flac",
"duration": 30,
"completedAt": "2026-01-15T12:01:00.000Z"
}/v1/musicList all music tracks for the authenticated user.
/v1/music/:id/downloadGet a direct download URL for the audio file.
/v1/music/:idDelete a music track.
AI Game Builder
Build playable Phaser.js games with AI assistance. Create projects from templates, manage code versions, and publish games with shareable URLs.
/v1/game-creator/projectsCreate a new game project. If templateType is provided, the project is initialized with starter Phaser.js code and template assets.
Request Body
{
"title": "Dungeon Runner",
"templateType": "platformer | metroidvania | topdown | isometric | tower-defense | dungeon-crawler | card-battle | rpg-adventure | planet-defense | infinite-jumper | horde-survivors | micro-factory | isometric-strategy | flappy-clone | isometric-rpg | enter-the-gungeon | platform-brawler"
}Response
{
"id": "game_...",
"title": "Dungeon Runner",
"templateType": "enter-the-gungeon",
"status": "draft",
"createdAt": "2026-01-15T12:00:00.000Z"
}/v1/game-creator/projectsList all game projects for the authenticated user.
/v1/game-creator/projects/:idGet a game project with its current code and metadata.
/v1/game-creator/projects/:id/versionsList all code versions for a game project. Useful for rollback.
/v1/game-creator/projects/:id/versions/:versionId/restoreRestore a previous code version as the active version.
/v1/game-creator/projects/:id/publishPublish the game and generate a public shareable URL.
Response
{
"slug": "dungeon-runner-x7k9",
"url": "https://api.sprixen.com/v1/game-creator/play/dungeon-runner-x7k9"
}/v1/game-creator/play/:slugPlay a published game. Returns raw HTML - no authentication required. Embed in an iframe or open directly.
/v1/game-creator/templatesList available game templates (platformer, metroidvania, top-down, isometric, and more). Public endpoint.
/v1/game-creator/templates/:typeGet a template with its full starter code. Public endpoint.
Response
{
"type": "platformer",
"name": "2D Platformer",
"description": "Side-scrolling platformer with physics",
"code": "// Full Phaser.js starter code..."
}Sprixen Live
Hosted backend services for published AI Game Builder games: guest/account identity, cloud saves, leaderboards, achievements, inventory, analytics, lobbies and multiplayer runtime connection. Creator-side endpoints require your API key; public runtime endpoints are called by the published game SDK.
Live tab in AI Game Builder for runtime health, players, rooms, cloud data, leaderboards, achievements, inventory and analytics./v1/game-creator/projects/:id/live/configEnable or update Sprixen Live services, login mode, public lobby policy and hard limits for a game project.
Request Body
{
"enabled": true,
"loginMode": "guest_allowed",
"features": ["cloudSave", "leaderboards", "achievements", "inventory", "analytics", "multiplayer"],
"maxPlayersPerRoom": 4,
"maxActiveRooms": 10,
"maxConcurrentPlayers": 50,
"publicLobbiesEnabled": true
}/v1/game-creator/projects/:id/live/overviewCreator dashboard summary: config, totals, runtime health, recent matches and runtime errors.
/v1/game-creator/projects/:id/live/players?search=&limit=List game players with guest/account identity, last seen time and counts for saves, scores, unlocks, inventory and events.
/v1/game-creator/projects/:id/live/players/:playerIdInspect one player's cloud saves, inventory, recent scores, achievement unlocks and analytics events.
/v1/game-creator/projects/:id/live/saves?limit=List recent cloud saves with slot, checkpoint, version, byte size and player identity.
/v1/game-creator/projects/:id/live/lobbies?limit=List current and recent lobby records for a game project.
/v1/game-creator/projects/:id/live/matches?limit=List multiplayer match lifecycle records and final result payloads.
/v1/game-creator/projects/:id/live/leaderboardsList configured leaderboards, score counts and top scores.
/v1/game-creator/projects/:id/live/leaderboardsCreate or update a leaderboard used by the game SDK submitScore call.
Request Body
{
"key": "wins",
"name": "Wins",
"sort": "desc",
"resetPolicy": "never"
}/v1/game-creator/projects/:id/live/achievementsList achievements with unlock counts and unlock rate.
/v1/game-creator/projects/:id/live/achievementsCreate or update an achievement used by the game SDK unlockAchievement call.
Request Body
{
"key": "first_win",
"name": "First Win",
"description": "Win your first match",
"secret": false
}/v1/game-creator/projects/:id/live/inventory-itemsList configured inventory/progression items with holder counts and total quantity.
/v1/game-creator/projects/:id/live/inventory-itemsCreate or update an inventory/progression item used by the game SDK inventory APIs.
Request Body
{
"key": "arena_ticket",
"name": "Arena Ticket",
"metadata": { "rarity": "common" }
}/v1/game-creator/projects/:id/live/analytics?limit=Creator analytics dashboard: total events, 24h/7d activity, unique players, top events and recent event stream.
/v1/live/games/:slug/bootstrapPublic game SDK bootstrap. Creates/reuses a GamePlayer, returns player identity, live token, config, save and runtime URL.
Request Body
{
"guestId": "guest_saved_in_browser",
"displayName": "Player 1"
}/v1/live/games/:slug/saves/:slotPublic game SDK cloud save read. Requires the Sprixen Live token returned by bootstrap.
/v1/live/games/:slug/saves/:slotPublic game SDK cloud save write. Save payloads are capped at 128 KB.
Request Body
{
"checkpoint": "level-2",
"data": { "hp": 3, "coins": 120 }
}/v1/live/games/:slug/leaderboards/:keyPublic leaderboard read for players.
/v1/live/games/:slug/leaderboards/:key/scoreSubmit a player score through the game SDK.
Request Body
{
"score": 1,
"metadata": { "mode": "casual" }
}/v1/live/games/:slug/achievements/:key/unlockUnlock an achievement for the current live player.
/v1/live/games/:slug/inventoryList inventory/progression items for the current live player.
/v1/live/games/:slug/inventory/:itemKeyGrant or consume a player inventory item.
Request Body
{
"quantity": 1,
"metadata": { "source": "match_reward" }
}/v1/live/games/:slug/analyticsTrack a game event for the current live player.
Request Body
{
"eventName": "match_started",
"payload": { "mode": "online" }
}/v1/live/games/:slug/lobbiesList public lobbies for a published game.
/v1/live/games/:slug/lobbiesCreate a public or invite lobby for a published game.
Request Body
{
"name": "Casual Room",
"maxPlayers": 2,
"isPublic": true
}Mod Builder (FiveM & Roblox)
Generate production-ready mods and resources for FiveM (GTA V multiplayer) and Roblox. Templates seed the project with framework-specific starter code (qbcore / esx / standalone / luau). Export downloads a ready-to-deploy ZIP - Roblox exports are Rojo-compatible; FiveM exports drop into resources/[local]/.
/v1/mod-builder/projectsCreate a new mod project. If templateType is provided, the project is initialized with framework-specific starter code.
Request Body
{
"title": "Police MDT",
"platform": "fivem | roblox", // required
"framework": "qbcore | esx | standalone | luau",
"templateType": "job-system | inventory-hud | phone-ui | vehicle-shop | obby | tycoon | combat-system | pet-simulator"
}Response
{
"id": "mod_...",
"title": "Police MDT",
"platform": "fivem",
"framework": "qbcore",
"templateType": "job-system",
"createdAt": "2026-01-15T12:00:00.000Z"
}/v1/mod-builder/projectsList the user's mod projects. Optional ?platform=fivem|roblox filter.
/v1/mod-builder/projects/:idGet a single mod project with its current files.
/v1/mod-builder/projects/:idUpdate mod project metadata (title, description).
/v1/mod-builder/projects/:idSoft-delete a mod project.
/v1/mod-builder/projects/:id/versionsList code versions for the project. Useful for rollback.
/v1/mod-builder/projects/:id/versions/:versionId/restoreRestore a previous code version as the active one.
/v1/mod-builder/projects/:id/graphGet the mod's dependency graph (events, exports, requires).
/v1/mod-builder/projects/:id/gui-previewRoblox only: preview the GUI layout as JSON tree.
/v1/mod-builder/projects/:id/exportDownload a deploy-ready ZIP. Returns application/zip with Content-Disposition: attachment. Max 10MB uncompressed.
Roblox Creator Pack
Generate a whole-game asset kit in one consistent style: a game icon, 2 thumbnail variants, a UI kit (3-state button, panel, 8 HUD icons) and 4 genre-matched VFX flipbooks. The icon generates first and becomes the style reference for every other item. Classic clothing is not included yet (marked coming_soonin the response, 0 credits). Costs 17 credits total; each item can be regenerated on its own for that item's cost alone.
/v1/roblox-packsCreate a pack. Idempotent by requestId: retry the same request without a duplicate charge.
Request Body
{
"requestId": "uuid",
"name": "Skyward Obby",
"description": "A fast-paced obby through floating sky islands.",
"genre": "obby|simulator|tycoon|rpg|horror|roleplay|shooter|other",
"projectId": "string (optional, locks artStyle + palette)",
"referenceSpriteId": "string (optional, locks style before the icon exists)"
}Response
{
"id": "...",
"status": "pending",
"items": {
"icon": { "status": "pending", "credits": 2 },
"thumbnail": { "status": "pending", "credits": 3 },
"uiKit": { "status": "pending", "credits": 4 },
"clothing": { "status": "coming_soon", "credits": 0 },
"vfx": { "status": "pending", "credits": 8 }
},
"creditsUsed": 17
}/v1/roblox-packs/:idPoll pack status and item assets. Each completed item includes its asset URL(s) and, for icon/thumbnail, a paletteScore (distance to the project palette, and whether it passed).
/v1/roblox-packsList your packs, newest first.
/v1/roblox-packs/:id/items/:item/regenerateRegenerate a single item (icon, thumbnail, uiKit or vfx) for that item's credit cost alone. The pack must not be mid-generation.
/v1/roblox-packs/:id/downloadDownload the pack ZIP (authenticated, owner only). Returns application/zip. Includes a manifest.json (SliceCenter rects for the UI kit, palette scores) and a README with upload and ParticleEmitter setup steps.
ScaleType = Slice on the Roblox ImageLabel/ImageButton and use the SliceCenter rect from manifest.json so the shape stretches without warping its corners.create_roblox_pack, then poll get_roblox_pack or list with list_roblox_packs.Billing
/v1/billing/statusGet current credit balance, subscription status, and plan details.
Response
{
"credits": 147,
"subscription": {
"status": "active",
"plan": "pro",
"currentPeriodEnd": "2026-02-15T00:00:00.000Z"
}
}Webhooks
Pass a webhookUrl in any generation request to receive a POST callback when the job completes. This avoids polling and is the recommended approach for production integrations.
Event types
generation.completedSprite generation finished successfullygeneration.failedSprite generation failed with an erroranimation.completedSprite animation finishedanimation.failedSprite animation failedtile.completedIsometric tile generation finishedtile.failedIsometric tile generation failedmusic.completedMusic track generation finishedmusic.failedMusic track generation failedWebhook payload
{
"event": "generation.completed",
"timestamp": "2026-01-15T12:00:15.000Z",
"data": {
"id": "gen_abc123",
"status": "completed",
"resultUrls": [
"https://api.sprixen.com/public/uploads/gen_abc123_v1.png",
"https://api.sprixen.com/public/uploads/gen_abc123_v2.png",
"https://api.sprixen.com/public/uploads/gen_abc123_v3.png"
],
"completedAt": "2026-01-15T12:00:15.000Z"
}
}json2xx status code within 10 seconds to be considered successful.MCP (Model Context Protocol)
Sprixen implements a native Model Context Protocol (MCP) server with a feature-gated tool catalogue over Streamable HTTP. AI agents - Claude Code, Cursor, Codex, Windsurf, VS Code, Claude Desktop, Gemini CLI - can generate game assets, query projects, and check credits directly from your prompts, without any manual API calls.
Full install instructions per client, the tools reference, the Claude Code skill, and a ready-to-clone Phaser starter live on the dedicated MCP page:
Read the Sprixen MCP setup guide →Rate Limits
API key requests are rate-limited to protect service quality. Rate limit information is returned in every response header.
| Limit | Value |
|---|---|
| Requests per minute | 60 |
| Concurrent generations | 5 |
Monitor rate limits with these response headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 47
X-RateLimit-Reset: 1737000060http429 Too Many Requests response. Wait until X-RateLimit-Reset (Unix timestamp) before retrying.Error Handling
All errors follow a consistent JSON structure. Always check the statusCode and message fields. Most errors also carry a stable code and a hint object telling you (or your agent) exactly what to do next, an action, optionally a url to open, and details with machine-readable context. Switch on code, never on the message text, which can change wording over time.
{
"statusCode": 402,
"message": "Insufficient credits: this operation costs 2 and you have 0.",
"error": "Payment Required",
"code": "INSUFFICIENT_CREDITS",
"hint": {
"action": "upgrade",
"url": "https://sprixen.com/settings/billing",
"details": { "required": 2, "available": 0 }
},
"timestamp": "2026-09-06T12:00:00.000Z",
"path": "/v1/generations"
}json| Status | Meaning |
|---|---|
| 400 | Bad Request - missing or invalid parameters |
| 401 | Unauthorized - missing or invalid API key |
| 402 | Payment Required - you have no credits remaining |
| 404 | Not Found - the resource does not exist |
| 429 | Too Many Requests - rate limit exceeded |
| 500 | Internal Server Error - something went wrong on our end |
| 503 | Service Unavailable - a generation backend is temporarily down |
Stable code values an agent can switch on, with the hint.action that goes with each:
| code | hint.action | Meaning |
|---|---|---|
| INSUFFICIENT_CREDITS | upgrade | Not enough credits for this operation. hint.details has required/available. |
| UNAUTHENTICATED | authenticate | No API key or session was sent. |
| API_KEY_INVALID | create_key | The API key does not exist. |
| API_KEY_REVOKED | create_key | The API key was revoked. Issue a new one. |
| API_KEY_EXPIRED | create_key | The API key expired. Issue a new one. |
| RATE_LIMITED | retry_after | Too many requests. hint.details.retryAfterSeconds tells you how long to wait. |
| VALIDATION_FAILED | fix_request | Request body failed validation. hint.details.fields lists the offending properties. |
| NOT_FOUND | - | The resource does not exist or does not belong to you. |
| ACTIVE_GENERATION_LIMIT | wait_and_poll | The account reached the active generation limit. Wait for an existing job and poll its ID. |
| FEATURE_DISABLED | use_available_features | The requested expensive feature is temporarily disabled in this production environment. |
| RESOURCE_NOT_FOUND | list_resources_then_retry | The resource does not exist or is not available to this account. |
| VM_UNAVAILABLE | retry_later | A GPU backend (e.g. background removal) is temporarily unreachable. hint.details.retryAfterSeconds suggests a wait. |
SDKs & Libraries
Official SDKs - Coming Soon
TypeScript/JavaScript and Python SDKs are in development. Until then, use the REST API directly - it's straightforward and all responses are plain JSON.
In the meantime, explore the interactive Swagger UI available when running the backend locally:
# Run backend locally to access Swagger UI
cd backend && npm run start:dev
# → http://localhost:3001/api-docsbashQuestions or issues? contact@accelar.io · Get your API key