---
name: pixat-xcho-agent
description: Organize Project folders and create, inspect, clone, and edit PIXAT Parts Rig Models through the account-scoped API. Use for model Concept Art, missing direction part assets, rig and Node mapping, animation clips, keyframes, metadata, publication, and copies.
metadata:
  version: "1.61.0"
  origin: "https://pixat.xcho.cc"
---

# PIXAT Xcho Agent

Use this skill when working with a user's PIXAT Parts Rig model through its Model API.

## Projects and Models

- A **Model** is one rigged character/asset with its own Concept Art, directions, Nodes, clips, publication and usage permissions. A **Project** is a private folder containing zero or more Models. Each Model belongs to at most one Project, or is unfiled. Folder membership does not grant access to Models; set each Model's visibility/permissions separately.
- For authoring, identify the Model by `modelId`; never pass a folder's `projectId` to a Model, atlas, animation or Studio Agent URL. Existing Model IDs and Studio URLs are unchanged. Read `/api/models` (`models` list, each item's `projectId` is its folder) and `/api/project-folders` (`projects` list) to resolve names. `/api/projects` is only a legacy alias for Models.
- For new work, clarify whether the user wants an empty Project folder, a new Model or a cloned Model, and the destination Project when it is unspecified. Do not ask again when already provided. Creating only an empty folder requires its name, not artwork/animation parameters. Read [Creation intake](references/project-intake.md) before creating/cloning Models.
- Create/rename/delete folders and move Models through the folder endpoints in [Model and Project API](references/project-api.md). Folder deletion keeps all Models and makes them unfiled. Owner Model clones inherit the source folder unless an explicit `projectId` destination (or null) is supplied; copies from other owners start unfiled. Read `modelId` from Clone responses, since canonical `projectId` means the destination folder.
- After Model creation/clone/edit, keep the required visible `/studio-agent/{modelId}` preview open. For folder-only work show `/account/projects` so the user can see its contents.

## API-first operation

- PIXAT uses subscriptions: creation/Clone consumes one monthly Model slot; successful external API calls consume one request. GET /api/subscription shows remaining quotas without consuming requests. Browser edits and image uploads have no credit debit. Compatibility credit-quote returns cost:0 and a creation ID; quota is enforced on the write. Preserve once-only creation IDs and loaded revision protection. Batch edits, avoid polling and handle 429 quota/rate/busy responses. Existing Models remain editable/exportable in every status. Never initiate Stripe payments or subscriptions as an Agent; the owner manages /account/subscription.

- Publication keeps Export enabled for all allowed viewers; only Clone Model (`copyTemplate`, one Model slot per copy consumed by the recipient) is configurable. Toggling Clone permission is free. PATCH publication with loaded If-Match changes only supplied fields and preserves status. Publication writes return a new revision; retain it. Visibility can be changed by the owner and does not lock edits or Export. Do not introduce marketplace price, purchases or resale settings. Use the live API reference for owner Clone versus copying another owner's shared model.

- Use the PIXAT Model API for authoring and **always open `/studio-agent/{modelId}` in a visible Web browser for every created, cloned or edited model**. Keep it open during API work so the user can watch saved changes. Follow **Live browser preview** below; a final link alone does not fulfill this requirement. This page shows Rig and realtime Animation previews with a direction gallery. Owners may manually drag mapped Nodes and Save; Agents still author through the API. Read model JSON through the API; there is no JSON panel or command console on this page. Never use normal Studio editor automation as an authoring fallback.
- For questions about which animations a model supports, read `GET /api/models/{id}/animations` and inspect its `clips` and selected animation data. Do not infer the model's animation list from Studio UI or from generic built-in preset names.
- Change mapped Node positions through Model-config writes, preserving part-local coordinates, shared attachment IDs and assembled Rig alignment. Do not switch to canvas dragging as an Agent authoring fallback. If a requested operation has no supported API route or config representation, report that limitation.
- Read [Studio Agent preview guide](references/studio-agent-commands.md) before result inspection. For requested downloads, read [Export and download Model assets](references/export-download.md). Authenticated export manifests return ready file URLs and Studio Agent preparation URLs; opening a preparation URL generates PNG/JSON or WebM once, then the auth helper downloads the files. The manual Export button also supports multiple mapped directions/clips. Select direction/Animation on the page or use URL parameters for bone overlays and paused frames. Author changes through the API; former console commands are unavailable. Opening Studio Agent for result inspection is part of this Skill's workflow; device authorization still requires the user's approval.

