{"openapi":"3.0.3","info":{"title":"pixelart","version":"1.0.0","description":"Pixel art canvas for agents: create sprites, draw pixels programmatically, publish engine-ready animations, and share editable URLs. Full agent guide: https://pixelart.withzero.xyz/llms.txt"},"servers":[{"url":"https://pixelart.withzero.xyz"}],"paths":{"/api/v1/canvas":{"post":{"operationId":"post__api_v1_canvas","summary":"Create a new pixel art canvas. Returns editing, manifest, full-spec, guide, and interactive-view URLs. Optionally pre-load base64 RGBA pixels. Full agent guide: https://pixelart.withzero.xyz/llms.txt","x-payment-info":{"method":"tempo","currency":"USDC","amount":"0.01","sku":"pixelart.canvas.create","pricingVersion":1},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"fps":{"description":"Playback rate for animation consumers.","type":"integer","minimum":1,"maximum":60},"loop":{"default":true,"description":"Whether playback loops (false = play once).","type":"boolean"},"width":{"description":"Canvas width in pixels (8–256). Default: 64.","default":64,"type":"integer","minimum":8,"maximum":256},"height":{"description":"Canvas height in pixels (8–256). Default: 64.","default":64,"type":"integer","minimum":8,"maximum":256},"name":{"description":"Human-readable label for this canvas.","type":"string","maxLength":100},"game":{"description":"Optional engine metadata: pivots, facing, root motion, clips, sockets, boxes, and events.","type":"object","properties":{"defaultPivot":{"description":"Default render pivot shared by frames without an override.","type":"object","properties":{"x":{"type":"number","description":"Horizontal pixel coordinate from the left edge of the frame."},"y":{"type":"number","description":"Vertical pixel coordinate from the top edge of the frame."}},"required":["x","y"],"additionalProperties":false},"facing":{"description":"Native facing direction of the authored art.","type":"string","enum":["left","right","none"]},"rootMotion":{"description":"Whether movement is in-place or derived from a named socket.","anyOf":[{"type":"string","const":"none"},{"type":"object","properties":{"socket":{"description":"Socket whose movement represents root motion.","type":"string","minLength":1,"maxLength":64}},"additionalProperties":false}]},"clips":{"description":"Named animation ranges within this canvas.","maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"fromFrame":{"type":"integer","minimum":0,"maximum":9007199254740991},"toFrame":{"type":"integer","minimum":0,"maximum":9007199254740991},"fps":{"type":"integer","minimum":1,"maximum":60},"loop":{"type":"boolean"}},"required":["name","fromFrame","toFrame"],"additionalProperties":false}},"frames":{"description":"Metadata keyed by canonical zero-based frame index.","type":"object","propertyNames":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"additionalProperties":{"type":"object","properties":{"durationMs":{"description":"Per-frame duration override. Omit to use the clip or canvas FPS.","type":"integer","minimum":1,"maximum":60000},"pivot":{"description":"Per-frame pivot override. Omit to use defaultPivot.","type":"object","properties":{"x":{"type":"number","description":"Horizontal pixel coordinate from the left edge of the frame."},"y":{"type":"number","description":"Vertical pixel coordinate from the top edge of the frame."}},"required":["x","y"],"additionalProperties":false},"sockets":{"description":"Named attachment points such as feet, muzzle, hand, or weapon.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal pixel coordinate from the left edge of the frame."},"y":{"type":"number","description":"Vertical pixel coordinate from the top edge of the frame."}},"required":["x","y"],"additionalProperties":false}},"boxes":{"description":"Gameplay geometry associated with this frame.","maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["hit","hurt","collision","interaction"]},"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}},"required":["kind","x","y","width","height"],"additionalProperties":false}},"events":{"description":"Events emitted when playback enters this frame.","maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["name"],"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"initData":{"description":"Base64-encoded RGBA pixel data to initialise the canvas. Must be exactly width × height × 4 bytes after decoding. Omit to start with a transparent (empty) canvas.","type":"string","minLength":1,"maxLength":349528}},"required":["loop"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response after payment","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Canvas UUID — use in all subsequent API calls."},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"viewUrl":{"type":"string","description":"URL to the interactive pixel editor pre-loaded with this canvas."},"apiUrl":{"type":"string","description":"Base API URL for this canvas."},"ansiUrl":{"type":"string","description":"URL that returns ANSI half-block art of the canvas. Pipe via `curl <ansiUrl>` to render in any terminal or agent context."},"manifestUrl":{"type":"string","description":"Engine-ready animation manifest for this mutable canvas."},"fullSpecUrl":{"type":"string","description":"Complete OpenAPI surface including free editing routes."},"guideUrl":{"type":"string","description":"Holistic agent workflow guide."}},"required":["id","width","height","viewUrl","apiUrl","ansiUrl","manifestUrl","fullSpecUrl","guideUrl"],"additionalProperties":false}}}},"402":{"$ref":"#/components/schemas/PaymentRequired"}}}},"/api/v1/canvas/import":{"post":{"operationId":"post__api_v1_canvas_import","summary":"Convert a public PNG/JPEG/WebP/GIF or base64 image into an editable, palette-quantized pixel canvas. Full agent guide: https://pixelart.withzero.xyz/llms.txt","x-payment-info":{"method":"tempo","currency":"USDC","amount":"0.01","sku":"pixelart.canvas.import","pricingVersion":1},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"imageData":{"description":"Base64-encoded image bytes (PNG / JPEG / WebP / GIF). Max 2 MB encoded (≈1.5 MB actual).","type":"string"},"imageUrl":{"description":"Publicly accessible image URL to fetch server-side. Max 5 MB.","type":"string","format":"uri"},"width":{"default":64,"description":"Target canvas width in pixels. Default 64.","type":"integer","minimum":4,"maximum":256},"height":{"default":64,"description":"Target canvas height in pixels. Default 64.","type":"integer","minimum":4,"maximum":256},"scaleMode":{"default":"nearest","description":"nearest = pixel-art-preserving (best for existing pixel art). smooth = Lanczos3 downscale (best for photos → pixel art).","type":"string","enum":["nearest","smooth"]},"colors":{"description":"Quantize result to N distinct colors using median-cut. Omit to keep full color fidelity.","type":"integer","minimum":2,"maximum":256},"fit":{"default":"contain","description":"fill = stretch; contain = letterbox; cover/crop = crop to fill. Default contain.","type":"string","enum":["fill","contain","cover","crop"]},"background":{"description":"[r, g, b, a] fill color for letterbox padding. Default transparent.","type":"array","prefixItems":[{"type":"integer","minimum":0,"maximum":255},{"type":"integer","minimum":0,"maximum":255},{"type":"integer","minimum":0,"maximum":255},{"type":"integer","minimum":0,"maximum":255}]},"name":{"description":"Canvas name. Shown in the viewer tab.","type":"string","maxLength":100},"fps":{"description":"Default playback rate for frames added after import.","type":"integer","minimum":1,"maximum":60},"loop":{"default":true,"description":"Whether animation playback loops by default.","type":"boolean"},"game":{"description":"Optional engine metadata for the imported art.","type":"object","properties":{"defaultPivot":{"description":"Default render pivot shared by frames without an override.","type":"object","properties":{"x":{"type":"number","description":"Horizontal pixel coordinate from the left edge of the frame."},"y":{"type":"number","description":"Vertical pixel coordinate from the top edge of the frame."}},"required":["x","y"],"additionalProperties":false},"facing":{"description":"Native facing direction of the authored art.","type":"string","enum":["left","right","none"]},"rootMotion":{"description":"Whether movement is in-place or derived from a named socket.","anyOf":[{"type":"string","const":"none"},{"type":"object","properties":{"socket":{"description":"Socket whose movement represents root motion.","type":"string","minLength":1,"maxLength":64}},"additionalProperties":false}]},"clips":{"description":"Named animation ranges within this canvas.","maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"fromFrame":{"type":"integer","minimum":0,"maximum":9007199254740991},"toFrame":{"type":"integer","minimum":0,"maximum":9007199254740991},"fps":{"type":"integer","minimum":1,"maximum":60},"loop":{"type":"boolean"}},"required":["name","fromFrame","toFrame"],"additionalProperties":false}},"frames":{"description":"Metadata keyed by canonical zero-based frame index.","type":"object","propertyNames":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"additionalProperties":{"type":"object","properties":{"durationMs":{"description":"Per-frame duration override. Omit to use the clip or canvas FPS.","type":"integer","minimum":1,"maximum":60000},"pivot":{"description":"Per-frame pivot override. Omit to use defaultPivot.","type":"object","properties":{"x":{"type":"number","description":"Horizontal pixel coordinate from the left edge of the frame."},"y":{"type":"number","description":"Vertical pixel coordinate from the top edge of the frame."}},"required":["x","y"],"additionalProperties":false},"sockets":{"description":"Named attachment points such as feet, muzzle, hand, or weapon.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal pixel coordinate from the left edge of the frame."},"y":{"type":"number","description":"Vertical pixel coordinate from the top edge of the frame."}},"required":["x","y"],"additionalProperties":false}},"boxes":{"description":"Gameplay geometry associated with this frame.","maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["hit","hurt","collision","interaction"]},"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}},"required":["kind","x","y","width","height"],"additionalProperties":false}},"events":{"description":"Events emitted when playback enters this frame.","maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["name"],"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"canvasId":{"description":"If provided, overwrite an existing canvas instead of creating a new one.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["width","height","scaleMode","fit","loop"],"additionalProperties":false,"example":{"imageUrl":"https://httpbin.org/image/png","width":64,"height":64}}}}},"responses":{"200":{"description":"Successful response after payment","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"viewUrl":{"type":"string"},"apiUrl":{"type":"string"},"ansiUrl":{"type":"string","description":"URL that returns ANSI half-block art — pipe via `curl <ansiUrl>` to render in any terminal or agent context."},"manifestUrl":{"type":"string","description":"Engine-ready animation manifest for this mutable canvas."},"fullSpecUrl":{"type":"string","description":"Complete OpenAPI surface including free editing routes."},"guideUrl":{"type":"string","description":"Holistic agent workflow guide."},"colorCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Distinct RGBA colors in the imported result."}},"required":["id","width","height","viewUrl","apiUrl","ansiUrl","manifestUrl","fullSpecUrl","guideUrl","colorCount"],"additionalProperties":false}}}},"402":{"$ref":"#/components/schemas/PaymentRequired"}}}},"/api/v1/canvas/{id}/animate":{"post":{"operationId":"post__api_v1_canvas__id__animate","summary":"Generate a flattened animation cycle through Retro Diffusion and atomically replace the canvas frames. This is the legacy external-provider compatibility route; use segmentation plus layer transforms when authored, deterministic motion is required. Full agent guide: https://pixelart.withzero.xyz/llms.txt","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"example":"db940b97-ccf6-4843-bdf4-429d4a937847"}],"x-payment-info":{"method":"tempo","currency":"USDC","amount":"0.3","sku":"pixelart.canvas.animate","pricingVersion":1},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"preset":{"type":"string","enum":["walking","idle","jump","crouch","attack","destroy","custom_action","subtle_motion"],"description":"Animation preset. 'custom_action' animates whatever `prompt` describes; 'subtle_motion' adds ambient life to scenes."},"frames":{"default":8,"description":"Frame count of the generated cycle.","anyOf":[{"type":"number","const":4},{"type":"number","const":6},{"type":"number","const":8},{"type":"number","const":10},{"type":"number","const":12},{"type":"number","const":16}]},"prompt":{"description":"Motion description, e.g. 'confident steady walk, cape flowing'. Required for custom_action.","type":"string","maxLength":300},"provider":{"default":"retrodiffusion","description":"Animation backend. Retro Diffusion redraws the sprite per frame from your canvas as the start frame.","type":"string","enum":["retrodiffusion"]}},"required":["preset","frames","provider"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response after payment","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"canvasId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"frameCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total animation frames on the canvas after generation."},"provider":{"type":"string"},"viewUrl":{"type":"string"}},"required":["canvasId","frameCount","provider","viewUrl"],"additionalProperties":false}}}},"402":{"$ref":"#/components/schemas/PaymentRequired"}}}},"/api/v1/canvas/{id}/animation-jobs":{"post":{"operationId":"post__api_v1_canvas__id__animation_jobs","summary":"Create a paid, non-destructive first-party animation job through durable remote dispatch. The engine redraws locked target poses through a swappable reference-image model, generates recursive in-betweens with deterministic pixel flow, normalizes every frame to one palette and anchor, verifies motion/identity/topology, and publishes a reviewable draft. Poll the returned status URL while the remote worker runs; the editable canvas changes only after explicit application. The request escrows its exact price and settles only after durable acceptance: $0.60 without smoothing, or $0.80 for the default one-pass and optional two-pass modes. Full agent guide: https://pixelart.withzero.xyz/llms.txt","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"example":"db940b97-ccf6-4843-bdf4-429d4a937847"}],"x-payment-info":{"method":"tempo","currency":"USDC","amount":"0.6","sku":"pixelart.canvas.animation-jobs.create","pricingVersion":1,"unitType":"request","amountKind":"unit_price","maxAmount":"0.80","intent":"session","suggestedDeposit":"0.80"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sourceFrame":{"default":0,"type":"integer","minimum":0,"maximum":255},"clipName":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"targetFrameCount":{"type":"number","const":4},"smoothingPasses":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"frameCount":{"anyOf":[{"type":"number","const":4},{"type":"number","const":6},{"type":"number","const":8}]},"fps":{"type":"integer","minimum":1,"maximum":60},"loop":{"type":"boolean"},"motion":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"preset"},"preset":{"type":"string","enum":["idle","walk","attack","jump","hurt"]},"prompt":{"type":"string","minLength":1,"maxLength":500},"strength":{"default":"medium","type":"string","enum":["subtle","medium","large"]}},"required":["kind","preset","strength"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"custom"},"prompt":{"type":"string","minLength":1,"maxLength":800},"keyPoses":{"maxItems":7,"type":"array","items":{"type":"object","properties":{"frameIndex":{"type":"integer","minimum":1,"maximum":7},"label":{"type":"string","minLength":1,"maxLength":64},"instruction":{"type":"string","minLength":1,"maxLength":300}},"required":["frameIndex","label","instruction"],"additionalProperties":false}}},"required":["kind","prompt"],"additionalProperties":false}]}},"required":["sourceFrame","motion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response after payment","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"canvasId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","ready","needs_review","failed"]},"engineVersion":{"type":"string","const":"pixel-redraw-v1"},"source":{"type":"object","properties":{"frameIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sourceHash":{"type":"string"},"contentUpdatedAt":{"type":"string"}},"required":["frameIndex","width","height","sourceHash","contentUpdatedAt"],"additionalProperties":false},"frameCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"statusUrl":{"type":"string"},"created":{"type":"boolean"}},"required":["jobId","canvasId","status","engineVersion","source","frameCount","statusUrl","created"],"additionalProperties":false}}}},"402":{"$ref":"#/components/schemas/PaymentRequired"}}}},"/api/v1/canvas/{id}/segment/semantic":{"post":{"operationId":"post__api_v1_canvas__id__segment_semantic","summary":"Group deterministic regions into named animation parts such as head, body, cape, limbs, and held items. Dry-run by default; materialization is revision-guarded and replaces only the selected frame by default. Full agent guide: https://pixelart.withzero.xyz/llms.txt","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"example":"db940b97-ccf6-4843-bdf4-429d4a937847"}],"x-payment-info":{"method":"tempo","currency":"USDC","amount":"0.02","sku":"pixelart.canvas.segment.semantic","pricingVersion":1},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"frame":{"default":0,"description":"Frame to segment. Default 0 (the primary canvas).","type":"integer","minimum":0,"maximum":9007199254740991},"maxObjects":{"default":6,"description":"Upper bound on named objects the vision model may return. Default 6.","type":"integer","minimum":2,"maximum":12},"hint":{"description":"Optional context for the vision model, e.g. \"a lich king boss holding a staff\" — improves part naming and grouping.","type":"string","maxLength":500},"materialize":{"default":false,"description":"When true, create one layer per detected object (largest = zIndex 0) with its cel on the target frame.","type":"boolean"}},"required":["frame","maxObjects","materialize"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response after payment","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"canvasId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"frame":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"objects":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Object name chosen by the vision model (e.g. \"staff\", \"cape\", \"head\")."},"pixelCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bbox":{"type":"object","properties":{"x":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"y":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"w":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["x","y","w","h"],"additionalProperties":false},"centroid":{"type":"object","properties":{"x":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"y":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["x","y"],"additionalProperties":false},"layerId":{"description":"Present when materialize=true.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["name","pixelCount","bbox","centroid"],"additionalProperties":false},"description":"Detected objects, largest first. Occluded parts (e.g. a staff split by a gripping hand) are grouped into one object."},"materialized":{"type":"boolean"}},"required":["canvasId","frame","objects","materialized"],"additionalProperties":false}}}},"402":{"$ref":"#/components/schemas/PaymentRequired"}}}},"/api/v1/canvas/{id}/sprite-sheet-releases":{"post":{"operationId":"post__api_v1_canvas__id__sprite_sheet_releases","summary":"Publish a content-addressed PNG sprite sheet and deterministic JSON engine manifest. Repeating the same source and layout returns the same immutable release URLs. Full agent guide: https://pixelart.withzero.xyz/llms.txt","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"example":"db940b97-ccf6-4843-bdf4-429d4a937847"}],"x-payment-info":{"method":"tempo","currency":"USDC","amount":"0.02","sku":"pixelart.canvas.sprite-sheet-releases.create","pricingVersion":1},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"columns":{"description":"Frame columns. Defaults to ceil(sqrt(frameCount)).","type":"integer","minimum":1,"maximum":1024},"padding":{"default":0,"description":"Transparent gap in source pixels. Default 0.","type":"integer","minimum":0,"maximum":16},"scale":{"default":1,"description":"Nearest-neighbor integer scale. Default 1.","type":"integer","minimum":1,"maximum":8}},"required":["padding","scale"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response after payment","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"releaseId":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"spriteSheetHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"manifestUrl":{"type":"string","format":"uri"},"spriteSheetUrl":{"type":"string","format":"uri"},"spriteSheetSizeBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"columns":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"rows":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"padding":{"type":"integer","minimum":0,"maximum":9007199254740991},"scale":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"frames":{"type":"array","items":{"type":"object","properties":{"frameIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"x":{"type":"integer","minimum":0,"maximum":9007199254740991},"y":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["frameIndex","x","y","width","height"],"additionalProperties":false}},"created":{"type":"boolean","description":"False when this exact content-addressed release already existed."}},"required":["releaseId","sourceHash","spriteSheetHash","manifestUrl","spriteSheetUrl","spriteSheetSizeBytes","width","height","columns","rows","padding","scale","frames","created"],"additionalProperties":false}}}},"402":{"$ref":"#/components/schemas/PaymentRequired"}}}},"/api/v1/canvas/{id}/export.gif":{"get":{"operationId":"get__api_v1_canvas__id__export_gif","summary":"Export the composited animation as GIF89a bytes. Query overrides: fps=1..60; scale=1..8 (default 4); loop=true|false; transparent=true|false (default true). Stored FPS and loop are used when omitted. Full agent guide: https://pixelart.withzero.xyz/llms.txt","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"example":"db940b97-ccf6-4843-bdf4-429d4a937847"}],"x-payment-info":{"method":"tempo","currency":"USDC","amount":"0.02","sku":"pixelart.canvas.export.gif","pricingVersion":1},"responses":{"200":{"description":"Successful response after payment","content":{"image/gif":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"GIF89a binary image bytes with centisecond delays distributed to approximate the requested FPS.","type":"string","format":"binary"}}}},"402":{"$ref":"#/components/schemas/PaymentRequired"}}}}},"components":{"schemas":{"PaymentRequired":{"type":"object","description":"x402/MPP 402 advertisement. Decode the PAYMENT-REQUIRED or WWW-Authenticate header for payment requirements.","properties":{"error":{"type":"string"}}}}}}