Create a mascot
This guide is for an AI agent working with Masko's MCP tools; read_docs reads the other guides and docs pages it names. It covers making a mascot and its still pictures. To animate it, read ai-agents/animate-mascot; to make it react in an app, ai-agents/build-interactive-mascot; to show it in a website or app, ai-agents/integrate-mascot.
Start from what exists
get_account shows the workspace, its credit balance and the work still running. list_mascots finds a mascot by name. When the user already has the character in Masko, keep working on that mascot and its IDs; never make a replacement unless the user asks for a new one.
Make the mascot
create_mascot makes a private mascot. It draws nothing and charges nothing.
- The user has pictures of the character: pass them in
references, as asset IDs or https links. They set the look: never replace them with a description you write. - No pictures yet: describe it in
description: what kind of creature or object it is, its shape and its colours. personalityholds its personality, tone and rules, such as "curious, never aggressive".projectfiles it in a project, created when no project has that name.reacts_tois what in the app it reacts to, only when the user said, such as "task done, error". A mascot that reacts is a canvas: seeai-agents/build-interactive-mascot.
Pictures from the user
A picture goes in as an https link or the asset ID of a picture already in Masko. Masko cannot read files on the user's computer:
- A coding agent on an Apple Silicon Mac uploads one with the masko command,
masko studio POST upload --file <path>, which returns itsasset_id. - When the app hands a picture the user attached to an upload tool, use the asset ID that tool returns.
- Otherwise the user uploads it on masko.ai; find it with
list_mascotsandlist_assets.
Never put the user's files on another public host to get a link, and never send a file path as a link.
Draw poses
generate_mascot_image draws one pose: a still picture with a transparent background, for $0.125. Tell the user the price and get a yes first, unless they already agreed.
Write pose as one still moment. It says what happens, never how the mascot looks:
- What the body does: the posture, each arm, where the head turns and the eyes look.
- How it feels, as the face shows it.
- What it holds or wears, only if something.
Keep the user's intent and energy, and add nothing they did not ask for. Leave out colours, materials, art style, the background (it is removed) and the framing: the references set the look.
- Good: "leans forward on tiptoe, both arms up in a cheer, eyes squeezed shut, huge open smile".
- Weak: "a cute red fox in a forest, 3D style, happy".
Give every pose a name of 1 to 3 words, such as "Cheering". references with reference_note borrow a pose, expression or prop from other pictures.
Keep the look the user likes
A mascot made from a description has no reference picture, so each pose is drawn from the description alone and can differ. Show the first pose; once the user likes it, pass its asset_id to update_mascot in references, so later poses and animations match it.
Backgrounds
make_background makes an empty place in the mascot's style, with calm areas for a title and a button, for $0.375. Give its purpose (splash, paywall, a quiz result page, or your own words) and, when the user has one in mind, the place in a few words in description. place sets the shape. Never ask for the mascot, text or buttons in it.
Jobs, retries and failures
- Every paid call returns a job.
get_jobwaits up to 40 seconds per call for its result; call it again until the job is completed or failed. Never start the same work again while its job is running; after an interruption,get_accountlists the work still running. operation_idmakes a call safe to retry: the same ID returns the first answer and never charges twice. After a timeout, retry with the same ID and the same inputs.- A failed job gives back the credits for what it did not make. To try again, ask the user and use a new
operation_id: the old one returns the failed job. - When something looks like a Masko problem, offer to tell the Masko team with
send_feedback, quoting the tool, the error and itsrequest_id.
Prices and credits
Say prices and balances in dollars, from the fields ending in _usd. Inputs such as max_credits stay in credits, at $0.125 each. When credits run short, stop paid work and tell the user what the work costs and what the workspace has. No tool takes a payment.
Show the result
Show the user the link from the finished job. Links outside assets.masko.ai are private and stop working within hours: show them, but never put them in code, an app or a website. For those, read ai-agents/integrate-mascot.
More detail: generate/requests (how to word every request), create/from-image and create/from-text.