## Live browser preview

- **New or Clone:** as soon as the successful create/clone response returns the destination model ID, open `{PIXAT_ORIGIN}/studio-agent/{modelId}` visibly, before uploading assets or making further edits. An empty New Model may show an empty preview until its assets and Rig are saved. A Clone uses the new destination ID, not the source ID.
- **Existing model edits:** open or select that model's Studio Agent tab before the first write. This applies to metadata, Concept Art, atlas, Rig/Node, direction, Animation and publication changes, including small edits. Keep the tab visible throughout the save/review cycle.
- **After every successful save:** ensure the same model's tab is still open and visible, selecting the affected direction/clip when applicable. Reuse the tab rather than creating a new tab for each API request. Click the header **↻ โหลดข้อมูลล่าสุด** once after the save, or reload that same tab if the button is unavailable and no manual draft exists. Studio and Studio Agent do not poll revisions; becoming visible does not fetch saved changes. Animation is rendered locally in realtime. A user's unsaved Node or layer-order draft disables refresh and appears locally until Save or discard; coordinate with the user before API edits if a draft is active. Never discard or save a user's manual draft without their instruction.
- Use an available browser tool to actually open/select the page. Providing a URL, inspecting API JSON or opening normal Studio is not a substitute. Observe the refreshed result after a save; if it stays stale or shows an error, inspect the page and explicitly read the model if needed to resolve the cause before claiming the displayed result is current. Keep the final preview open and share its URL.
- If browser tooling or browser sign-in is unavailable, report the specific limitation and that live/visual review could not be completed. Do not claim the page was opened or reviewed. Browser sign-in is separate from the saved API credential; do not reconnect the API merely because the browser needs login. A Skill-documentation-only update does not create/edit a model or require opening an unrelated model.

## Public source images

Concept Art, Part crops and source atlases have public download URLs, even for private/Draft Models. Prefer the Model response's `images.conceptArt`, `images.atlases[direction]` and `images.parts[direction][partId]`, or atlas PUT's `url`. Resolve relative URLs on `PIXAT_ORIGIN` and download without credentials. `GET /api/models/{id}/images` returns only this image catalog without login. Image filenames are immutable content hashes; replacing artwork returns a new URL. Legacy embedded sources remain unchanged; v2 stores atlas/Concept Art URLs and derives Part canvases client-side from rect/mask metadata, so it has no individual Part download files. Model JSON, mutations, Clone and prepared exports retain their existing permissions. Published image URLs are not revoked by visibility changes or Model deletion.

## Access

