{"apiVersion":1,"materials":[{"id":"md-cotton","name":"MD Cotton","widthMm":148,"heightMm":210}],"writingFonts":[{"id":"script","name":"Letter Script"},{"id":"palmer","name":"Palmer Script"},{"id":"austen","name":"Jane Austen"},{"id":"lincoln","name":"Abraham Lincoln"},{"id":"elizabeth-i","name":"Queen Elizabeth I"},{"id":"whitman","name":"Walt Whitman"},{"id":"elizabeth-ii","name":"Elizabeth II"}],"coordinates":{"material":"Original sheet [u, v], top-left [0, 0], bottom-right [1, 1].","desk":"Offsets [x, y] in original sheet widths, positive to the right and down.","foldAngle":"Normalized 0–1, where 1 represents 180 degrees."},"limits":{"maxOperations":32,"maxCreasePoints":48,"maxTotalCreasePoints":256,"maxTearPoints":24,"maxTears":6,"maxTotalTearLength":4,"maxTearSegments":384,"maxTearSegmentOverlaps":600,"maxPieces":12,"maxFlapChecks":4,"maxFlapPriorFolds":6,"maxWritingTextLength":4000,"maxWritingPageIndex":31,"maxRequestBytes":65536},"operations":[{"type":"write","description":"Replace the manuscript on the original front of the source sheet. Ink follows that material through handling.","schema":{"type":"object","properties":{"type":{"type":"string","const":"write"},"piece":{"type":"string","const":"sheet","default":"sheet"},"title":{"type":"string","maxLength":200,"default":"Untitled letter","description":"Manuscript title."},"text":{"type":"string","maxLength":4000,"description":"Plain manuscript text. An empty value clears the ink."},"fontId":{"type":"string","enum":["script","palmer","austen","lincoln","elizabeth-i","whitman","elizabeth-ii"],"description":"Built-in Handwritten typeface.","default":"script"},"ink":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","default":"#302d29","description":"Ink color as #RRGGBB."},"inkOpacity":{"type":"number","minimum":0.1,"maximum":1,"description":"Ink opacity.","default":1},"fontSize":{"type":"number","minimum":18,"maximum":52,"description":"Handwritten size on the Writing Desk’s 700 px layout.","default":32},"lineSpacing":{"type":"number","minimum":1.1,"maximum":2,"description":"Line spacing as a multiple of font size.","default":1.45},"align":{"type":"string","enum":["left","center","right"],"description":"Line alignment.","default":"left"},"page":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based page of the manuscript to place on the source sheet.","default":0}},"required":["type","text"],"additionalProperties":false,"title":"write","description":"Replace the manuscript on the original front of the source sheet. Ink follows that material through handling."}},{"type":"origami","description":"Prepare fresh A5 stock and follow a coordinated fold pattern. Replay the same model to change its progress.","schema":{"type":"object","properties":{"type":{"type":"string","const":"origami"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"model":{"type":"string","enum":["fortune-teller","crane","boat"],"description":"Coordinated origami pattern."},"progress":{"type":"number","minimum":0,"maximum":1,"description":"Progress through the complete fold sequence, starting from prepared flat stock."},"pinch":{"type":"number","minimum":-1,"maximum":1,"description":"Fortune teller pocket squeeze. Opposite signs exchange the open and closed pair."}},"required":["type","model","progress"],"additionalProperties":false,"title":"origami","description":"Prepare fresh A5 stock and follow a coordinated fold pattern. Replay the same model to change its progress."}},{"type":"fold","description":"Place and turn a straight hinge.","schema":{"type":"object","properties":{"type":{"type":"string","const":"fold"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"from":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"to":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"anchor":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Point on the hinge and selected piece. Defaults to its midpoint."},"side":{"type":"integer","enum":[-1,1],"description":"Select the side of the directed line in material coordinates."},"angle":{"type":"number","minimum":0,"maximum":1,"description":"Fold angle as a fraction of 180 degrees."},"pressure":{"type":"number","minimum":0,"maximum":1,"description":"Pressure applied to set the paper.","default":0.8},"back":{"type":"boolean","default":false,"description":"Apply the operation from the reverse material face."},"layer":{"type":"string","enum":["packet","flap"],"description":"Fold all layers along the hinge, or turn a freely hinged material flap independently.","default":"packet"}},"required":["type","from","to","side","angle"],"additionalProperties":false,"title":"fold","description":"Place and turn a straight hinge."}},{"type":"crease","description":"Press a straight or freehand score into the paper.","schema":{"type":"object","properties":{"type":{"type":"string","const":"crease"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"path":{"type":"array","minItems":2,"maxItems":48,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"description":"Sampled material-coordinate score."},"depth":{"type":"number","minimum":0,"maximum":1,"description":"Scoring depth."},"pressure":{"type":"number","minimum":0,"maximum":1,"description":"Pressure applied to set the paper.","default":0.8},"side":{"type":"integer","enum":[-1,1],"description":"Select the side of the directed line in material coordinates.","default":1},"back":{"type":"boolean","default":false,"description":"Apply the operation from the reverse material face."}},"required":["type","path","depth"],"additionalProperties":false,"title":"crease","description":"Press a straight or freehand score into the paper."}},{"type":"tear","description":"Trace a tear from the selected piece and return any detached pieces.","schema":{"type":"object","properties":{"type":{"type":"string","const":"tear"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"path":{"type":"array","minItems":2,"maxItems":24,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"description":"Sampled material-coordinate tear. Stops when it leaves the selected piece or closes a loop."}},"required":["type","path"],"additionalProperties":false,"title":"tear","description":"Trace a tear from the selected piece and return any detached pieces."}},{"type":"move","description":"Translate the selected piece on the desk.","schema":{"type":"object","properties":{"type":{"type":"string","const":"move"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"dx":{"type":"number","minimum":-4,"maximum":4,"description":"Horizontal change in original sheet widths, positive to the right."},"dy":{"type":"number","minimum":-4,"maximum":4,"description":"Vertical change in original sheet widths, positive downward."}},"required":["type","dx","dy"],"additionalProperties":false,"title":"move","description":"Translate the selected piece on the desk."}},{"type":"unfold","description":"Open a fold while preserving its material memory. Defaults to the last fold with a positive angle.","schema":{"type":"object","properties":{"type":{"type":"string","const":"unfold"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"index":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."},"angle":{"type":"number","minimum":0,"maximum":1,"description":"Fold angle as a fraction of 180 degrees.","default":0}},"required":["type"],"additionalProperties":false,"title":"unfold","description":"Open a fold while preserving its material memory. Defaults to the last fold with a positive angle."}},{"type":"adjust-fold","description":"Adjust the angle of a fold, the depth of a crease, or the pressure on either.","schema":{"type":"object","properties":{"type":{"type":"string","const":"adjust-fold"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"index":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."},"angle":{"type":"number","minimum":0,"maximum":1,"description":"Fold angle as a fraction of 180 degrees."},"depth":{"type":"number","minimum":0,"maximum":1,"description":"Scoring depth."},"pressure":{"type":"number","minimum":0,"maximum":1,"description":"Pressure applied to set the paper."}},"required":["type","index"],"additionalProperties":false,"title":"adjust-fold","description":"Adjust the angle of a fold, the depth of a crease, or the pressure on either.","anyOf":[{"required":["angle"]},{"required":["depth"]},{"required":["pressure"]}]}},{"type":"swap-fold","description":"Reverse which side of a fold moves.","schema":{"type":"object","properties":{"type":{"type":"string","const":"swap-fold"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"index":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."}},"required":["type","index"],"additionalProperties":false,"title":"swap-fold","description":"Reverse which side of a fold moves."}},{"type":"crumple","description":"Create a local gather with a repeatable pattern.","schema":{"type":"object","properties":{"type":{"type":"string","const":"crumple"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"at":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"radius":{"type":"number","minimum":0.05,"maximum":1,"description":"Gather radius in original sheet widths."},"amount":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."},"heading":{"type":"number","minimum":-3.141592653589793,"maximum":3.141592653589793,"description":"Gather heading in radians in material space, with positive angles toward +v."},"seed":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Deterministic gather pattern seed."}},"required":["type","at","radius","amount","heading","seed"],"additionalProperties":false,"title":"crumple","description":"Create a local gather with a repeatable pattern."}},{"type":"adjust-gather","description":"Adjust a local gather’s radius or compression.","schema":{"type":"object","properties":{"type":{"type":"string","const":"adjust-gather"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"index":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."},"radius":{"type":"number","minimum":0.05,"maximum":1,"description":"Gather radius in original sheet widths."},"amount":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."}},"required":["type","index"],"additionalProperties":false,"title":"adjust-gather","description":"Adjust a local gather’s radius or compression.","anyOf":[{"required":["radius"]},{"required":["amount"]}]}},{"type":"release","description":"Release a local gather while preserving its material memory.","schema":{"type":"object","properties":{"type":{"type":"string","const":"release"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"index":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."}},"required":["type","index"],"additionalProperties":false,"title":"release","description":"Release a local gather while preserving its material memory."}},{"type":"flatten","description":"Flatten the selected piece while retaining folds, creases, gathers and their permanent set.","schema":{"type":"object","properties":{"type":{"type":"string","const":"flatten"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"}},"required":["type"],"additionalProperties":false,"title":"flatten","description":"Flatten the selected piece while retaining folds, creases, gathers and their permanent set."}},{"type":"whole-crumple","description":"Crumple the entire selected piece.","schema":{"type":"object","properties":{"type":{"type":"string","const":"whole-crumple"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"}},"required":["type"],"additionalProperties":false,"title":"whole-crumple","description":"Crumple the entire selected piece."}},{"type":"rotate","description":"Rotate the selected piece on the desk.","schema":{"type":"object","properties":{"type":{"type":"string","const":"rotate"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"degrees":{"type":"number","minimum":-360,"maximum":360,"description":"Clockwise desk rotation in degrees.","default":15}},"required":["type"],"additionalProperties":false,"title":"rotate","description":"Rotate the selected piece on the desk."}},{"type":"turn","description":"Turn the selected piece over.","schema":{"type":"object","properties":{"type":{"type":"string","const":"turn"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"}},"required":["type"],"additionalProperties":false,"title":"turn","description":"Turn the selected piece over."}},{"type":"lift","description":"Lift an original sheet corner. Omit amount to toggle.","schema":{"type":"object","properties":{"type":{"type":"string","const":"lift"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"at":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","enum":[0,1]},"description":"Original sheet corner [u, v]."},"amount":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."}},"required":["type","at"],"additionalProperties":false,"title":"lift","description":"Lift an original sheet corner. Omit amount to toggle."}},{"type":"bend","description":"Bend an original sheet corner. Omit amount to toggle.","schema":{"type":"object","properties":{"type":{"type":"string","const":"bend"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"at":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","enum":[0,1]},"description":"Original sheet corner [u, v]."},"amount":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."}},"required":["type","at"],"additionalProperties":false,"title":"bend","description":"Bend an original sheet corner. Omit amount to toggle."}}],"links":{"capabilities":"/api/paper/v1/capabilities","openapi":"/api/paper/v1/openapi.json","handle":"/api/paper/v1/handle","guide":"/paper-api.txt"}}