{"openapi":"3.1.0","info":{"title":"墨语笔记 InkScribe API","version":"1.1.0","description":"Publish agent-prepared note data without an account, a key, source text, or an AI call. schemaVersion: 1 and note are required. Notes are unlisted; requests are rate-limited per client IP with a 24-hour publishing limit. The manageToken (supplied in X-Manage-Token or generated) deletes the note. Unknown or lossy content returns 422 with field-level issues."},"components":{"schemas":{"NoteStructure":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":60,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"date":{"type":"string","minLength":1,"maxLength":40,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"cues":{"type":"array","maxItems":8,"items":{"type":"object","properties":{"keyword":{"type":"string","minLength":1,"maxLength":24,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"note":{"type":"string","minLength":0,"maxLength":120,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."}},"required":["keyword","note"],"additionalProperties":false}},"sections":{"type":"array","minItems":1,"maxItems":6,"items":{"type":"object","properties":{"heading":{"type":"string","minLength":1,"maxLength":50,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"content":{"type":"string","minLength":1,"maxLength":900,"x-plainText":"multiline","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"highlights":{"type":"array","maxItems":5,"items":{"type":"string","minLength":1,"maxLength":60,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"description":"Distinct phrases that each retain at least one non-overlapping match within a rendered content line after list markers are removed (Unicode case-insensitive). Earlier highlights take precedence over later overlapping matches."}},"required":["content","highlights"],"additionalProperties":false}},"summary":{"type":"string","minLength":0,"maxLength":400,"x-plainText":"multiline","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"doodlePrompt":{"type":"string","minLength":1,"maxLength":160,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"doodleTheme":{"type":"string","enum":["lightbulb","book","coffee","rocket","brain","heart","clock","target","chart","leaf","pencil","globe","magnifier","puzzle","mountain","chat","calendar","music","star","sun"]},"doodleSpec":{"type":"object","properties":{"concept":{"type":"string","minLength":0,"maxLength":40,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"elements":{"type":"array","minItems":1,"maxItems":24,"items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"line"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"arrow"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"circle"},"cx":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"cy":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"r":{"type":"number","minimum":1,"maximum":50,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","cx","cy","r","stroke","width","fill"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rect"},"x":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"w":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"h":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"rx":{"type":"number","minimum":0,"maximum":20,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","x","y","w","h","rx","stroke","width","fill"],"additionalProperties":false,"description":"x + w and y + h must not exceed the 100 × 100 drawing canvas."},{"type":"object","properties":{"type":{"type":"string","const":"path"},"points":{"type":"array","minItems":2,"maxItems":24,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1}}},"closed":{"type":"boolean"},"smooth":{"type":"boolean"},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","points","closed","smooth","stroke","width","fill"],"additionalProperties":false}]}}},"required":["concept","elements"],"additionalProperties":false}},"required":["title","cues","sections","summary"],"additionalProperties":false},"Appearance":{"type":"object","properties":{"layout":{"type":"string","enum":["hybrid-cornell","classic-cornell","free-journal","minimal"]},"paper":{"type":"string","enum":["grid","lined","dot","ivory","textured","kraft","parchment"]},"zhFont":{"type":"string","enum":["lxgw","long-cang","ma-shan-zheng","zcool-kuaile","zhi-mang-xing"]},"enFont":{"type":"string","enum":["kalam","caveat","patrick-hand","indie-flower"]},"ink":{"type":"string","enum":["carbon","blue","brown","green","bordeaux"]},"accent":{"type":"string","enum":["yellow","green","orange"]},"pageSize":{"type":"string","enum":["a4","portrait","square","long"]},"fontSize":{"type":"number","minimum":12,"maximum":28},"lineHeight":{"type":"number","minimum":1.3,"maximum":2.4},"letterSpacing":{"type":"number","minimum":-0.02,"maximum":0.15},"naturalness":{"type":"number","minimum":0,"maximum":1},"doodleMode":{"type":"string","enum":["auto","theme","none"],"description":"auto uses note.doodleSpec or its built-in theme; theme uses appearance.doodleTheme; none hides illustrations."},"doodleTheme":{"type":"string","enum":["lightbulb","book","coffee","rocket","brain","heart","clock","target","chart","leaf","pencil","globe","magnifier","puzzle","mountain","chat","calendar","music","star","sun"]},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"overflow":{"type":"string","enum":["expand","error"],"default":"expand","description":"After bounded fitting, expand switches to a long page; error blocks image export if the fixed page still overflows. Layout is checked by the browser, not by the publication API."}},"required":[],"additionalProperties":false},"Settings":{"type":"object","properties":{"layout":{"type":"string","enum":["hybrid-cornell","classic-cornell","free-journal","minimal"]},"paper":{"type":"string","enum":["grid","lined","dot","ivory","textured","kraft","parchment"]},"zhFont":{"type":"string","enum":["lxgw","long-cang","ma-shan-zheng","zcool-kuaile","zhi-mang-xing"]},"enFont":{"type":"string","enum":["kalam","caveat","patrick-hand","indie-flower"]},"ink":{"type":"string","enum":["carbon","blue","brown","green","bordeaux"]},"accent":{"type":"string","enum":["yellow","green","orange"]},"pageSize":{"type":"string","enum":["a4","portrait","square","long"]},"fontSize":{"type":"number","minimum":12,"maximum":28},"lineHeight":{"type":"number","minimum":1.3,"maximum":2.4},"letterSpacing":{"type":"number","minimum":-0.02,"maximum":0.15},"naturalness":{"type":"number","minimum":0,"maximum":1},"doodleMode":{"type":"string","enum":["auto","theme","none"],"description":"auto uses note.doodleSpec or its built-in theme; theme uses appearance.doodleTheme; none hides illustrations."},"doodleTheme":{"type":"string","enum":["lightbulb","book","coffee","rocket","brain","heart","clock","target","chart","leaf","pencil","globe","magnifier","puzzle","mountain","chat","calendar","music","star","sun"]},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"overflow":{"type":"string","enum":["expand","error"],"default":"expand","description":"After bounded fitting, expand switches to a long page; error blocks image export if the fixed page still overflows. Layout is checked by the browser, not by the publication API."}},"required":["layout","paper","zhFont","enFont","ink","accent","pageSize","fontSize","lineHeight","letterSpacing","naturalness","doodleMode","doodleTheme","seed","overflow"],"additionalProperties":false},"DoodleSpec":{"type":"object","properties":{"concept":{"type":"string","minLength":0,"maxLength":40,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"elements":{"type":"array","minItems":1,"maxItems":24,"items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"line"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"arrow"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"circle"},"cx":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"cy":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"r":{"type":"number","minimum":1,"maximum":50,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","cx","cy","r","stroke","width","fill"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rect"},"x":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"w":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"h":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"rx":{"type":"number","minimum":0,"maximum":20,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","x","y","w","h","rx","stroke","width","fill"],"additionalProperties":false,"description":"x + w and y + h must not exceed the 100 × 100 drawing canvas."},{"type":"object","properties":{"type":{"type":"string","const":"path"},"points":{"type":"array","minItems":2,"maxItems":24,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1}}},"closed":{"type":"boolean"},"smooth":{"type":"boolean"},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","points","closed","smooth","stroke","width","fill"],"additionalProperties":false}]}}},"required":["concept","elements"],"additionalProperties":false},"Sticker":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"tape"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["yellow","mint","pink","blue","kraft"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"sticky-note"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["yellow","green","orange","blue"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"paperclip"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["silver","gold","red"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"star"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["gold","ink"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"coffee-stain"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["coffee","tea"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"custom-doodle"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["lightbulb","book","coffee","rocket","brain","heart","clock","target","chart","leaf","pencil","globe","magnifier","puzzle","mountain","chat","calendar","music","star","sun"]},"doodle":{"type":"object","properties":{"concept":{"type":"string","minLength":0,"maxLength":40,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"elements":{"type":"array","minItems":1,"maxItems":24,"items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"line"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"arrow"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"circle"},"cx":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"cy":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"r":{"type":"number","minimum":1,"maximum":50,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","cx","cy","r","stroke","width","fill"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rect"},"x":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"w":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"h":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"rx":{"type":"number","minimum":0,"maximum":20,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","x","y","w","h","rx","stroke","width","fill"],"additionalProperties":false,"description":"x + w and y + h must not exceed the 100 × 100 drawing canvas."},{"type":"object","properties":{"type":{"type":"string","const":"path"},"points":{"type":"array","minItems":2,"maxItems":24,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1}}},"closed":{"type":"boolean"},"smooth":{"type":"boolean"},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","points","closed","smooth","stroke","width","fill"],"additionalProperties":false}]}}},"required":["concept","elements"],"additionalProperties":false}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false,"description":"Provide variant or doodle. When both are present, doodle supplies the drawing."}]},"Stickers":{"type":"array","maxItems":40,"items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"tape"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["yellow","mint","pink","blue","kraft"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"sticky-note"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["yellow","green","orange","blue"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"paperclip"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["silver","gold","red"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"star"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["gold","ink"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"coffee-stain"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["coffee","tea"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"custom-doodle"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["lightbulb","book","coffee","rocket","brain","heart","clock","target","chart","leaf","pencil","globe","magnifier","puzzle","mountain","chat","calendar","music","star","sun"]},"doodle":{"type":"object","properties":{"concept":{"type":"string","minLength":0,"maxLength":40,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"elements":{"type":"array","minItems":1,"maxItems":24,"items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"line"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"arrow"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"circle"},"cx":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"cy":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"r":{"type":"number","minimum":1,"maximum":50,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","cx","cy","r","stroke","width","fill"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rect"},"x":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"w":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"h":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"rx":{"type":"number","minimum":0,"maximum":20,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","x","y","w","h","rx","stroke","width","fill"],"additionalProperties":false,"description":"x + w and y + h must not exceed the 100 × 100 drawing canvas."},{"type":"object","properties":{"type":{"type":"string","const":"path"},"points":{"type":"array","minItems":2,"maxItems":24,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1}}},"closed":{"type":"boolean"},"smooth":{"type":"boolean"},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","points","closed","smooth","stroke","width","fill"],"additionalProperties":false}]}}},"required":["concept","elements"],"additionalProperties":false}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false,"description":"Provide variant or doodle. When both are present, doodle supplies the drawing."}]}},"PublishRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"InkScribe agent publication","type":"object","properties":{"schemaVersion":{"type":"integer","const":1},"note":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":60,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"date":{"type":"string","minLength":1,"maxLength":40,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"cues":{"type":"array","maxItems":8,"items":{"type":"object","properties":{"keyword":{"type":"string","minLength":1,"maxLength":24,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"note":{"type":"string","minLength":0,"maxLength":120,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."}},"required":["keyword","note"],"additionalProperties":false}},"sections":{"type":"array","minItems":1,"maxItems":6,"items":{"type":"object","properties":{"heading":{"type":"string","minLength":1,"maxLength":50,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"content":{"type":"string","minLength":1,"maxLength":900,"x-plainText":"multiline","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"highlights":{"type":"array","maxItems":5,"items":{"type":"string","minLength":1,"maxLength":60,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"description":"Distinct phrases that each retain at least one non-overlapping match within a rendered content line after list markers are removed (Unicode case-insensitive). Earlier highlights take precedence over later overlapping matches."}},"required":["content","highlights"],"additionalProperties":false}},"summary":{"type":"string","minLength":0,"maxLength":400,"x-plainText":"multiline","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"doodlePrompt":{"type":"string","minLength":1,"maxLength":160,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"doodleTheme":{"type":"string","enum":["lightbulb","book","coffee","rocket","brain","heart","clock","target","chart","leaf","pencil","globe","magnifier","puzzle","mountain","chat","calendar","music","star","sun"]},"doodleSpec":{"type":"object","properties":{"concept":{"type":"string","minLength":0,"maxLength":40,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"elements":{"type":"array","minItems":1,"maxItems":24,"items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"line"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"arrow"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"circle"},"cx":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"cy":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"r":{"type":"number","minimum":1,"maximum":50,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","cx","cy","r","stroke","width","fill"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rect"},"x":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"w":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"h":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"rx":{"type":"number","minimum":0,"maximum":20,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","x","y","w","h","rx","stroke","width","fill"],"additionalProperties":false,"description":"x + w and y + h must not exceed the 100 × 100 drawing canvas."},{"type":"object","properties":{"type":{"type":"string","const":"path"},"points":{"type":"array","minItems":2,"maxItems":24,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1}}},"closed":{"type":"boolean"},"smooth":{"type":"boolean"},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","points","closed","smooth","stroke","width","fill"],"additionalProperties":false}]}}},"required":["concept","elements"],"additionalProperties":false}},"required":["title","cues","sections","summary"],"additionalProperties":false},"template":{"type":"string","enum":["general","reading-notes","meeting-minutes","lecture-summary","idea-fragments"],"default":"general"},"appearance":{"type":"object","properties":{"layout":{"type":"string","enum":["hybrid-cornell","classic-cornell","free-journal","minimal"]},"paper":{"type":"string","enum":["grid","lined","dot","ivory","textured","kraft","parchment"]},"zhFont":{"type":"string","enum":["lxgw","long-cang","ma-shan-zheng","zcool-kuaile","zhi-mang-xing"]},"enFont":{"type":"string","enum":["kalam","caveat","patrick-hand","indie-flower"]},"ink":{"type":"string","enum":["carbon","blue","brown","green","bordeaux"]},"accent":{"type":"string","enum":["yellow","green","orange"]},"pageSize":{"type":"string","enum":["a4","portrait","square","long"]},"fontSize":{"type":"number","minimum":12,"maximum":28},"lineHeight":{"type":"number","minimum":1.3,"maximum":2.4},"letterSpacing":{"type":"number","minimum":-0.02,"maximum":0.15},"naturalness":{"type":"number","minimum":0,"maximum":1},"doodleMode":{"type":"string","enum":["auto","theme","none"],"description":"auto uses note.doodleSpec or its built-in theme; theme uses appearance.doodleTheme; none hides illustrations."},"doodleTheme":{"type":"string","enum":["lightbulb","book","coffee","rocket","brain","heart","clock","target","chart","leaf","pencil","globe","magnifier","puzzle","mountain","chat","calendar","music","star","sun"]},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"overflow":{"type":"string","enum":["expand","error"],"default":"expand","description":"After bounded fitting, expand switches to a long page; error blocks image export if the fixed page still overflows. Layout is checked by the browser, not by the publication API."}},"required":[],"additionalProperties":false},"stickers":{"type":"array","maxItems":40,"items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"tape"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["yellow","mint","pink","blue","kraft"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"sticky-note"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["yellow","green","orange","blue"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"paperclip"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["silver","gold","red"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"star"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["gold","ink"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"coffee-stain"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["coffee","tea"]}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w-]{1,40}$","minLength":1,"maxLength":40},"type":{"type":"string","const":"custom-doodle"},"x":{"type":"integer","minimum":-40,"maximum":880},"y":{"type":"integer","minimum":-40,"maximum":100000},"rotation":{"type":"number","minimum":-180,"maximum":180,"multipleOf":0.1},"scale":{"type":"number","minimum":0.3,"maximum":3,"multipleOf":0.01},"variant":{"type":"string","enum":["lightbulb","book","coffee","rocket","brain","heart","clock","target","chart","leaf","pencil","globe","magnifier","puzzle","mountain","chat","calendar","music","star","sun"]},"doodle":{"type":"object","properties":{"concept":{"type":"string","minLength":0,"maxLength":40,"x-plainText":"single-line","description":"Plain text, already trimmed; no HTML, Markdown emphasis/backticks, control characters or whitespace normalization. No text is silently changed."},"elements":{"type":"array","minItems":1,"maxItems":24,"items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"line"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"arrow"},"x1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y1":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"x2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y2":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1}},"required":["type","x1","y1","x2","y2","stroke","width"],"additionalProperties":false,"description":"Endpoints must differ."},{"type":"object","properties":{"type":{"type":"string","const":"circle"},"cx":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"cy":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"r":{"type":"number","minimum":1,"maximum":50,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","cx","cy","r","stroke","width","fill"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rect"},"x":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"y":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1},"w":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"h":{"type":"number","minimum":1,"maximum":100,"multipleOf":0.1},"rx":{"type":"number","minimum":0,"maximum":20,"multipleOf":0.1},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","x","y","w","h","rx","stroke","width","fill"],"additionalProperties":false,"description":"x + w and y + h must not exceed the 100 × 100 drawing canvas."},{"type":"object","properties":{"type":{"type":"string","const":"path"},"points":{"type":"array","minItems":2,"maxItems":24,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":100,"multipleOf":0.1}}},"closed":{"type":"boolean"},"smooth":{"type":"boolean"},"stroke":{"type":"string","enum":["ink","accent","muted"]},"width":{"type":"number","minimum":0.5,"maximum":4,"multipleOf":0.1},"fill":{"type":"string","enum":["none","yellow","green","orange","ink"]}},"required":["type","points","closed","smooth","stroke","width","fill"],"additionalProperties":false}]}}},"required":["concept","elements"],"additionalProperties":false}},"required":["id","type","x","y","rotation","scale"],"additionalProperties":false,"description":"Provide variant or doodle. When both are present, doodle supplies the drawing."}]}},"visibility":{"type":"string","enum":["unlisted"],"default":"unlisted"}},"required":["schemaVersion","note"],"additionalProperties":false},"NoteSummary":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri","description":"给用户查看的链接"},"title":{"type":"string"},"summary":{"type":"string"},"language":{"type":"string","enum":["zh","en"]},"template":{"type":"string"},"layout":{"type":"string"},"visibility":{"type":"string","enum":["public","unlisted"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"PublishedNote":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri","description":"给用户查看的链接"},"title":{"type":"string"},"summary":{"type":"string"},"language":{"type":"string","enum":["zh","en"]},"template":{"type":"string"},"layout":{"type":"string"},"visibility":{"type":"string","enum":["public","unlisted"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},{"oneOf":[{"type":"object","required":["schemaVersion","note","settings","stickers"],"properties":{"note":{"$ref":"#/components/schemas/NoteStructure"},"stickers":{"$ref":"#/components/schemas/Stickers"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"processing":{"const":"agent"},"replayed":{"type":"boolean"},"validation":{"type":"object","required":["structure","layout"],"properties":{"structure":{"const":"passed"},"layout":{"const":"not_checked"}}}}},"schemaVersion":{"type":"integer","const":1},"settings":{"$ref":"#/components/schemas/Settings"}}},{"type":"object","required":["schemaVersion","note","settings","stickers"],"description":"Normalized content: notes published before the strict contract keep their legacy illustration settings, and stored snapshots that no longer pass it are served this way.","properties":{"note":{"$ref":"#/components/schemas/NoteStructure"},"stickers":{"$ref":"#/components/schemas/Stickers"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"processing":{"const":"agent"},"replayed":{"type":"boolean"},"validation":{"type":"object","required":["structure","layout"],"properties":{"structure":{"const":"passed"},"layout":{"const":"not_checked"}}}}},"schemaVersion":{"type":"integer","const":0},"settings":{"$ref":"#/components/schemas/LegacySettings"},"doodle":{"$ref":"#/components/schemas/DoodleSpec"}}}]}]},"LegacySettings":{"type":"object","properties":{"layout":{"type":"string","enum":["hybrid-cornell","classic-cornell","free-journal","minimal"]},"paper":{"type":"string","enum":["grid","lined","dot","ivory","textured","kraft","parchment"]},"zhFont":{"type":"string","enum":["lxgw","long-cang","ma-shan-zheng","zcool-kuaile","zhi-mang-xing"]},"enFont":{"type":"string","enum":["kalam","caveat","patrick-hand","indie-flower"]},"ink":{"type":"string","enum":["carbon","blue","brown","green","bordeaux"]},"accent":{"type":"string","enum":["yellow","green","orange"]},"pageSize":{"type":"string","enum":["a4","portrait","square","long"]},"fontSize":{"type":"number","minimum":12,"maximum":28},"lineHeight":{"type":"number","minimum":1.3,"maximum":2.4},"letterSpacing":{"type":"number","minimum":-0.02,"maximum":0.15},"naturalness":{"type":"number","minimum":0,"maximum":1},"doodleMode":{"type":"string","enum":["auto","theme","ai","none"]},"doodleTheme":{"type":"string","enum":["lightbulb","book","coffee","rocket","brain","heart","clock","target","chart","leaf","pencil","globe","magnifier","puzzle","mountain","chat","calendar","music","star","sun"]},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"overflow":{"type":"string","enum":["expand","error"],"default":"expand","description":"After bounded fitting, expand switches to a long page; error blocks image export if the fixed page still overflows. Layout is checked by the browser, not by the publication API."}},"required":["layout","paper","zhFont","enFont","ink","accent","pageSize","fontSize","lineHeight","letterSpacing","naturalness","doodleMode","doodleTheme","seed","overflow"],"additionalProperties":false}}},"paths":{"/api/v1/notes":{"post":{"operationId":"createNote","summary":"创建手写笔记并返回分享链接（无需密钥）","description":"visibility 只能为 unlisted（默认）；public 返回 422。","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":100},"description":"按客户端区分。相同键与请求体完成后重放原笔记（不返回 manageToken）；处理中返回 409 + Retry-After；删除后返回 410，不重新创建"},{"name":"X-Manage-Token","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9._~-]{32,200}$"},"description":"可选：自己生成的删除凭据（高熵随机值）。提供后即使响应丢失也能删除；省略时由服务端生成并在 201 响应中返回"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRequest"}}}},"responses":{"200":{"description":"幂等重放，返回之前创建的笔记，不含 manageToken","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri","description":"给用户查看的链接"},"title":{"type":"string"},"summary":{"type":"string"},"language":{"type":"string","enum":["zh","en"]},"template":{"type":"string"},"layout":{"type":"string"},"visibility":{"type":"string","enum":["public","unlisted"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},{"oneOf":[{"type":"object","required":["schemaVersion","note","settings","stickers"],"properties":{"note":{"$ref":"#/components/schemas/NoteStructure"},"stickers":{"$ref":"#/components/schemas/Stickers"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"processing":{"const":"agent"},"replayed":{"type":"boolean"},"validation":{"type":"object","required":["structure","layout"],"properties":{"structure":{"const":"passed"},"layout":{"const":"not_checked"}}}}},"schemaVersion":{"type":"integer","const":1},"settings":{"$ref":"#/components/schemas/Settings"}}},{"type":"object","required":["schemaVersion","note","settings","stickers"],"description":"Normalized content: notes published before the strict contract keep their legacy illustration settings, and stored snapshots that no longer pass it are served this way.","properties":{"note":{"$ref":"#/components/schemas/NoteStructure"},"stickers":{"$ref":"#/components/schemas/Stickers"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"processing":{"const":"agent"},"replayed":{"type":"boolean"},"validation":{"type":"object","required":["structure","layout"],"properties":{"structure":{"const":"passed"},"layout":{"const":"not_checked"}}}}},"schemaVersion":{"type":"integer","const":0},"settings":{"$ref":"#/components/schemas/LegacySettings"},"doodle":{"$ref":"#/components/schemas/DoodleSpec"}}}]}]}}}},"201":{"description":"Published document and share URL; geometry is checked in the browser, no image is generated by the API.","content":{"application/json":{"schema":{"allOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri","description":"给用户查看的链接"},"title":{"type":"string"},"summary":{"type":"string"},"language":{"type":"string","enum":["zh","en"]},"template":{"type":"string"},"layout":{"type":"string"},"visibility":{"type":"string","enum":["public","unlisted"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},{"oneOf":[{"type":"object","required":["schemaVersion","note","settings","stickers"],"properties":{"note":{"$ref":"#/components/schemas/NoteStructure"},"stickers":{"$ref":"#/components/schemas/Stickers"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"processing":{"const":"agent"},"replayed":{"type":"boolean"},"validation":{"type":"object","required":["structure","layout"],"properties":{"structure":{"const":"passed"},"layout":{"const":"not_checked"}}}}},"schemaVersion":{"type":"integer","const":1},"settings":{"$ref":"#/components/schemas/Settings"}}},{"type":"object","required":["schemaVersion","note","settings","stickers"],"description":"Normalized content: notes published before the strict contract keep their legacy illustration settings, and stored snapshots that no longer pass it are served this way.","properties":{"note":{"$ref":"#/components/schemas/NoteStructure"},"stickers":{"$ref":"#/components/schemas/Stickers"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"processing":{"const":"agent"},"replayed":{"type":"boolean"},"validation":{"type":"object","required":["structure","layout"],"properties":{"structure":{"const":"passed"},"layout":{"const":"not_checked"}}}}},"schemaVersion":{"type":"integer","const":0},"settings":{"$ref":"#/components/schemas/LegacySettings"},"doodle":{"$ref":"#/components/schemas/DoodleSpec"}}}]}]},{"type":"object","required":["manageToken"],"properties":{"manageToken":{"type":"string","description":"Credential for deleting this note (X-Manage-Token): the one the request supplied, or one generated by the server. Only its hash is stored, and replays do not return it; give it to the user."}}}]}}}},"400":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"403":{"description":"本站未开放免密钥发布","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"409":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"410":{"description":"对应笔记已删除；新建请使用新幂等键","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"413":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"422":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"429":{"description":"每分钟请求过多或 24 小时发布次数已达上限；遵循 Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"503":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}}}},"/api/v1/notes/validate":{"post":{"operationId":"validateNote","summary":"Validate prepared content without publishing or calling AI","description":"Checks the same contract as publication. Does not reserve an Idempotency-Key or create a note. Geometry and source fidelity are not checked.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRequest"}}}},"responses":{"200":{"description":"Valid structure; layout has not been measured","content":{"application/json":{"schema":{"type":"object","required":["valid","schemaVersion","validation"],"properties":{"valid":{"const":true},"schemaVersion":{"const":1},"validation":{"type":"object","required":["structure","layout"],"properties":{"structure":{"const":"passed"},"layout":{"const":"not_checked"}}}}}}}},"400":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"403":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"413":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"422":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"429":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}}}},"/api/v1/notes/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{22}$"}}],"delete":{"operationId":"deleteNote","summary":"用发布时返回的 manageToken 删除笔记","parameters":[{"name":"X-Manage-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"已删除"},"401":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"404":{"description":"笔记不存在或 manageToken 不正确","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}}}},"/api/notes/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{22}$"}}],"get":{"operationId":"getPublicNote","summary":"公开读取笔记（无需密钥）","responses":{"200":{"description":"Published document and share URL; geometry is checked in the browser, no image is generated by the API.","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri","description":"给用户查看的链接"},"title":{"type":"string"},"summary":{"type":"string"},"language":{"type":"string","enum":["zh","en"]},"template":{"type":"string"},"layout":{"type":"string"},"visibility":{"type":"string","enum":["public","unlisted"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},{"oneOf":[{"type":"object","required":["schemaVersion","note","settings","stickers"],"properties":{"note":{"$ref":"#/components/schemas/NoteStructure"},"stickers":{"$ref":"#/components/schemas/Stickers"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"processing":{"const":"agent"},"replayed":{"type":"boolean"},"validation":{"type":"object","required":["structure","layout"],"properties":{"structure":{"const":"passed"},"layout":{"const":"not_checked"}}}}},"schemaVersion":{"type":"integer","const":1},"settings":{"$ref":"#/components/schemas/Settings"}}},{"type":"object","required":["schemaVersion","note","settings","stickers"],"description":"Normalized content: notes published before the strict contract keep their legacy illustration settings, and stored snapshots that no longer pass it are served this way.","properties":{"note":{"$ref":"#/components/schemas/NoteStructure"},"stickers":{"$ref":"#/components/schemas/Stickers"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"processing":{"const":"agent"},"replayed":{"type":"boolean"},"validation":{"type":"object","required":["structure","layout"],"properties":{"structure":{"const":"passed"},"layout":{"const":"not_checked"}}}}},"schemaVersion":{"type":"integer","const":0},"settings":{"$ref":"#/components/schemas/LegacySettings"},"doodle":{"$ref":"#/components/schemas/DoodleSpec"}}}]}]}}}},"404":{"description":"错误","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}}}},"/api/gallery":{"get":{"operationId":"listGallery","summary":"图库中的公开笔记","parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"template","in":"query","schema":{"type":"string","enum":["general","reading-notes","meeting-minutes","lecture-summary","idea-fragments"]}},{"name":"language","in":"query","schema":{"type":"string","enum":["zh","en"]}}],"responses":{"200":{"description":"笔记列表与下一页游标"}}}}},"servers":[{"url":"https://scribe.orangely.xyz"}]}