- Check `GET /skills/pixat-xcho-agent/version.json` at the start of a task. Compare its version with this file's `metadata.version`. If the remote version is newer, tell the user the installed Skill is outdated and refresh every file listed in the manifest, including the Skill, linked authoring reference, API reference, and `authHelperUrl` from their Web URLs before continuing.
- This online Skill uses `https://pixat.xcho.cc` as `PIXAT_ORIGIN` for API requests, version checks and visible Studio Agent previews. Download Skill resources from the same origin under `/skills/pixat-xcho-agent/`. Do not silently switch to a localhost installation; its Models and authorization are separate. A request to use another PIXAT deployment must resolve its own Skill and origin first.
- On Windows, use the installed `scripts/pixat-auth.ps1` helper for connection and all API requests. It stores access/refresh credentials in Windows Credential Manager for the current Windows account, so separate Codex sessions and models on this machine reuse the same connection. Do not read, print, or copy the credential blob into chat, environment variables, or model files. Use `-Action connect` only when no local connection exists; it displays the PIXAT approval URL and code, waits for approval, and saves the credential. Use `-Action request` for API calls (`-Path`, `-Method`, optional `-Body` or `-BodyFile`, and `-ContentType`); the helper refreshes the 30-day access token automatically. Use `-Action disconnect` only when the user asks to remove the local saved credential. This removes local credentials; revoke server access separately from Account → AI Agent.
- Example: `powershell -NoProfile -ExecutionPolicy Bypass -File "<installed-skill-folder>\scripts\pixat-auth.ps1" -Action request -Origin "<PIXAT_ORIGIN>" -Path "/api/models" -Method GET`.
- Keep the integration identity stable across chats, sessions, Models and Projects. On Windows Codex use the helper defaults: `ClientId=pixat-xcho-agent-codex`, `ClientName=Codex PIXAT Xcho Agent`, and the computer name for `InstanceName`. Never generate a Client ID or name from the current task, project, model, session or a random value. Try `request` with the saved connection first; `connect` also checks and reuses an existing valid connection. On other platforms, use the documented PKCE flow and persist the same integration ID and installation label with the credentials. Reapproval of the same client and installation reuses its grant.
- The helper displays the `verification_uri` and `user_code`; ask the user to open it, sign in to PIXAT if needed, and approve the named AI. Do not claim connection until the helper reports that it saved the credential. For other platforms, poll the token endpoint at the specified interval until approval, denial, or expiry; continue on `authorization_pending` and increase the wait after `slow_down`.
- The device flow returns a 30-day access token and a persistent refresh token. Refresh tokens are bound to the approved connection and remain valid until that connection is revoked. On Windows the helper stores both in Credential Manager and rotates access tokens automatically. On other platforms, use an approved secure secret store for both tokens; never print them or put them in model files. If no secure store is available, keep credentials in memory only for that session and ask the user to reconnect when needed.
- Device authorization is explicit user consent for the client name and optional instance name it reports. PIXAT verifies the signed-in account and approval, but does not independently attest the requesting software's identity. Users can revoke one connection from Account → AI Agent; that connection's access and refresh tokens become invalid immediately while other installations keep access. If refresh is rejected, stop and ask the user to authorize this device again.


### Request helper, revisions, files and logs

Save, upload, clone and delete do not require revisions or If-Match. Read the relevant data once before editing; the latest successful Save replaces the stored data. Legacy revision response fields are empty compatibility fields.

```powershell
# The connection already exists in Credential Manager; no new approval is needed.
& '<skill-folder>/scripts/pixat-auth.ps1' -Action request -Origin '<PIXAT_ORIGIN>' -Path '/api/v2/models/<id>' -OutputFile '<work-folder>/project.json'
& '<skill-folder>/scripts/pixat-auth.ps1' -Action request -Origin '<PIXAT_ORIGIN>' -Path '/api/models/<id>/atlas/right' -Method PUT -BodyFile '<source.png>' -ContentType 'image/png'
& '<skill-folder>/scripts/pixat-auth.ps1' -Action request -Origin '<PIXAT_ORIGIN>' -Path '/api/models/<id>/atlas/right' -OutputFile '<work-folder>/source.png'
```

`-OutputFile` saves exact response bytes, including images. Do not pipe image output through text encodings. The helper records method, path, status and request ID under `%LOCALAPPDATA%/PIXAT/logs/api-YYYY-MM-DD.jsonl`; it omits tokens, payloads and query strings. On failures, keep HTTP status, request ID and error details, fix the stated cause and reread the affected model. A 403 is not automatically a reason to reconnect: check ownership, route and authorization scope. Reconnect only after the helper reports missing/revoked credentials or refresh failure. Never substitute browser session cookies to evade a rejected API request.

The API rejects invalid custom Rig graphs/mappings with 400 and field-specific `details`: missing Nodes, wrong endpoint owners, broken chains, cycles and incomplete bind coordinates. These structural checks do not infer anatomy or repair badly measured positions for the Agent.

## Revoked access

