{"openapi":"3.1.0","info":{"title":"Music Theory API","version":"1.0.0","description":"Music-theory maths as an API, in equal temperament with A4 = 440 Hz and scientific pitch notation (C4 = middle C = MIDI 60). The note endpoint converts freely between a note name (A4, C#5, Eb3), a MIDI note number and a frequency — and when you pass a frequency it returns the nearest note and how many cents sharp or flat it is. The interval endpoint gives the distance between two notes in semitones and cents, its name (perfect fifth, major third, …) and the exact frequency ratio. The chord endpoint returns the notes, MIDI numbers and frequencies of a chord from a root and a quality (major, minor, dim, aug, sus, 6, 7, maj7, m7, dim7, m7b5, 9 and more). The scale endpoint returns the notes of a scale or mode from a root — major, the three minor scales, the seven church modes, the major and minor pentatonics, blues, whole-tone and chromatic. Sharp or flat spelling is selectable. Everything is computed locally and deterministically, so it is instant and private. Ideal for music apps and games, synthesizers and DAWs, ear-training and theory teaching, tuners and MIDI tools. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. This is music theory; for searching tracks and artists use a music API and for the classical repertoire use a classical-music API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/musicnote-api","description":"oanor gateway"}],"tags":[{"name":"Music"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/chord":{"get":{"operationId":"get_v1_chord","tags":["Music"],"summary":"Chord notes from root + quality","description":"","parameters":[{"name":"root","in":"query","required":true,"description":"Root note","schema":{"type":"string"},"example":"C4"},{"name":"quality","in":"query","required":false,"description":"major|minor|maj7|m7|dom7|dim|aug|sus4","schema":{"type":"string"},"example":"maj7"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"root":"C4","notes":[{"midi":60,"note":"C4","frequency_hz":261.6256},{"midi":64,"note":"E4","frequency_hz":329.6276},{"midi":67,"note":"G4","frequency_hz":391.9954},{"midi":71,"note":"B4","frequency_hz":493.8833}],"quality":"maj7","intervals":[0,4,7,11]},"meta":{"timestamp":"2026-06-03T17:42:11.840Z","request_id":"f9d22f3c-0b4d-48de-a507-76a85db56e61"},"status":"ok","message":"Chord","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/interval":{"get":{"operationId":"get_v1_interval","tags":["Music"],"summary":"Interval between two notes","description":"","parameters":[{"name":"from","in":"query","required":true,"description":"A note","schema":{"type":"string"},"example":"C4"},{"name":"to","in":"query","required":true,"description":"A note","schema":{"type":"string"},"example":"G4"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"to":"G4","from":"C4","cents":700,"interval":"perfect fifth","semitones":7,"frequency_ratio":1.498307},"meta":{"timestamp":"2026-06-03T17:42:11.972Z","request_id":"c4c72817-833a-4db0-8010-8f6a451a9828"},"status":"ok","message":"Interval","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/note":{"get":{"operationId":"get_v1_note","tags":["Music"],"summary":"Note / MIDI / frequency","description":"","parameters":[{"name":"note","in":"query","required":false,"description":"Name or MIDI number","schema":{"type":"string"},"example":"A4"},{"name":"frequency","in":"query","required":false,"description":"Or a frequency in Hz","schema":{"type":"string"}},{"name":"flats","in":"query","required":false,"description":"Spell with flats","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"midi":69,"note":"A4","frequency_hz":440},"meta":{"timestamp":"2026-06-03T17:42:12.051Z","request_id":"c65a912a-abac-4220-99a5-618abdc91063"},"status":"ok","message":"Note","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/scale":{"get":{"operationId":"get_v1_scale","tags":["Music"],"summary":"Scale notes from root + type","description":"","parameters":[{"name":"root","in":"query","required":true,"description":"Root note","schema":{"type":"string"},"example":"C4"},{"name":"scale","in":"query","required":false,"description":"major|minor|dorian|pentatonic_minor","schema":{"type":"string"},"example":"major"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"root":"C4","notes":[{"midi":60,"note":"C4","frequency_hz":261.6256},{"midi":62,"note":"D4","frequency_hz":293.6648},{"midi":64,"note":"E4","frequency_hz":329.6276},{"midi":65,"note":"F4","frequency_hz":349.2282},{"midi":67,"note":"G4","frequency_hz":391.9954},{"midi":69,"note":"A4","frequency_hz":440},{"midi":71,"note":"B4","frequency_hz":493.8833},{"midi":72,"note":"C5","frequency_hz":523.2511}],"scale":"major","intervals":[0,2,4,5,7,9,11]},"meta":{"timestamp":"2026-06-03T17:42:12.147Z","request_id":"3e8ab023-933d-44dc-913d-728ab490da28"},"status":"ok","message":"Scale","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Music Theory API","notes":"Equal temperament, A4 = 440 Hz. MIDI 0-127. C4 = middle C = MIDI 60. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/note","params":{"note":"name or MIDI number","flats":"spell with flats","frequency":"or a frequency in Hz"},"returns":"note name, MIDI number and frequency (and cents-off for a frequency)"},{"path":"/v1/interval","params":{"to":"a note","from":"a note"},"returns":"semitones, cents, interval name and frequency ratio"},{"path":"/v1/chord","params":{"root":"root note","quality":"major|minor|maj7|m7|dom7|dim|aug|sus4|…"},"returns":"the chord's notes"},{"path":"/v1/scale","params":{"root":"root note","scale":"major|minor|dorian|pentatonic_minor|…"},"returns":"the scale's notes"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Music-theory maths as an API, in equal temperament with A4 = 440 Hz and scientific pitch notation (C4 = middle C = MIDI 60). The note endpoint converts freely between a note name (A4, C#5, Eb3), a MIDI note number and a frequency — and when you pass a frequency it returns the nearest note and how many cents sharp or flat it is. The interval endpoint gives the distance between two notes in semitones and cents, its name (perfect fifth, major third, …) and the exact frequency ratio. The chord endpoint returns the notes, MIDI numbers and frequencies of a chord from a root and a quality (major, minor, dim, aug, sus, 6, 7, maj7, m7, dim7, m7b5, 9, …). The scale endpoint returns the notes of a scale or mode from a root (major, the three minors, the seven modes, pentatonics, blues, whole-tone, chromatic). Sharp or flat spelling is selectable. Everything is computed locally and deterministically, so it is instant and private. Ideal for music apps and games, synths and DAWs, ear-training and theory teaching, tuners and MIDI tools. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. This is music theory; for track/artist search use a music API."},"meta":{"timestamp":"2026-06-03T17:42:12.227Z","request_id":"b0f514a5-d65c-4010-86cc-af8ebc91f24b"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":6735,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":825,"monthly_call_quota":16250,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2815,"monthly_call_quota":213500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6615,"monthly_call_quota":1110000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/musicnote-api"}