Developers

Your asset pipeline, by script

A simple REST API with JSON in and out. Create characters, request animations and effects, wait for the job and download the zip in your engine's format, spending the same credits as the app.

Pro and Studio plans Same credits as the app Refund if it fails
make_hero.py
import os, time, requests

API = '{{ORIGIN}}/api'
S = requests.Session()
S.headers['Authorization'] = 'Bearer ' + os.environ['SG_KEY']

def wait(job):
    while job['status'] in ('queued', 'running'):
        time.sleep(3)
        job = S.get(f"{API}/jobs/{job['id']}").json()
    assert job['status'] == 'done', job['error']

project = S.post(f'{API}/projects', json={'name': 'My game'}).json()
r = S.post(f'{API}/characters/text', json={
    'description': 'a young knight with a big sword',
    'style': 'pixel', 'project': project['id']}).json()
wait(r['job'])

cid = r['character']['id']
for job in S.post(f'{API}/characters/{cid}/animations',
                  json={'keys': ['idle', 'walk', 'attack']}).json():
    wait(job)

zip_ = S.get(f'{API}/characters/{cid}/export.zip', params={'formats': 'godot'})
open('knight.zip', 'wb').write(zip_.content)
import { writeFile } from 'node:fs/promises';

const API = '{{ORIGIN}}/api';
const headers = { Authorization: `Bearer ${process.env.SG_KEY}`, 'Content-Type': 'application/json' };
const call = async (path, body) => (await fetch(API + path, body
  ? { method: 'POST', headers, body: JSON.stringify(body) } : { headers })).json();

async function wait(job) {
  while (job.status === 'queued' || job.status === 'running') {
    await new Promise((r) => setTimeout(r, 3000));
    job = await call(`/jobs/${job.id}`);
  }
  if (job.status !== 'done') throw new Error(job.error);
}

const project = await call('/projects', { name: 'My game' });
const r = await call('/characters/text', {
  description: 'a young knight with a big sword', style: 'pixel', project: project.id });
await wait(r.job);

const cid = r.character.id;
for (const job of await call(`/characters/${cid}/animations`, { keys: ['idle', 'walk', 'attack'] })) await wait(job);
const zip = await fetch(`${API}/characters/${cid}/export.zip?formats=godot`, { headers });
await writeFile('knight.zip', Buffer.from(await zip.arrayBuffer()));
How a request flows

Ask, wait, download

AuthenticateSend your key in Authorization: Bearer sg_live_…
RequestThe POST returns right away with a job (and the credits are already reserved).
WaitCheck GET /api/jobs/{id} until done or error. On error the credits come back.
DownloadPNG strips, atlas, or a zip for Godot, Unity, Phaser, GameMaker or RPG Maker.

Characters and assets

Characters, monsters, items, UI, scenes and tilesets from a description, or from an image you send.

Endpoints →

Animations and effects

The 24 ready actions or your own, in Standard or Premium, in 2, 4 or 8 directions. VFX from a description of the effect and its motion.

Endpoints →

Export

One zip per character, skin or whole project, with the formats you choose. Or just the atlas PNG + JSON.

Endpoints →
For AI agents

MCP: your agent makes the assets

Connect Claude Code, Cursor, Codex or any MCP client. The agent describes what the game needs and SpriteHatch picks the right path: a new character or a skin, a body animation or an ability with separate effect layers, an effect, an item, UI, a scene or a tileset. It sees previews, reviews animations for free and exports straight into the game project, with the frame sizes, pivots and timings to write the code.

claude mcp add spritehatch -e SPRITEHATCH_API_KEY=$SG_KEY -- uvx spritehatch-mcp
claude mcp add --transport http spritehatch {{ORIGIN}}/mcp \
  --header "Authorization: Bearer $SG_KEY"

How to install the MCP →

Your credits stay under control. Each session has a budget (SPRITEHATCH_BUDGET, 300 by default), larger requests ask for your approval first (SPRITEHATCH_CONFIRM_ABOVE, 60), failed jobs give the credits back, and the agent improves an animation at most once before showing it to you.
Getting your key

Up and running in 2 minutes

  1. Open the app and click your avatar → My account and statement.
  2. Under API keys, give the key a name and click Create key.
  3. Copy the key now (it is shown in full only once) and save it as an environment variable, for example SG_KEY.
  4. Test it: curl {{ORIGIN}}/api/auth/me -H "Authorization: Bearer $SG_KEY" shows your plan and balance.
Keep your key secret. Anyone with it spends your credits. Never put it in the code of a game you distribute; if it leaks, delete it in your account and it stops working immediately.

Full API reference →