- The user can revoke one connection at any time from Account → AI Agent. Once revoked, that connection's model API access stops.
- If the helper reports a revoked connection or failed refresh, stop API work and ask the user to Login and connect this AI again. Do not try another account session or reuse a revoked authorization.

## Model workflow

For request and response fields, read the live API reference at `{PIXAT_ORIGIN}/skills/pixat-xcho-agent/references/project-api.md` when needed.

**New Models use API v2 atlas-only assets.** Read [Atlas-only assets and API versioning](references/atlas-v2.md) before creation or asset writes. Create with `/api/v2/models` and `assetVersion: 2`; store one atlas per direction, Part `rect` and optional pixel mask, never cropped Part `src`. Existing Models/Clones keep their asset version: use the legacy `/api/models` prefix for full writes of crop-image Models, and `/api/v2/models` for atlas-only Models. The Rig document's existing `version: 2` is separate. Read through v2 to discover either representation. Do not automatically convert a legacy Model. In the endpoint examples below, choose the Model prefix by its asset version.

1. **Ask before creating a model.** Read [Model creation questions](references/project-intake.md). Ask whether the user wants **New Model (build from scratch)** or **Clone Model (start from an existing model)** when they have not explicitly chosen. Then collect the required parameters and offer optional settings in one bundled question appropriate to that mode. Prefill answers already supplied; never silently choose New just because artwork is attached. Wait for missing required answers before model creation, cloning or image generation. This intake applies to creation requests, not documentation updates or edits to an existing model.
2. Call `GET /api/models` when needed to identify a requested Model by ID or name, and `GET /api/project-folders` to resolve its destination Project. Use Model IDs for artwork, Rig and Animation operations, and folder IDs only for Project folder operations and membership.
3. **New Model:** Use the directions and parameters collected in the intake. Start with `modelType: "custom-rig"` and `assetVersion: 2`. Do not use or copy `human-basic` Nodes. Create with `POST /api/v2/models` following [Atlas-only assets](references/atlas-v2.md). If the user supplies Concept Art, preserve the original in `config.conceptArt` and follow **Concept Art and missing directions** below to generate the requested atlases. Upload each requested PNG/WebP atlas, store its URL and Part rect/mask metadata without cropped Part src, and write Node IDs, hierarchy, Paths and per-direction Rig coordinates. Every animation Node must be one of the model's custom Node IDs. Create clips only after Rig checks pass; do not carry over clips from another model unless asked.
4. **Clone Model:** Read the source and its config, then call `POST /api/models/{id}/clone` without a revision header. The independent clone starts with copied model data, Nodes, Rig, Animation, and image assets. Keep these as the starting point. If the user requests new images or Rig mapping, upload replacement atlases and update only the relevant part/Rig config while preserving Animation data and Node IDs where possible; edit clips only as requested. If Nodes must change, reconcile or retarget the copied clips rather than silently dropping them.
5. Read `GET /api/v2/models/{id}` to inspect its config, directions, node hierarchy and custom nodes. For Animation work, read `GET /api/models/{id}/animations`; use its `nodeIds` and existing clips to preserve the model's conventions.
6. If the user asks about engagement or copies, call the owner-scoped `GET /api/project-analytics` endpoint for the 30-day activity chart, per-project exports, and copy recipients.
7. Change only the requested model data. Use `PATCH /api/models/{id}` for name/description, `PUT /api/models/{id}/publication` for visibility and usage permissions, and direction-specific Animation endpoints for keyframes/clips. Avoid replacing full configs for narrow Animation edits.
8. Save the requested changes without If-Match or expectedRevision. Report the changed directions, frames and Nodes.
9. Follow **Live browser preview** throughout creation/editing, not only at the end. After each successful save, ensure the model's visible Studio Agent tab reflects the saved changes. Visually review each changed direction/clip, including Bind alignment and loop motion for Rig/Animation changes. Keep the final preview open and provide its URL. If browser access is unavailable, state that live/visual review remains unverified; API success alone does not prove visual quality.

## Concept Art and missing directions

