All Documentation

Canvas

Pictures for menus, HUDs, icons and key art: generate, edit, cut out the background, upscale, and import as textures

Overview

Canvas makes the art in a game that is neither a model nor a sound: a title screen, a menu backdrop, a health bar frame, an inventory icon, a portrait, a loading screen, a sprite. Describe it, pick a size and a model, and the picture is generated, stored and saved as an Image in Saved Assets with a version history like a Forge model. Every later step — an edit in words, a background cutout, a 2x upscale — is a new version; the old one stays and can be pinned.

Behind it are fal.ai endpoints: the same operator-edited text-to-image list Forge uses for concept renders, plus lists for editing, background removal and upscaling. Credits are charged at the vendor's actual cost times the surcharge, the same rule as every other generator.

Generating a picture

  1. 1Open Canvas → New image and describe the picture as you would brief an artist: subject, style, palette, mood, and any words that must appear on it, in quotes.
  2. 2Pick a size. The named sizes cover the common game uses; the API also takes any width and height in multiples of 16 up to 2048.
  3. 3Pick a model, or leave the default. For text on the picture choose Ideogram 3 or Nano Banana: they can spell.
  4. 4Turn on Transparent background for a HUD element, an icon or a sprite: the picture is drawn on plain white and the background is then removed, so the PNG has alpha.
  5. 5Optionally choose a project and a character (a portrait, an emblem), and a name — it becomes the texture name in the engine.
  6. 6Generate. The picture opens on its own page when it is stored, usually within ten to thirty seconds.

Sizes

SizePixelsSuits
square1024 × 1024icons, portraits, tiles, item art (the default)
square_small512 × 512small icons and buttons
landscape_16_91536 × 864splash screens, backgrounds, key art
landscape_4_31280 × 960panels, cards, dialogue frames
portrait_16_9864 × 1536mobile screens, loading screens
portrait_4_3960 × 1280character cards, posters
banner2048 × 512title bars, HUD strips
ultrawide2048 × 864menu backdrops

Transparent means two steps

No picture model draws alpha. With transparent the prompt gets "isolated on a plain solid white background" appended, the picture is generated, and a background-removal model cuts the subject out. Name one object in the prompt; a scene has no background to remove.

The next version

On an image's page, Make the next version takes the active picture and does any of three things, in this order: an edit from instructions ("make the frame brass", "remove the text at the bottom", "add a subtle glow behind the icon"), a background cutout, and a 2x upscale. Each is a fal endpoint from the catalog; the editor can be chosen. The result is a new version, active by default; Set Active on any older version pins it, and each version downloads on its own.

  • •Edits keep what you did not mention. Say what changes, not the whole picture again.
  • •Cut out after the edit, not before: a transparent picture edited again comes back with a background.
  • •Upscale last. It doubles the pixels of whatever it is given, including a cutout's alpha.

Talking to the Canvas agent

One call makes one picture. The work a picture is not — a sprite sheet with even cells, a button in three states, a 9-slice panel with its margins, a title set in a real font, a palette swap, a seamless tile — is a conversation with the Canvas agent: an agent with an image workspace of named layers, the same picture models as above when it needs a new element, and one step per message. Say what you want; it does that step, shows you the result, and asks where next. Every step you keep becomes a draft version of the image; Export writes the finished one.

  • •Start from an image's page (Talk to the Canvas agent) to work on that picture, or from Canvas's New conversation with a brief to make one from nothing.
  • •Sizes and positions are exact: "128 px cells, 4 px margin, 3 columns" comes back as those pixels, with the atlas in the export's meta.json.
  • •A turn costs a small flat reservation settled to what the step actually cost; a step that calls a picture model adds that model's price.

Into the engine

The Unreal plugin's import_content(content_id) (and the Import button in its Library) brings an Image in as a UTexture2D under <Import Root>/Canvas/ named T_<Name>, set up for UI: the UI texture group, no mipmaps, sRGB, never streamed. Drop it into a UMG Image or Brush. See Unreal Engine.

API

Scopes: canvas:read to read the catalog and images, canvas:write to generate, edit and delete. Images are Saved Assets with contentType: "image": they come back from GET /api/v1/content?contentType=image, and the usual content routes rename, re-tag, link to a character, pin a version, and delete them.

GET/api/v1/canvas/catalogcanvas:read

models (key, label, notes, estimatedCredits for one 1024 × 1024 picture, default), editModels, cutoutModels, upscaleModels, sizes, and limits. The lists are operator-editable: read them rather than assuming keys.

POST/api/v1/canvas/generatecanvas:write
FieldTypeDescription
prompt*stringWhat to draw, up to 2000 characters
modelstringPicture model key from the catalog (omit for the default)
sizestringA named size (default square); or width and height
width · heightintegerMultiples of 16 between 256 and 2048, together
transparentbooleanRemove the background afterwards: a PNG with alpha
cutoutModelstringBackground-removal key (omit for the default)
namestringAsset name (letters, digits, underscores, hyphens; starts with a letter; ≤ 48). Omitted: from the prompt
projectIdstringSave into this project
characterIdstringThe character the picture belongs to; it is saved into that character’s project
tagsstring[]Up to 20

Synchronous. Answers 201 with { contentId, name, versionNumber, image: { url, width, height, mimeType, sizeBytes, transparent }, model, creditsCharged, content }. Credits are reserved when the call starts and settled to the vendor's cost; a failure refunds them.

curl

curl -X POST https://tonetta.io/api/v1/canvas/generate \
  -H "Authorization: Bearer $TONETTA_API_KEY" -H "Content-Type: application/json" \
  -d '{"prompt":"round brass compass icon, art deco, game UI, crisp edges","size":"square_small","transparent":true,"name":"Icon_Compass"}'
POST/api/v1/canvas/editcanvas:write
FieldTypeDescription
contentId*stringThe image (alias id)
instructionsstringWhat to change, in words. Optional when only cutting out or upscaling
modelstringEditor key from editModels (omit for the default)
cutoutbooleanRemove the background (after the edit)
cutoutModelstringBackground-removal key
upscalebooleanUpscale 2x (after the edit and the cutout)
upscaleModelstringUpscaler key

At least one of instructions, cutout, upscale. Answers 201 with the new version: { contentId, versionNumber, image, steps, creditsCharged, content }.

Conversations

The Canvas agent is four routes with the shape of the Forge conversation: POST /api/v1/canvas/sessions (a message with either a contentId to work on or a projectId for a new image), POST /api/v1/canvas/sessions/{contentId}/messages, GET /api/v1/canvas/sessions/{contentId} (the transcript, the current picture as sceneUrl, and whether the agent is still working), and POST /api/v1/canvas/sessions/{contentId}/export. Optional model (the agent's LLM), conceptModel and editModel pick the models it may call.

MCP

The same as tools: get_canvas_catalog, generate_image, edit_image, and for the conversation start_canvas_session, send_canvas_message, get_canvas_session, export_canvas_session, with the same arguments, filtered by the key's scopes. See MCP.