# Skin Texture Creator > A browser texture painter for 3D weapons, like Substance Painter. There is no server: everything > runs in the page. AI agents can use every feature through a JavaScript API on `window.skinApi`, > or, in browsers with WebMCP (`navigator.modelContext`), through tools named `skin_`. ## Using the app from an AI agent Open the page in a browser you control (Playwright, Puppeteer, a browser extension…) and run JavaScript in it. Every command takes one object and returns JSON (images and files: data URLs). Errors come back as `{ error }` with a hint. ```js await skinApi.help() // every command and its parameters (start here) await skinApi.help('addFillLayer') // one command in detail await skinApi.features() // weapons, fills, filters, mask generators, smart materials, presets, images, fonts… await skinApi.howTo('worn edges') // recipes: which commands make a look await skinApi.runRecipe('edge-wear') // run a recipe await skinApi.state() // open weapon, layer stack, selection, palette, bakes… await skinApi.call('addFillLayer', { type: 'camo', colors: ['#4b5320', '#6b4f2a', '#1f2418'] }) await skinApi.screenshot() // data URL of the 3D view: look at your work await skinApi.exportTexture({ channel: 'color', size: 1024 }) ``` Add `?weapon=SCAR` to the URL to open a weapon; `skinApi.openWeapon('M60')` switches later. ## Everything the interface can do - Main commands: layers, fills, smart materials, filters, masks, text and decals, colors, tools. - `appActions()` lists every app action (about 100: layer, mask, filter, selection, decal, bake, reference and history operations) with its arguments; `callApp({ action, args })` runs one. - `get({ path })` / `set({ path, value })` read and change any setting: `settings.*` (every tool, material painting, material brush, symmetry…), `display.*` (3D / UV view, lighting, environment, effects), `base.*`, `guides.*`, `stencil.*`, `pointAlign.*`. - Mouse and keyboard, exactly like a person: `stroke` (drag), `click`, `wheel` and `key` go through the app's own input handling, so on-canvas handles, rulers, the stencil and every keyboard shortcut work. `pick` tells what is under a point (face, UV, 3D point, part, color). - Files in: `importImage`, `importTextureLayer`, `importModel`, `importFont`, `loadEnvironment`, `openProject`, `references` (from http(s) URLs or data URLs). - Files out: `exportTexture`, `exportMaps` (export presets), `exportPsd`, `exportModel` (.glb), `exportRender`, `batchExport`, `saveProject` (download, or a data URL to reopen later). - Also: `bake` / `getMap` (mesh maps, high-poly normal / height), `presets` (tool, export, smart material, smart mask: list, apply, save, delete), `library`, `clipboard`, `history`, `lighting`, `newSkin`, `toolAction` (projection / path / shape / stamp buttons), `selection`, `closeDialogs`. ## How a skin is built - A skin is a stack of layers, bottom to top: paint layers, procedural fill layers (color, camo, patterns, metal finishes…), folders, editable text / decal layers. - Every layer has material channels (color, roughness, metallic, height, emissive), a blend mode, opacity, non-destructive filters, and an optional mask. - Masks are stacks of procedural steps (mesh edges, curvature, ambient occlusion, dirt, facing up, gradients, noise…) plus painted strokes. Realistic looks are fills shown through masks: a metal fill masked to the edges is edge wear, a dark fill masked to the crevices is grime. - Smart materials are ready-made stacks (worn gunmetal, rust, carbon fiber, camo…). - Commands work on the active layer unless you pass `layer` (id or name); a command that adds a layer makes it the active one. - Points for `stroke`, `click`, `wheel`, `pick` and `addText` are fractions of the 3D view (`space: "view"`, 0,0 = top-left, the same framing as `screenshot()`) or texture coordinates (`space: "uv"`). - `undo()` steps back. Work is autosaved in the browser.