Read [Concept Art to direction parts](references/concept-to-directions.md) when the model starts from a complete character image or a requested direction has no part atlas. Persist the original image bytes/hash under the Skill convention `config.conceptArt` through the existing Model API. Generate actual target-view parts using the available image tool with that original as the identity reference, inspect them, upload the atlas, measure that view's Rig, and review Bind/requested motion in Studio Agent. Keep original Concept Art separate from generated direction assets; preserve existing views/clips. These config extensions do not create a new image-generation API or Studio upload control. A workflow-documentation request alone does not initiate generation.

Before generating or accepting paired arms, follow the reference's **Paired limbs and which side of the hand is visible** section. Specify each arm's anatomical side, near/far role and visible hand surface in the prompt, then inspect both hand crops and assembled Bind. Do not accept a duplicated dorsal glove where the resolved pose requires the opposite hand's palm/finger side; correct the artwork before rigging it.

Read **Hands and fingers in all eight directions** in the same reference for every requested view. Its eight-direction table uses a stated relaxed pose and body-relative camera; adapt it to the actual forearm/wrist pose. Verify thumb/digit anatomy, visible palm/back/edges and occlusion per view, then inspect Bind and visible-hand Animation poses. Do not propagate a wrong hand by copying/mirroring another atlas or assume a corrected direction validates the rest.

For Concept Art fidelity or reported design drift, follow **Keep the character faithful to Concept Art** in that reference. Extract a specific design checklist, reuse supplied views, resolve a faithful whole character before separating parts, and compare the assembled/saved Bind at a common scale. Diagnose artwork versus mapping versus Animation distortion, then correct the affected source. Reference-guided generation plus visual review improves fidelity but does not guarantee an exact new view.

Attachments must be invisible in the assembled artwork: no puppet/doll joint discs, pins, socket rings, artificial gaps or outlined cut ends. Continue the clothing/skin/surface palette and texture from pixels adjacent to each cut into concealed overlaps; preserve crisp pixel-art edges. Follow **Invisible attachment seams** in the Concept Art reference, include it in image prompts and inspect Bind/requested motion with overlays off. Rig Nodes remain editable metadata, not painted joints.

## Rig mapping from scratch

Before generating, extracting or accepting part artwork, follow **Match part boundaries to their attachment joints** in [Concept Art to direction parts](references/concept-to-directions.md). The torso must reach the shoulder sockets while each arm owns its moving shoulder cap/sleeve and begins at that same pivot. Remove stationary arm/sleeve remnants from the torso; use only concealed seam overlap. Apply equivalent cuts at neck, hips and other attachments, then compare reassembled Bind with the reference. A rectangular crop or corrected Node position alone cannot fix duplicate anatomy in the artwork.

Before rigging, read [Rig mapping and animation authoring](references/rig-and-animation.md). It defines crop/canvas coordinates, shared attachment Nodes, main chains versus torso branches, bind assembly, joint rotation and motion acceptance checks. New Models start empty; the Agent must measure their anatomy and create all Nodes and mappings. Atlas upload alone does not rig a character.

## Animation rules

