Overview
Images, edits, voice, music, video, playable games, text assist and atlas packing — the same models as Janus Studio.
A Streamable HTTP MCP server. Your agent generates assets and games, and gets back URLs it can use immediately.
Everything you make by API, MCP or in the browser lands in the same library, spending the same credits.
- Base URL
- https://janusengine.com/api/v1
- MCP endpoint
- https://janusengine.com/api/mcp
- Format
- JSON in, JSON out (UTF-8)
- Auth
- Authorization: Bearer jns_live_…
- CORS
- Open — call it from any origin
- Billing
- Credits · 100 credits = $1
- 1Create a key
Open Account → API keys. The key is shown once — store it as
JANUS_API_KEY. - 2Call a tool
POST to
/api/v1/tools/image.generate. The response carries the asset URL and your new balance. - 3Use the result
Asset URLs are public and CORS-open — load them in your game, or pass the
asset_idto another tool.
curl https://janusengine.com/api/v1/tools/image.generate \
-H "Authorization: Bearer jns_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "a brave knight puppy with a tiny shield, game sprite", "model": "nb2-lite"}'Send your key as a bearer token on every request: Authorization: Bearer jns_live_…. Keys look like jns_live_ followed by 32 letters and digits. A key acts as your account — same credits, same library, same rate limit as Janus Studio in the browser.
We store only a SHA-256 hash of each key, so a key is shown exactly once, when you create it. Lost one? Revoke it and make another — revocation takes effect immediately. Keep keys server-side and out of source control; never ship them in a browser bundle.
Keys made before you sign up work right away and move with you to your account when you create it. Sign up to keep credits across devices and get bonus credits.
curl https://janusengine.com/api/v1/me -H "Authorization: Bearer jns_live_YOUR_KEY"MCP server
Janus speaks MCP over Streamable HTTP at https://janusengine.com/api/mcp, authenticated with the same API key. Add it once, then ask your agent for what you need — “make a pixel-art coin sprite and a jump sound, then build a platformer that uses them” — and it calls the tools, gets URLs back, and wires them into your project.
Run in your terminal. Add --scope user to make it available in every project.
claude mcp add --transport http janus https://janusengine.com/api/mcp \
--header "Authorization: Bearer jns_live_YOUR_KEY"Tools
generate_image3–16 crUse this to create game art from a text prompt — characters, enemies, props, item icons, tiles, backgrounds, key art. For sprites, set style to "Game sprite on a flat #00FF00 green screen" so the background can be keyed out. Pass reference_ids (asset ids) to keep a character consistent. Returns the image URL and asset_id.
Parametersedit_image3–16 crUse this to change an existing image by asset_id with a plain-English instruction (recolor, add/remove details, new pose, new background). Saves the result as a new asset. To edit a local file, call upload_asset first.
Parametersgenerate_speech1–2 crUse this to voice game dialogue, barks, tutorials or narration. Choose one of 17 voices and an optional performance direction ("whispering", "like a game announcer"). Returns a WAV URL.
Parametersgenerate_music10–25 crUse this to compose original game music — menu themes, level loops, boss tracks. Describe genre, tempo, instruments and mood; include "loopable" for background music. Returns an audio URL.
Parametersstart_video40–150 crUse this to render a short video with native audio (trailer shot, cutscene, animated key art) from a prompt, or animate a still by passing image_id. Returns a job_id right away; renders take 1–3 minutes — call get_job with the job_id every ~10 seconds until status is succeeded or failed. Credits are refunded automatically if the render fails.
Parametersget_jobFreeUse this to check a video render started with start_video. Returns status (queued, rendering, succeeded, failed) and, when succeeded, the video URL. Free.
build_game5–20 crUse this to generate a complete, playable single-file HTML5 browser game from a description (Phaser for 2D, three.js for 3D, or plain canvas). To change a game you built earlier, pass its asset id as base_game_id and describe the change. Optionally pass your own sprite/sound URLs as assets. Returns the playable game URL, its asset_id and a short summary (not the source — fetch the URL if you need the HTML).
Parameterspack_atlasFreeUse this to pack animation frames (asset ids, in order) into one PNG sprite sheet with edge extrusion, plus a Bevy TextureAtlasLayout JSON (at the sheet URL + ?variant=atlas).
Parametersupload_assetFreeUse this to add a local file (base64) to your Janus library so other tools can use it — e.g. upload a sprite, then edit_image it or pack_atlas it. Images, audio, video, GLB, JSON. Max 40 MB. Free.
list_assetsFreeUse this to find things you already made — images, audio, video, games — newest first, optionally filtered by kind. Returns asset ids and URLs. Free.
get_creditsFreeUse this to check the account's credit balance before an expensive run, and see what each tool costs. 1 credit = $0.01. Free.
asset_id, a resource_link content block pointing at the file, and structuredContent with the same fields as JSON. build_game returns the playable URL and a summary — not the full source — to keep your agent’s context small; fetch the URL when you want the HTML. The server is stateless: no session to manage, every request stands alone.curl https://janusengine.com/api/mcp \
-H "Authorization: Bearer $JANUS_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"generate_image","arguments":{"prompt":"a sleepy kitten on a bookshelf, game sprite","model":"nb2-lite"}}}'/api/v1/catalogPublicA machine-readable list of every tool: id, description written for coding agents, JSON input schema, default model and price table, plus links to the matching Janus Studio tools. No key needed — point an agent at it and it can discover everything on its own.
{
"api": "janus-studio",
"version": 1,
"credits_per_dollar": 100,
"tools": [
{
"id": "image.generate",
"endpoint": "POST /api/v1/tools/image.generate",
"mcp_tool": "generate_image",
"input_schema": {
"type": "object",
"properties": {
"prompt": {
"type": "string"
},
"model": {
"enum": [
"nb2-lite",
"nb2",
"nb-pro"
]
}
},
"required": [
"prompt"
]
},
"default_model": "nb2",
"pricing": {
"unit": "credits per run",
"default": 8,
"models": {
"nb2-lite": 3,
"nb2": 8,
"nb-pro": 16
}
}
},
"…"
]
}/api/v1/meAPI keyYour credit balance and the key in use. Check it before an expensive run.
{
"credits": 1250,
"credits_usd": 12.5,
"account": {
"type": "user",
"name": "Ada",
"email": "ada@example.com"
},
"key": {
"id": "key_3f9a1c0d7e2b4a55",
"name": "Claude Code",
"prefix": "jns_live_iD5Hup"
}
}/api/v1/tools/{tool_id}API keyRun one AI tool. The body is the tool’s input (validated against its schema; a bad body returns 400 with an issues list). On success you get the asset — with an absolute url — plus cost (credits charged) and credits (your balance after). Failed generations are never charged.
Generate image
image.generateMCP: generate_imageUse this to create a new image (character, enemy, prop, item icon, tile, background, key art) from a text prompt. For sprites, add the style "Game sprite on a flat #00FF00 green screen" and chroma-key it. Pass reference_ids to keep a character consistent across images. Every image carries SynthID provenance and IPTC AI-marking.
/api/v1/tools/image.generateAPI keynb2-lite · Nano Banana 2 Lite · 3 cr ($0.03)nb2 · Nano Banana 2 · 8 cr ($0.08)defaultnb-pro · Nano Banana Pro · 16 cr ($0.16)promptrequiredstringWhat to draw. Be specific: subject, pose, framing, lighting, palette, background.(1–4,000 chars)
modeloptional"nb2-lite" | "nb2" | "nb-pro" · default "nb2"nb2-lite (3 cr, fastest), nb2 (8 cr, best value), nb-pro (16 cr, highest fidelity and text rendering).
styleoptionalstringOptional style directive appended to the prompt, e.g. "pixel art, 32x32, limited palette" or "Game sprite on a flat #00FF00 green screen" (then chroma-key it).(≤ 400 chars)
aspect_ratiooptional"1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9"Output aspect ratio. Omit for the model default.
image_sizeoptional"1K" | "2K" | "4K"Output resolution tier (nb2 / nb-pro).
reference_idsoptionalstring[]Up to 4 asset ids from your library to use as visual references (character consistency, style matching).(≤ 4 items)
Returns: An image asset: asset_id, url (PNG), width, height, model_label, credits (your new balance), cost. In the Studio: Image Forge, Sprite Forge, Tile Forge, Material Forge, Background Remover.
curl https://janusengine.com/api/v1/tools/image.generate \
-H "Authorization: Bearer $JANUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"a brave knight puppy with a tiny shield, side view, game sprite","model":"nb2-lite","style":"Game sprite on a flat #00FF00 green screen"}'{
"asset_id": "9712608cb5c04801",
"mime": "image/png",
"url": "https://janusengine.com/api/assets/9712608cb5c04801",
"width": 1024,
"height": 1024,
"model_label": "Nano Banana 2 Lite",
"prompt": "a brave knight puppy with a tiny shield, side view, game sprite",
"content_credentials": "SynthID",
"iptc_digital_source_type": "http://cv.iptc.org/newscodes/digitalsourcetype/trainedAlgorithmicMedia",
"latency_ms": 2744,
"cost": 3,
"credits": 94
}Edit image
image.editMCP: edit_imageUse this to modify an image you already have (by asset id): recolor, re-pose, add or remove details, change the background, make a variant. The original is untouched; the edit is saved as a new asset.
/api/v1/tools/image.editAPI keynb2-lite · Nano Banana 2 Lite · 3 cr ($0.03)nb2 · Nano Banana 2 · 8 cr ($0.08)defaultnb-pro · Nano Banana Pro · 16 cr ($0.16)asset_idrequiredstringThe image to edit (from your library, a previous result, or an upload).
instructionrequiredstringThe change to make, in plain English, e.g. "make the armor gold and add a red cape".(1–2,000 chars)
modeloptional"nb2-lite" | "nb2" | "nb-pro" · default "nb2"nb2-lite (3 cr, fastest), nb2 (8 cr, best value), nb-pro (16 cr, highest fidelity and text rendering).
Returns: A new image asset (parent_id = the source). In the Studio: Magic Edit, Background Remover.
curl https://janusengine.com/api/v1/tools/image.edit \
-H "Authorization: Bearer $JANUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"asset_id":"404aac0f25644665","instruction":"make the shield gold and add a red cape","model":"nb2-lite"}'{
"asset_id": "c81e3a0f5d2b4e17",
"parent_id": "404aac0f25644665",
"mime": "image/png",
"url": "https://janusengine.com/api/assets/c81e3a0f5d2b4e17",
"width": 1024,
"height": 1024,
"model_label": "Nano Banana 2 Lite",
"cost": 3,
"credits": 91
}Generate speech
speechMCP: generate_speechUse this to voice dialogue, barks, tutorials or narration. Pick a voice and optionally a direction ("whispering", "like a game announcer"). Returns a WAV file.
/api/v1/tools/speechAPI keystandard · Standard · 2 cr ($0.02)defaultlite · Lite · 1 cr ($0.01)textrequiredstringThe line(s) to speak.(1–5,000 chars)
voiceoptional"Puck" | "Kore" | "Charon" | … (17) · default "Puck"One of 17 voices. Puck (upbeat), Kore (firm), Charon (informative), Fenrir (excitable), Aoede (breezy), Leda (youthful), Zephyr (bright)…
directionoptionalstringPerformance direction, e.g. "whispering", "like a game announcer", "cheerful".(≤ 300 chars)
modeloptional"standard" | "lite" · default "standard"standard (2 cr) or lite (1 cr).
Returns: An audio asset (audio/wav). In the Studio: Voice Studio.
curl https://janusengine.com/api/v1/tools/speech \
-H "Authorization: Bearer $JANUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Level complete! Nap time, everyone.","voice":"Puck","direction":"cheerful game announcer","model":"lite"}'{
"asset_id": "7d2f9a41c0be4a55",
"mime": "audio/wav",
"url": "https://janusengine.com/api/assets/7d2f9a41c0be4a55",
"voice": "Puck",
"direction": "cheerful game announcer",
"cost": 1,
"credits": 90
}Generate music
musicMCP: generate_musicUse this to make a soundtrack: menu themes, level loops, boss music, stingers. Describe genre, tempo, instruments and mood; say "loopable" for background music. Returns an audio file.
/api/v1/tools/musicAPI keyclip · Lyria clip · 10 cr ($0.10)defaultpro · Lyria full track · 25 cr ($0.25)promptrequiredstringGenre, tempo (bpm), instruments, mood and structure. Say "loopable" for background music.(1–2,000 chars)
modeloptional"clip" | "pro" · default "clip"clip (10 cr): a short loopable clip. pro (25 cr): a full-length track.
Returns: An audio asset. In the Studio: Music Studio.
curl https://janusengine.com/api/v1/tools/music \
-H "Authorization: Bearer $JANUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"cheerful chiptune level theme, 140 bpm, square leads, loopable","model":"clip"}'{
"asset_id": "e4b8c6d2a9f04b31",
"mime": "audio/mpeg",
"url": "https://janusengine.com/api/assets/e4b8c6d2a9f04b31",
"prompt": "cheerful chiptune level theme, 140 bpm, square leads, loopable",
"cost": 10,
"credits": 80
}Start video render
videoasyncMCP: start_videoUse this to render a short video shot with native audio, from a prompt or by animating a still (image_id). Renders take 1–3 minutes: this returns a job_id immediately — poll GET /api/v1/jobs/{job_id} (or the get_job MCP tool) every ~10 s. Credits are charged up front and refunded automatically if the render fails.
/api/v1/tools/videoAPI keylite · Veo 3.1 Lite · 40 cr ($0.40)fast · Veo 3.1 Fast · 60 cr ($0.60)defaultstandard · Veo 3.1 · 150 cr ($1.50)promptrequiredstringThe shot: subject, action, camera move, mood. Native audio is generated too.(1–2,000 chars)
modeloptional"lite" | "fast" | "standard" · default "fast"lite (40 cr), fast (60 cr), standard (150 cr, highest quality).
image_idoptionalstringOptional asset id of a still image to animate (image-to-video).
aspect_ratiooptional"16:9" | "9:16" · default "16:9"16:9 (landscape trailer) or 9:16 (vertical/mobile).
Returns: A job: job_id, status (queued → rendering → succeeded | failed). On success the job carries the video asset url (video/mp4). In the Studio: Video Studio.
curl https://janusengine.com/api/v1/tools/video \
-H "Authorization: Bearer $JANUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"slow push-in on a sleepy kitten on a bookshelf at golden hour","model":"lite","aspect_ratio":"16:9"}'{
"job_id": "5b0c2e7d9a1f4c3e",
"status": "queued",
"cost": 40,
"credits": 40
}Build game
code.gameMCP: build_gameUse this to generate a complete, playable single-file HTML5 game (Phaser, three.js or plain canvas) from one sentence, or to change an existing one by passing its HTML as current_html. Pass assets to use your own sprites and sounds. The game is saved to your library; its url plays it in any browser.
/api/v1/tools/code.gameAPI keyfast · Fast · 5 cr ($0.05)defaultpro · Pro · 20 cr ($0.20)promptrequiredstringThe game to build — or, when iterating, the change to make.(1–4,000 chars)
current_htmloptionalstringThe current game's full HTML, to iterate on it. Omit to build a new game.(≤ 200,000 chars)
engineoptional"phaser" | "three" | "canvas" · default "phaser"phaser (2D), three (3D) or canvas (no library).
modeloptional"fast" | "pro" · default "fast"fast (5 cr) or pro (20 cr, stronger reasoning for complex games).
assetsoptional{ url, role }[]Your own sprites/sounds for the game to load instead of procedural art.(≤ 12 items)
Returns: A game asset (text/html): asset_id, url (playable), html (the full source), engine. In the Studio: Game Genie.
curl https://janusengine.com/api/v1/tools/code.game \
-H "Authorization: Bearer $JANUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"a cozy endless runner where a puppy hops over garden gnomes","engine":"phaser","model":"fast"}'{
"asset_id": "f50d6cd0c54a461c",
"mime": "text/html",
"url": "https://janusengine.com/api/assets/f50d6cd0c54a461c",
"engine": "phaser",
"html": "<!DOCTYPE html>\n<html>… the full game …</html>",
"cost": 5,
"credits": 35
}Text assist
text.assistUse this for quick text help: turn a rough idea into a strong image or music prompt, brainstorm game names or ideas, or plan a PBR material. Returns text (some tasks return JSON in the text).
/api/v1/tools/text.assistAPI keyfast · Fast · 1 cr ($0.01)defaultpro · Pro · 3 cr ($0.03)promptrequiredstringYour idea or question.(1–4,000 chars)
taskoptional"enhance-image-prompt" | "enhance-music-prompt" | "material" | "name-ideas" | "game-ideas" | "freeform" · default "freeform"What kind of help you want.
modeloptional"fast" | "pro" · default "fast"fast (1 cr) or pro (3 cr).
Returns: { task, text }. In the Studio: Image Forge, Music Studio, Material Forge, Game Genie.
curl https://janusengine.com/api/v1/tools/text.assist \
-H "Authorization: Bearer $JANUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"spooky but cute haunted kitchen level","task":"enhance-image-prompt"}'{
"task": "enhance-image-prompt",
"text": "A cozy haunted kitchen at night, game level art: copper pots glowing faintly…",
"cost": 1,
"credits": 34
}Pack atlas
pack.atlasMCP: pack_atlasUse this to pack animation frames (asset ids, in order) into one PNG sprite sheet with edge extrusion. Free. The Bevy TextureAtlasLayout JSON is at the result url + ?variant=atlas.
/api/v1/tools/pack.atlasAPI keyasset_idsrequiredstring[]Frame asset ids, in animation order. Mixed sizes are normalised to the largest frame.(1–256 items)
columnsoptionalintegerGrid columns (default: near-square).(1–64)
extrudeoptionalinteger · default 2Edge-extrusion pixels per frame (prevents texture bleeding).(0–8)
characteroptionalstringOptional character name recorded in the atlas JSON.(≤ 80 chars)
Returns: An image asset (the sheet). Atlas JSON at `${url}?variant=atlas`. In the Studio: Atlas Packer, Sprite Forge.
curl https://janusengine.com/api/v1/tools/pack.atlas \
-H "Authorization: Bearer $JANUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"asset_ids":["a1b2c3d4e5f60718","b2c3d4e5f6071829"],"extrude":2}'{
"asset_id": "6e991d4210fd41f1",
"mime": "image/png",
"url": "https://janusengine.com/api/assets/6e991d4210fd41f1",
"bevy": {
"schema": "janus.texture_atlas/v1",
"engine": "bevy",
"tile_size": [
1024,
1024
],
"columns": 2,
"rows": 1,
"frame_count": 2
},
"cost": 0,
"credits": 34
}/api/v1/jobs/{job_id}API keyVideo renders run in the background. video returns a job_id straight away; poll this endpoint every ~10 seconds. status moves queued → rendering → succeeded or failed. Most renders finish in 1–3 minutes. A failed render is refunded automatically, exactly once.
{
"job_id": "5b0c2e7d9a1f4c3e",
"status": "succeeded",
"asset_id": "a7c1e9f03b5d4e28",
"url": "https://janusengine.com/api/assets/a7c1e9f03b5d4e28",
"credits": 40
}{
"job_id": "5b0c2e7d9a1f4c3e",
"status": "failed",
"error": "no video returned (possibly filtered)",
"refunded": true,
"credits": 80
}/api/v1/assets?kind=image&limit=50API key/api/v1/assetsAPI keyGET lists your library, newest first. Filter with kind (image, audio, video, game, file), tool and limit (max 200).
POST uploads a file so tools can use it — for example, upload your own sprite, then pass its asset_id to image.edit or pack.atlas. Send {data_base64, mime, filename?, prompt?}; up to 40 MB. Images, audio, MP4, GLB, JSON and ZIP are accepted.
Asset URLs (https://janusengine.com/api/assets/{id}) are public, stable and CORS-open, so games can load them directly. Add ?download=1 to force a download, or ?variant=atlas on a packed sheet for its atlas JSON.
curl https://janusengine.com/api/v1/assets \
-H "Authorization: Bearer $JANUS_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"mime\": \"image/png\", \"filename\": \"hero.png\", \"data_base64\": \"$(base64 < hero.png)\"}"{
"assets": [
{
"id": "9712608cb5c04801",
"kind": "image",
"mime": "image/png",
"tool": "image-gen",
"prompt": "a brave knight puppy with a tiny shield",
"created_at": "2026-10-13 00:09:37",
"url": "https://janusengine.com/api/assets/9712608cb5c04801"
}
],
"count": 1
}Errors are JSON with a stable machine-readable error code and a human message. Some carry extra fields (issues, needed, credits).
{
"error": "insufficient_credits",
"message": "This run costs 16 credits and you have 9.",
"needed": 16,
"credits": 9
}| Status | error | Meaning |
|---|---|---|
| 400 | bad_request | The body failed validation — `issues` lists each problem. |
| 401 | missing_api_key / invalid_api_key | No key, or a revoked or mistyped key. |
| 402 | insufficient_credits | Not enough credits for this run. `needed` and `credits` say by how much. |
| 403 | forbidden | You referenced an asset that belongs to another account. |
| 404 | unknown_op / asset_not_found / not_found | No such tool, asset or job. |
| 413 | bad_size | Upload is empty or over 40 MB. |
| 422 | prompt_blocked | The prompt names protected IP (a franchise, an artist's style, a real person). Describe it in your own words. Not charged. |
| 422 | generation_refused | The model declined the request (safety filters). Not charged. |
| 429 | rate_limited | More than 20 AI calls in a minute. Back off and retry. |
| 502 | generation_failed | The model provider failed. You are not charged — retry. |
| 503 | capacity / service_unavailable | Generation is temporarily unavailable. Retry later. |
AI calls are limited to 20 per minute per account, shared across the browser, the REST API and MCP (a token bucket, so short bursts are fine). Over the limit you get 429 rate_limited — wait a few seconds and retry with exponential backoff. Polling jobs, listing assets and reading the catalog are not metered.
Need more throughput for a pipeline or a studio? Talk to us.
Pay as you go with credits — 100 credits = $1. The API, MCP and Janus Studio share one balance. Free browser tools (pixel snap, chroma key, voxels, 3D-to-2D, SFX) cost nothing.
| Tool | Model | Credits | USD |
|---|---|---|---|
| image.generate | nb2-lite · Nano Banana 2 Lite | 3 | $0.03 |
nb2 · Nano Banana 2 | 8 | $0.08 | |
nb-pro · Nano Banana Pro | 16 | $0.16 | |
| image.edit | nb2-lite · Nano Banana 2 Lite | 3 | $0.03 |
nb2 · Nano Banana 2 | 8 | $0.08 | |
nb-pro · Nano Banana Pro | 16 | $0.16 | |
| speech | standard · Standard | 2 | $0.02 |
lite · Lite | 1 | $0.01 | |
| music | clip · Lyria clip | 10 | $0.10 |
pro · Lyria full track | 25 | $0.25 | |
| video | lite · Veo 3.1 Lite | 40 | $0.40 |
fast · Veo 3.1 Fast | 60 | $0.60 | |
standard · Veo 3.1 | 150 | $1.50 | |
| code.game | fast · Fast | 5 | $0.05 |
pro · Pro | 20 | $0.20 | |
| text.assist | fast · Fast | 1 | $0.01 |
pro · Pro | 3 | $0.03 | |
| pack.atlas | default · Free | 0 | $0.00 |
Credit packs
Buy credits on the pricing page.