{"openapi":"3.1.0","info":{"title":"MusicXML Round-Trip Check","version":"1.0.0","description":"Compare pitched notes, rests, timing, voices, staves, ties, traditional key declarations and explicit key cancellations in two partwise MusicXML scores. Aligns parts and measures by position.","contact":{"name":"Jeremy Carter","email":"jeremy@jeremycarter.ca"},"x-guidance":"Start with the free example at /example. POST its request as JSON to /v1/compare. An unsigned request quotes 0.04 USDC on Base. Compares supplied score text without storing it. Engraving, non-traditional keys, playback settings and compressed archives are outside this check."},"components":{"schemas":{"ComparisonResult":{"type":"object","properties":{"matches":{"type":"boolean"},"difference_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"differences":{"type":"array","items":{"type":"object","properties":{"part":{"type":"integer","minimum":0,"maximum":9007199254740991},"measure":{"type":"integer","minimum":0,"maximum":9007199254740991},"kind":{"type":"string","enum":["measure","key_signature","key_cancellation","note","rest"]},"change":{"type":"string","enum":["added","missing"]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["part","measure","kind","change","count"],"additionalProperties":{"$ref":"#/components/schemas/ComparisonResult/$defs/__schema0"}}}},"required":["matches","difference_count","differences"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/ComparisonResult/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/ComparisonResult/$defs/__schema0"}}]}}}}},"paths":{"/v1/compare":{"post":{"operationId":"compare_musicxml","summary":"Compare pitched notes, rests, timing, voices, staves, ties, traditional key declarations and explicit key cancellations in two partwise MusicXML scores. Aligns parts and measures by position.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["before_xml","after_xml"],"properties":{"before_xml":{"type":"string","maxLength":100000},"after_xml":{"type":"string","maxLength":100000}}},"example":{"before_xml":"<score-partwise version=\"4.0\"><part-list><score-part id=\"P1\"><part-name>Piano</part-name></score-part></part-list><part id=\"P1\"><measure number=\"1\"><attributes><divisions>4</divisions></attributes><note><pitch><step>C</step><octave>4</octave></pitch><duration>4</duration></note></measure></part></score-partwise>","after_xml":"<score-partwise version=\"4.0\"><part-list><score-part id=\"P1\"><part-name>Piano</part-name></score-part></part-list><part id=\"P1\"><measure number=\"1\"><attributes><divisions>8</divisions></attributes><note><pitch><step>D</step><octave>4</octave></pitch><duration>8</duration></note></measure></part></score-partwise>"}}}},"responses":{"200":{"description":"Reconciliation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonResult"},"example":{"matches":false,"difference_count":2,"differences":[{"part":1,"measure":1,"kind":"note","change":"missing","count":1,"onset":"0/1","duration":"1/1","voice":"1","staff":"1","grace":false,"pitch":"C4","alter":"0/1","ties":[]},{"part":1,"measure":1,"kind":"note","change":"added","count":1,"onset":"0/1","duration":"1/1","voice":"1","staff":"1","grace":false,"pitch":"D4","alter":"0/1","ties":[]}]}}}},"400":{"description":"Invalid input"},"402":{"description":"Requires an x402 exact payment of 0.04 USDC on Base"}}}}}}