- New Models use `custom-rig` and define their Nodes from scratch. Existing `human-basic` models and Clones retain their source model type. Directions are the eight compass directions listed by the API reference.
- In `custom-rig`, only IDs in the model's `customNodes` are valid Animation Nodes; there are no implicit standard skeleton Nodes. Give root Nodes `parent: null`, and use `beforeNode` to order Nodes along a Path. Define a `rig` position (`x`, `y` in canvas pixels) for every Node in every configured direction. `GET /api/models/{id}/animations` returns the allowed IDs in `nodeIds`.
- Custom animation uses frames 0–24 and a `nodes` array per frame. Each node object is keyed by `id` and may specify `x`, `y`, `rotation`, `scaleX`, and `scaleY`.
- `x` and `y` are offsets in the parent's local axes, measured in canvas pixels (root offsets are canvas-space). Rotation is **Z-only**: use `rotation` in clockwise degrees. Do not author `rotationX` or `rotationY`; legacy values are ignored in preview/export and omitted on animation/Model writes. Scales multiply through the hierarchy. Use translation and positive scale for view-specific projected motion, including front/back foot lift; read [Z-only rotation and projected movement](references/depth-rotation.md). Omitted transform fields use neutral values. Only edit nodes the user requested or necessary for the requested motion.
- `/idle`, `/walk`, `/run` write static Node overrides, not keyframe sequences. Basic Human has preset motion; a new custom rig has no automatic human gait. Author `clips.run` or `clips.walk` through `/clips`; a named clip takes precedence over that built-in name.
- Add project-specific animation names such as `jump`, `die`, or `explorer` with `PUT /api/models/{id}/animations/{direction}/clips`. Send a `clips` object keyed by clip name; each value has its own `fps`, optional `frameCount`, and `frames`. To make one of those clips active, set `animation` to the same name in that request. Any submitted clip name can be selected.
- The `/clips` endpoint replaces the entire named-clip collection for that direction. Read the current clips first and include them in the request when they should be preserved while adding or changing a clip. Clip names must match `[a-z][a-z0-9_-]{0,31}`; a clip can contain up to 25 frames numbered 0–24.
- A `PUT` to `/custom` replaces all keyframes for that direction's custom animation; a `PUT` to `/idle`, `/walk`, or `/run` replaces that direction's overrides for the selected preset. Preserve unrelated animation data by using the narrow endpoint and including the complete requested set for that animation.
- When the user specifies animation length, always send explicit `frameCount` (integer 1–25). Named clips store it inside that clip; `/custom` stores it on the direction; preset endpoints store it in direction `animationFrameCounts[name]`. At FPS 30, count 12 means frames 0–11 and duration 0.4 s. Do not confuse it with current frame or number of keys. Keep an optional matching closing key at 12 for loop interpolation; preserve keys beyond the active boundary, and do not silently retime or delete them. Verify the saved count after writing and open Studio Agent.
- FPS and frame numbers must be integers: FPS 1–30, frames 0–24. For a repeating clip with explicit `frameCount: N`, author samples 0–N-1 and calculate cycle phase using `j / N`. When N is 1–24, an optional closing key at N can copy frame 0 exactly for interpolation; it is excluded from playback/export. Count 25 uses samples 0–24 and cannot store a closing key at 25; review the last-to-first transition without promising interpolation across that boundary. Count 1 is a single pose. Without an explicit count, matching first/final transforms at frame N infer N playback samples; nonmatching endpoints infer N+1. After saving, reread `/animations` and verify the count, Nodes, frames, FPS and unchanged directions/clips.

### Authoring and quality checks

Read [Rig mapping and animation authoring](references/rig-and-animation.md) before authoring motion, especially **Choose transforms for the viewing direction**. Use rotation, parent-local translation and scale together when the view requires them; there is no rotation-only rule. Front/back foot lift often needs projected shortening plus knee/ankle translation, while side-view articulation can usually use rotations. Derive joint limits from actual anatomy, distinguish anatomical length from projected 2D length, and let equipment inherit its host. Validate saved data and rendered motion; state visual verification limits.

For projected motion toward/away from the viewer, use [Z-only rotation and projected movement](references/depth-rotation.md). Author `rotation` for Z, with parent-local translation and positive scale for projected foot lift and contact correction. Do not send X/Y rotation; legacy angles have no effect in preview or export. Artwork remains flat and requires suitable surfaces when a palm, sole or reverse side becomes visible.

For `run`, also read [Reproduce a smooth running cycle](references/run-cycle.md). Follow its measured role-to-Node mapping, contact schedule, view-specific pose generation, coordinated body/arm motion, named-clip API save and Studio Agent review loop. Use planar IK converted to local rotations for suitable side views, and projected poses with translation/scale for depth motion in front/back or diagonal views. Adapt the calibrated parameters to the actual character and each direction; do not copy example geometry or joint signs. Continue correcting the saved motion until contact, joint limits, deformation and loop continuity pass the requested visual review.

