Jabbertoon for developers
The question Jabbertoon answers for developers is: how do I turn a script into an animated, talking cartoon in code? This page is the part of that answer that works today. From code, or from an AI assistant, you can:
- list Jabbertoon's moves, characters and looks;
- get any move's program, and the same program as readable text;
- check a move, a character or a cartoon, with errors that say where the problem is and what is wrong;
- write a link that opens a move in the Forge's move maker, where it plays, a ready character in the editor's Cartoon, or a build in the Forge;
- write a link that opens a whole cartoon in the editor, where it plays, with its characters, places, lines and moves, and the person can change it and save it as a video.
It takes about five minutes, and none of it needs a key, an account or a payment. The step that finishes the answer is in section 4.
1. Write a link that opens a move
The simplest way to use Jabbertoon from code, or from an AI assistant, is to write a link. The move travels inside the link after the # sign, so you need no server and no API call:
Write a program. This one is a whole move: one script that bobs the body 8 pixels and swings the head 6 degrees.
{ "v": 1, "kind": "behaviour", "name": "nod and bob", "scripts": [ { "body": [ { "op": "bob", "amp": 8, "every": 1 }, { "op": "swingPart", "part": "head", "deg": 6, "every": 1.5 } ] } ] }Turn it into canonical JSON: keys sorted at every level, no spaces. This is the exact text the code is made from.
{"kind":"behaviour","name":"nod and bob","scripts":[{"body":[{"amp":8,"every":1,"op":"bob"},{"deg":6,"every":1.5,"op":"swingPart","part":"head"}]}],"v":1}Encode that text as UTF-8, then base64url without padding (the + and / of base64 become - and _, and the = at the end is dropped). That is the share code.
eyJraW5kIjoiYmVoYXZpb3VyIiwibmFtZSI6Im5vZCBhbmQgYm9iIiwic2NyaXB0cyI6W3siYm9keSI6W3siYW1wIjo4LCJldmVyeSI6MSwib3AiOiJib2IifSx7ImRlZyI6NiwiZXZlcnkiOjEuNSwib3AiOiJzd2luZ1BhcnQiLCJwYXJ0IjoiaGVhZCJ9XX1dLCJ2IjoxfQPut the code after #move= in a link to the editor. Opening the link shows the move as blocks in the Forge's move maker and plays it on a person; nothing is sent to a server, because the browser never sends the part after the #.
In the move maker, Use it keeps the move in the person's own moves, and every character in their cartoon can do it. A whole cartoon travels the same way: the code of a cartoon program ({"v": 1, "kind": "cartoon", ...}, with its cast, places and scenes) after https://jabbertoon.com/cartoon/#c= opens it in the editor, where it plays, and the person who opens it gets a copy of their own to change and save as a video (what they were making is kept: one tap switches back). share_link makes that link for you, and checks the cartoon first. A character travels the same way, as the code of {"type": "character", "name": ..., "content": ...}: after https://jabbertoon.com/cartoon/#c= it joins the cartoon open in the editor. A ready-made character needs no code at all: https://jabbertoon.com/cartoon/#ch=dog puts Grump, the dog of the cast in 3D, in a new cartoon. The link formats are listed in the link reference, and the program format in the block language reference.
2. Call the free tools
The same tools that AI assistants use are plain HTTP endpoints at https://jabbertoon.com/api/<tool>, described by an OpenAPI document: make_cartoon turns a script, a line each, into a cartoon and the link that plays it, in one call; get_guide gives one topic of the guide (call it first); list_moves and list_characters list what Jabbertoon ships; get_move gives a move's program and its readable text; validate checks a move, a character or a cartoon; share_link turns a cartoon, a move or a character into a link; build makes a thing, a move, a game or a place to walk from its steps and gives the link that opens it; and read_blueprint measures a floor plan's picture so build can make the building. They are free and keyless, and all of them but report_problem and read_blueprint only read. Each example below checks a move and gets the link that opens it, against the live site, https://jabbertoon.com, and needs no key, no account and nothing to install beyond curl, Python or Node. (The variable at the top of each file can send it to another address; we use it to test our own server before a release, and you can leave it unset.)
curl
#!/bin/sh
# Jabbertoon quickstart (curl): check a move, then get the jabbertoon.com link that opens it.
# No key, no account. For a local server: JABBERTOON_BASE=http://127.0.0.1:8790 sh quickstart.sh
BASE="${JABBERTOON_BASE:-https://jabbertoon.com}"
# A move: bob up and down and swing both arms (the language: https://jabbertoon.com/docs/language/)
PROGRAM='{"v": 1, "kind": "behaviour", "name": "Happy bob",
"scripts": [{"body": [{"op": "bob", "amp": 12}, {"op": "swingPart", "part": "arms", "deg": 30}]}]}'
# 1. validate: "ok": true, or each error and warning as {code, where, says, fix}
curl -sS -X POST "$BASE/api/validate" -H 'Content-Type: application/json' -d "{\"program\": $PROGRAM}"
echo
# 2. share_link: "link" opens the move in the Forge's move maker, where it plays. The move travels in the
# link after the #, so nothing is uploaded or stored.
curl -sS -X POST "$BASE/api/share_link" -H 'Content-Type: application/json' -d "{\"program\": $PROGRAM}"
echoSave it as quickstart.sh, then run it: sh quickstart.sh.
Python
"""Jabbertoon quickstart (Python 3, standard library only): check a move, then get the link that opens it.
No key, no account. For a local server: JABBERTOON_BASE=http://127.0.0.1:8790 python quickstart.py"""
import json, os, sys, urllib.error, urllib.request # noqa: E401
BASE = os.environ.get('JABBERTOON_BASE', 'https://jabbertoon.com')
PROGRAM = {'v': 1, 'kind': 'behaviour', 'name': 'Happy bob', # a move: bob and swing both arms (/docs/language/)
'scripts': [{'body': [{'op': 'bob', 'amp': 12}, {'op': 'swingPart', 'part': 'arms', 'deg': 30}]}]}
def call(tool, args):
req = urllib.request.Request(f'{BASE}/api/{tool}', data=json.dumps(args).encode('utf-8'),
headers={'Content-Type': 'application/json'})
try:
text = urllib.request.urlopen(req, timeout=20).read()
except urllib.error.HTTPError as e: # a refusal is JSON too (busy, timeout, too_large ...)
text = e.read()
if not text.lstrip().startswith(b'{'): # not the Jabbertoon API at all (a web page, a proxy's error page)
sys.exit(f'{tool}: the answer from {BASE} is not JSON: is that the Jabbertoon API?')
answer = json.loads(text)
if 'error' in answer:
sys.exit(f"{tool}: {answer['error']['code']}: {answer['error']['says']} (fix: {answer['error']['fix']})")
return answer
check = call('validate', {'program': PROGRAM}) # 1. ok, or {code, where, says, fix} for each problem
for p in check['errors'] + check['warnings']:
print(f"{p['code']} at {p['where']}: {p['says']} (fix: {p['fix']})")
if check['ok']:
print('Open it:', call('share_link', {'program': PROGRAM})['link']) # 2. the link carries the move after the #Save it as quickstart.py, then run it: python3 quickstart.py.
JavaScript (Node 18 or later)
// Jabbertoon quickstart (JavaScript: Node 18+ or a browser): check a move, then get the link that opens it.
// No key, no account. For a local server: JABBERTOON_BASE=http://127.0.0.1:8790 node quickstart.mjs
const BASE = (globalThis.process && process.env.JABBERTOON_BASE) || 'https://jabbertoon.com';
// A move: bob up and down and swing both arms (the language: https://jabbertoon.com/docs/language/)
const program = {
v: 1, kind: 'behaviour', name: 'Happy bob',
scripts: [{ body: [{ op: 'bob', amp: 12 }, { op: 'swingPart', part: 'arms', deg: 30 }] }],
};
async function call(tool, args) {
const r = await fetch(`${BASE}/api/${tool}`, {
method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(args),
});
let answer; // every answer is JSON, a refusal too (busy, timeout, too_large ...)
try { answer = JSON.parse(await r.text()); } catch (e) { throw new Error(`${tool}: the answer from ${BASE} is not JSON (HTTP ${r.status}): is that the Jabbertoon API?`); }
if (answer.error) throw new Error(`${tool}: ${answer.error.code}: ${answer.error.says} (fix: ${answer.error.fix})`);
return answer;
}
const check = await call('validate', { program }); // 1. ok, or {code, where, says, fix} for each problem
for (const p of [...check.errors, ...check.warnings]) console.log(`${p.code} at ${p.where}: ${p.says} (fix: ${p.fix})`);
if (check.ok) {
const made = await call('share_link', { program }); // 2. the link travels with the move after the #
console.log('Open it:', made.link);
}Save it as quickstart.mjs, then run it: node quickstart.mjs.
The tools, their arguments and an example of each are listed on the page for AI assistants.
3. Check your files against the schemas
Programs, packs and cartoons have JSON Schemas at their public URLs, so your editor or your tests can check a file before Jabbertoon sees it. The pack format explains what each file holds.
4. What comes next
One thing finishes the answer to the question above, and it is not yet published: turning a script into a video in code, with a command-line renderer and library that run on your own machine, free and with no key. It is not yet published, so there is nothing to install or run for it today; this page will say when there is. Until then, validate checks a whole cartoon, share_link turns it into a link that plays it in the editor, where it is saved as a video.
The source
Jabbertoon's code belongs to 1211 Holding LLC, all rights reserved. The part of it that runs in your browser is served as it was written, not minified, so you can read it and check what it does; reading it is not a licence to reuse it (for a licence, write to hello@jabbertoon.com). The engine starts at /engine/index.js, which imports the rest of it; the code that draws the characters and runs the block editor is under /ui/. Every file:
engine/acts.jsengine/body_data.jsengine/boxes.jsengine/camera_ops.jsengine/cast_sizes.jsengine/curves.jsengine/depth.jsengine/depth_bat.jsengine/depth_build.jsengine/depth_fight.jsengine/depth_flight.jsengine/depth_land.jsengine/depth_reach.jsengine/depth_space.jsengine/depth_voxels.jsengine/depth_walk.jsengine/depth_world.jsengine/desugar.jsengine/detmath.jsengine/director.jsengine/expr.jsengine/ext.jsengine/ext_parts.jsengine/extensions.jsengine/extensions_later.jsengine/game_id.jsengine/game_words.jsengine/geom.jsengine/index.jsengine/inspect.jsengine/keys.jsengine/materials.jsengine/moods.jsengine/move_names.jsengine/moves3d.jsengine/packs.jsengine/parts.jsengine/runtime.jsengine/sha256.jsengine/sing_ops.jsengine/song.jsengine/sound_names.jsengine/speech_trim.jsengine/text.jsengine/together.jsengine/validate.jsengine/visemes.jsui/actions/catalog.jsui/actions/index.jsui/actions/measure.jsui/actions/picker.jsui/animals3d/animal3d.jsui/animals3d/depth.jsui/animals3d/maker.jsui/animals3d/maker_worker.jsui/animals3d/reshape.jsui/animals3d/rig_export.jsui/animals3d/worker.jsui/blocks/catalog.jsui/blocks/convert.jsui/blocks/define.jsui/blocks/reaches.jsui/blocks/review.jsui/blocks/words.jsui/bodies/anemone.jsui/bodies/beach.jsui/bodies/birch.jsui/bodies/bird.jsui/bodies/brain_coral.jsui/bodies/cat.jsui/bodies/chicken.jsui/bodies/coral.jsui/bodies/corgi.jsui/bodies/cow.jsui/bodies/crocodile.jsui/bodies/dog.jsui/bodies/dolphin.jsui/bodies/dragon.jsui/bodies/fish.jsui/bodies/fox.jsui/bodies/frog.jsui/bodies/gull.jsui/bodies/horse.jsui/bodies/mouse.jsui/bodies/oak.jsui/bodies/paper.jsui/bodies/person.jsui/bodies/pig.jsui/bodies/pine.jsui/bodies/quad.jsui/bodies/rabbit.jsui/bodies/scorpion.jsui/bodies/sea_fan.jsui/bodies/sea_whips.jsui/bodies/upright.jsui/bodies/whale.jsui/bodies/wings.jsui/build_store.jsui/builder/animal_custom.jsui/builder/glb_person.jsui/builder/mpfb_body.jsui/builder/quad_body.jsui/camera.jsui/captions.jsui/char_sprites.jsui/character_pack.jsui/content_hash.jsui/depth/blueprint.jsui/depth/build3d.jsui/depth/build_mode.jsui/depth/free_part.jsui/depth/games/aces.jsui/depth/games/actions.jsui/depth/games/campaign.jsui/depth/games/creatures/dragon.jsui/depth/games/creatures/moves.jsui/depth/games/creatures/serpent.jsui/depth/games/creatures/troll.jsui/depth/games/creatures/wyrm.jsui/depth/games/creatures/wyvern.jsui/depth/games/cricket.jsui/depth/games/dragons.jsui/depth/games/duel.jsui/depth/games/editions.jsui/depth/games/escape.jsui/depth/games/garden.jsui/depth/games/hide.jsui/depth/games/joust.jsui/depth/games/pawkour.jsui/depth/games/pawkour_steps.jsui/depth/games/pet.jsui/depth/games/stardash.jsui/depth/games/tag.jsui/depth/games/trench_run.jsui/depth/hud.jsui/depth/ifc.jsui/depth/landscapes.jsui/depth/model_builds.jsui/depth/models.jsui/depth/picture.jsui/depth/place_clear.jsui/depth/plan_under.jsui/depth/player.jsui/depth/roof_plan.jsui/depth/stage3d.jsui/depth/works.jsui/depth/world_out.jsui/designed/cast.jsui/export.jsui/extensions.jsui/head/armour.jsui/head/clothes.jsui/head/clothes_host.jsui/head/costumes.jsui/head/designed.jsui/head/hats.jsui/head/head.jsui/head/part.jsui/head/part_worker.jsui/head/render.jsui/head/site_cloth.jsui/head/visemes.jsui/kitten/engine.jsui/kitten/text.jsui/kitten/worker.jsui/kokoro/worker.jsui/library/cards.jsui/library/creatures.jsui/library/do_seconds.jsui/library/do_words.jsui/library/library.jsui/library/remade.jsui/licence.jsui/lipsync.jsui/mark.jsui/motion/body_mats.jsui/motion/body_skin.jsui/motion/chains.jsui/motion/contact.jsui/motion/formula.jsui/motion/hold.jsui/motion/lang_acts.jsui/motion/language.jsui/motion/my_moves.jsui/motion/part_surfaces.jsui/motion/perform.jsui/motion/pose_scene.jsui/motion/pose_scene_worker.jsui/motion/pose_timeline.jsui/motion/poses.jsui/motion/reach.jsui/motion/readout.jsui/motion/scene_picture.jsui/motion/scene_read.jsui/motion/scene_things.jsui/motion/sentence.jsui/motion/stick_legs.jsui/motion/stick_move.jsui/motion/stick_rig.jsui/motion/stick_steps.jsui/motion/stick_word.jsui/motion/surfaces.jsui/motion/walk_live.jsui/motion/walk_worker.jsui/motion/ways.jsui/moving.jsui/outcome.jsui/people3d/anim.jsui/people3d/bake.jsui/people3d/clear.jsui/people3d/cloth.jsui/people3d/clothes.jsui/people3d/cut_worker.jsui/people3d/depth.jsui/people3d/extras.jsui/people3d/face.jsui/people3d/feet_ground.jsui/people3d/gl.jsui/people3d/import_character.jsui/people3d/own.jsui/people3d/paint.jsui/people3d/person3d.jsui/people3d/rig_export.jsui/people3d/rig_reader.jsui/perform.jsui/perform_face.jsui/pocket/buffer_shim.jsui/pocket/engine.jsui/pocket/fs_shim.jsui/pocket/voices.jsui/pocket/worker.jsui/pose_move.jsui/pose_video.jsui/project.jsui/record_live.jsui/render3d/bones3d.jsui/render3d/bones_glb.jsui/render3d/cast3d.jsui/render3d/cloth3d.jsui/render3d/depth3d.jsui/render3d/gl.jsui/render3d/grip.jsui/render3d/hold.jsui/render3d/horizon3d.jsui/render3d/land3d.jsui/render3d/lean.jsui/render3d/melt.jsui/render3d/melt_worker.jsui/render3d/plants3d.jsui/render3d/play.jsui/render3d/voxels3d.jsui/room/build_room.jsui/room/build_sync.jsui/room/keep.jsui/room/link.jsui/room/lobby.jsui/room/lockstep.jsui/room/progress.jsui/room/talk.jsui/sfx.jsui/shapes.jsui/share.jsui/share_sheet.jsui/shell/baselines.jsui/shell/clock.jsui/shell/depth_level.jsui/shell/do_play.jsui/shell/do_worker.jsui/shell/early_tabs.jsui/shell/editor.jsui/shell/film_check.jsui/shell/film_check_run.jsui/shell/film_like.jsui/shell/follow.jsui/shell/follow_tapes.jsui/shell/forge.jsui/shell/forge_page.jsui/shell/format.jsui/shell/fresh_release.jsui/shell/from_studio.jsui/shell/gamemaker.jsui/shell/hand.jsui/shell/keep.jsui/shell/main.jsui/shell/modes.jsui/shell/my_moves.jsui/shell/new_cast.jsui/shell/parts.jsui/shell/places.jsui/shell/prop_shelf.jsui/shell/recordings.jsui/shell/rigged_out.jsui/shell/scene_clip.jsui/shell/script.jsui/shell/set_seats.jsui/shell/sets_page.jsui/shell/shelf.jsui/shell/talking.jsui/shell/together.jsui/shell/voice_keys.jsui/shell/voices.jsui/shell/world3d.jsui/shell/world_door.jsui/shell/world_early.jsui/shell/world_page.jsui/shell/world_rules.jsui/shell/world_together.jsui/song/card.jsui/song/decode.jsui/song/fit.jsui/song/map.jsui/song/map_worker.jsui/song/regions.jsui/song/tags.jsui/song/timing.jsui/song/turns.jsui/song/vocal.jsui/song/wave.jsui/song_align.jsui/sound/ambience.jsui/sound/kinds.jsui/springs.jsui/stage.jsui/store.jsui/studio3d/axis_move.jsui/studio3d/blender_py.jsui/studio3d/bodies.jsui/studio3d/body_build.jsui/studio3d/body_collide.jsui/studio3d/body_skin.jsui/studio3d/body_solver.jsui/studio3d/body_words.jsui/studio3d/bodyplan.jsui/studio3d/bodyplan_profiles.jsui/studio3d/bones.jsui/studio3d/bones_draw.jsui/studio3d/clothes_maker.jsui/studio3d/costumes.jsui/studio3d/csg.jsui/studio3d/decompile.jsui/studio3d/examples.jsui/studio3d/export.jsui/studio3d/fields.jsui/studio3d/fit_steps.jsui/studio3d/furnish.jsui/studio3d/held_steps.jsui/studio3d/holdables.jsui/studio3d/hosts.jsui/studio3d/humanoid.jsui/studio3d/importer.jsui/studio3d/lab_tapes.jsui/studio3d/landmarks.jsui/studio3d/minecraft.jsui/studio3d/model.jsui/studio3d/model_bones.jsui/studio3d/motion_commands.jsui/studio3d/motion_engine.jsui/studio3d/motion_grammar.jsui/studio3d/motion_lang.jsui/studio3d/motion_parse.jsui/studio3d/motion_scene.jsui/studio3d/move_clips.jsui/studio3d/moveblocks.jsui/studio3d/movemaker.jsui/studio3d/moves.jsui/studio3d/objects.jsui/studio3d/open_sea.jsui/studio3d/people.jsui/studio3d/people_data.jsui/studio3d/picture.jsui/studio3d/pose3d.jsui/studio3d/pose_maker.jsui/studio3d/props.jsui/studio3d/reef_sets.jsui/studio3d/rom.jsui/studio3d/scene3d.jsui/studio3d/scene_camera.jsui/studio3d/scene_direct.jsui/studio3d/scene_report.jsui/studio3d/seaside.jsui/studio3d/sets.jsui/studio3d/showcase.jsui/studio3d/skeleton_desc.jsui/studio3d/skeleton_maker.jsui/studio3d/skeletons.jsui/studio3d/smooth_keys.jsui/studio3d/starters.jsui/studio3d/strike_solve.jsui/studio3d/studio.jsui/studio3d/vehicles.jsui/studio3d/village.jsui/studio3d/vocabulary.jsui/studio3d/wearables.jsui/textures.jsui/things.jsui/voice.jsui/words.js
The code of the tools for AI assistants runs on our server and is not served; the OpenAPI document and the page for AI assistants describe exactly what each tool takes and gives back.
Data rights
- Jabbertoon's code belongs to 1211 Holding LLC, all rights reserved; the browser part is listed under The source, readable but not licensed for reuse.
- The packs of the first release, every move, character and scene in it, are CC0: use them for anything, no credit needed. Packs added since, among them the example games and the newer moves, are under the Jabbertoon content licence: free to use in anything made with Jabbertoon, but not to take out, sell, use in another tool or train AI models on (the licences).
- The few third-party pieces the editor loads, and their licences, are listed on the licences page.
- We keep nothing a user makes: the editor sends nothing anywhere, and the tools read what they are sent and forget it. The two exceptions are report_problem, which keeps the report it is sent for us to read, and read_blueprint, which keeps the plan it read for two days so a second call can measure it (the privacy notice says what each holds).