## Export/download

For a complete Sprite/Part download, use **Full Export Sprite · ZIP** in the owner's Studio Agent header or Export dialog. It bundles every mapped direction, every available Animation (including Bind), and every mapped Part PNG in one ZIP, independent of selection checkboxes. It renders locally using the current visible draft and preserves preview/edit state; it does not upload artifacts or create a server download URL. See [export-download.md](references/export-download.md) for the archive layout and limits. Never describe the ZIP as a saved revision when a draft is included.

For a requested Sprite Sheet/WebM, GET `/api/models/{id}/exports/{direction}/{animation}`. Reuse the latest ready files or open its `prepareUrls` in the signed-in browser to generate them. Download returned file URLs with `pixat-auth.ps1 -Action request -OutputFile`; follow [export-download.md](references/export-download.md) for formats and bounded preparation. API GET does not render, and file URLs require owner authentication.

## PIXAT routes

- `GET /api/models` lists account models. `GET /api/models/{id}` reads the full model. Use `POST /api/models/{id}/clone` to make an independent Draft from an owned model without If-Match. Use `PATCH /api/models/{id}` for name or description edits.
- `GET /api/models/{id}/animations` returns the available `nodeIds` and each direction's keyframes and preset overrides.
- A New Model config must set `modelType: "custom-rig"`, define `customPaths` and `customNodes`, and include `configurations.custom-rig[direction].rig` coordinates. Path `connections` name the two endpoint Node IDs; each endpoint must also exist in `customNodes`. Custom Node IDs use `node-...`, Path IDs use `path-...`; roots may have `parent: null`. Do not include `human-basic` Node IDs in a new Model. A Clone keeps the copied model type and Nodes unless the user requests a remap.
- Upload a PNG or WebP atlas with `PUT /api/models/{id}/atlas/{direction}` using the image bytes as the request body and the matching `Content-Type`; limits are 25 MB and 16 megapixels. Atlas PUT/DELETE do not require revisions. Read an uploaded source image from its returned `url`; legacy `GET /api/models/{id}/atlas/{direction}` redirects to those PNG/WebP bytes without authentication. Atlas PUT returns a public `url`; Model GET includes an `images` catalog of direct Concept Art/atlas/crop URLs. Image GET requires no login, independent of Model visibility; Studio uses public image reads when opening/selecting a direction. Mapped part crops, bones, and Rig data remain in model `config` through `PUT /api/models/{id}`.
- Replace custom frames with `PUT /api/models/{id}/animations/{direction}/custom` and a JSON body containing `fps`, optional `frameCount`, and `frames: [{frame, nodes: [{id, x, y, rotation, scaleX, scaleY}]}]`.
- Replace a built-in pose's node overrides with `PUT /api/models/{id}/animations/{direction}/{idle|walk|run}`, using `{fps, nodes: [{id, x, y, rotation, scaleX, scaleY}]}`.
- Add or replace named clips with `PUT /api/models/{id}/animations/{direction}/clips`, using `{animation, clips: {<name>: {fps, frameCount, frames: [{frame, nodes: [{id, x, y, rotation, scaleX, scaleY}]}]}}}`. The `clips` object is the complete named-clip set for that direction; include existing clips you want to keep. `animation` may be a built-in name or any clip name included in `clips`, such as `jump`.
- Model/Animation/Project mutations do not generate, store or validate revision tokens.
- Directions: `front`, `front-right`, `right`, `back-right`, `back`, `back-left`, `left`, `front-left`. Custom frame numbers are 0–24. `x`/`y` are parent-local offsets in canvas pixels (canvas-space at roots), rotation is degrees, and scales are multipliers from 0.1 to 8. Each write replaces the selected animation data for that direction only.
- List and create models with `GET` and `POST /api/models`. Read, replace, or delete one model at `/api/models/{id}`. Prefer `PATCH` or the animation endpoints so unrelated model data is preserved.
- Never call standalone revision endpoints or poll Model data. After API saves, refresh the visible Studio Agent tab once.
