v2.1 — Developer Reference

Chord Intelligence
API

Deterministic music theory over REST + MCP. Analyze any chord symbol or note set, get its roman-numeral harmonic function, generate instrument-ready voicings, and reharmonize entire progressions — correct on every call, computed not guessed. The ground-truth layer your AI calls instead of hallucinating.

BASE https://chords.thiri.ai/v2 ⎘ Copy

Musicians: try the live demos →

Which integration is right for you?

Same engine, same key — three ways to reach it. Pick by where your code lives.

REST API

An app, backend, or script — any language that speaks HTTP. → the endpoints

Hosted MCP

An AI agent in Claude or Cursor — one-click custom connector, nothing to install. → add the connector

Local MCP

Claude Code, CI, or a self-hosted agent — run it via npx from a config file. → local setup

Common pattern: sit THIRI downstream of a generator — pipe AI-generated audio (or any chord set) into /v2/analyze and /v2/reharmonize to get a correct chord chart your agent can trust.

This page is the API reference & integration guide. For live usage and quota, open the developer dashboard →

POST Analyze POST Resolve POST Voice POST Reharmonize MCP Server Errors Pricing
🔑

Authentication

All requests require a Bearer token. Include it in every request header:
Authorization: Bearer your_api_token


1

Analyze Chord

POST
/v2/analyze

Parse any chord symbol into its root, quality, intervals, and extensions. When a key is provided, returns the chord's Roman numeral and harmonic function.

Request
{
  "chord": "Dm7",
  "key": "C"
}
Response
{
  "symbol": "Dm7",
  "root": "D",
  "quality": "minor7",
  "intervals": [0, 3, 7, 10],
  "extensions": [],
  "alterations": [],
  "bassNote": null,
  "numeral": "ii",
  "degree": 2,
  "diatonic": true,
  "function": "predominant",
  "scales": [
    { "name": "Dorian", "role": "primary" },
    { "name": "Aeolian", "role": "secondary" }
  ]
}
Request Parameters
FieldTypeRequiredDescription
chordstringYesAny standard chord symbol
keystringNoKey center for functional analysis
Response Fields
FieldTypeDescription
symbolstringOriginal input chord symbol
rootstringRoot note name
qualitystringChord quality classification
intervalsnumber[]Semitone intervals from root
extensionsnumber[]Upper extensions present
alterationsstring[]Altered tones (e.g. "b9", "#11")
bassNotestring | nullSlash chord bass note
numeralstringRoman numeral (when key provided)
degreenumberScale degree 1–7 (when key provided)
diatonicbooleanWhether chord belongs to the key
functionstringtonic, subdominant, predominant, or dominant
Supported formats: Standard chord notation including slash chords (Cmaj7/E), shorthand symbols (△, °, ø), all extensions and alterations. Repeat signs (%) and N.C. are handled gracefully.

2

Resolve Chord

POST
/v2/resolve

Resolves a chord symbol to its spelled-out notes, frequencies, MIDI numbers, and recommended improvisation scales.

Request
{
  "chord": "Cm7"
}
Response
{
  "root": "C",
  "quality": "m7",
  "notes": ["C", "Eb", "G", "Bb"],
  "intervals": ["1", "b3", "5", "b7"],
  "semitones": [0, 3, 7, 10],
  "frequencies": [261.63, 311.13, 392.0, 466.16],
  "midi": [60, 63, 67, 70],
  "scales": [
    {
      "name": "Dorian",
      "role": "primary",
      "semitones": [0,2,3,5,7,9,10],
      "degrees": ["1","2","b3","4","5","6","b7"],
      "character": "Minor but bright — the 6th lifts it."
    }
  ]
}
Response Fields
FieldTypeDescription
notesstring[]Spelled note names
intervalsstring[]Interval labels
semitonesnumber[]Semitone offsets from root
frequenciesnumber[]Frequencies in Hz (A4 = 440)
midinumber[]MIDI note numbers
scalesstring[]Recommended scales for improvisation

3

Generate Voicing

POST
/v2/voicing

Generate instrument-ready voicings for a chord in a specified style. Supports voice leading from a previous voicing to ensure smooth transitions.

Request
{
  "chord": "Dm7",
  "style": "rootless",
  "octave": 3,
  "previousNotes": ["E3", "G3", "Bb3", "D4"]
}
Response
{
  "notes": ["F3", "A3", "C4", "E4"],
  "midi": [53, 57, 60, 64],
  "intervals": ["m3", "P5", "m7", "M9"],
  "template": "bill_evans_rootless",
  "voiceLeadingScore": 0.94,
  "style": "rootless",
  "chord": "Dm7"
}
Request Parameters
FieldTypeRequiredDefaultDescription
chordstringYesChord symbol
stylestringNo"pad"Voicing style
octavenumberNo3Base octave
previousNotesstring[]NoPrevious voicing for voice leading
Available Styles
rootless
Jazz voicings without the root — ideal for comping with a bassist
shell
Root, 3rd, and 7th only — economical and clear
drop2
Open voicing with wider spacing — classic big band sound
drop3
Wider drop voicing — orchestral spread
pad
Close-position stacking — full and warm
triad
Basic three-note voicing
Voice Leading: When previousNotes is provided, the engine optimizes the new voicing's register to minimize movement between chords, preventing jarring jumps during progressions.

4

Reharmonize

POST
/v2/reharmonize

Analyze a chord progression and generate reharmonization suggestions. Returns per-bar substitution options with explanations, plus complete alternative progressions.

Request
{
  "bars": ["Cmaj7", "Dm7", "G7", "Cmaj7"],
  "key": "C"
}
Response
{
  "original": ["Cmaj7", "Dm7", "G7", "Cmaj7"],
  "key": "C",
  "suggestions": {
    "0": [{
      "name": "Secondary Dominant",
      "chords": ["A7"],
      "explanation": "A7 targets Dm7 as its V7...",
      "adventurousness": 2,
      "genres": ["jazz", "pop"]
    }]
  },
  "alternatives": [
    {
      "name": "Tritone Subs",
      "bars": ["Cmaj7", "Dm7", "Db7", "Cmaj7"],
      "adventurousness": 4
    },
    {
      "name": "Dark Mode",
      "bars": ["Cmaj7", "Fm7", "G7", "Cmaj7"],
      "adventurousness": 5
    }
  ]
}
Request Parameters
FieldTypeRequiredDescription
barsstring[]YesChord symbols, one per bar
keystringYesKey center
Suggestion Fields
FieldTypeDescription
namestringHuman-readable technique name
chordsstring[]Replacement chord(s) for the bar
explanationstringWhy this substitution works musically
adventurousnessnumberHarmonic adventurousness (1–10)
genresstring[]Genres where this sounds most natural
Alternative progressions: Each response includes up to 4 complete reharmonized versions of the input, from conservative to adventurous. Each includes a name, description, full bar array, and an adventurousness rating.

CONNECT npx @bluesprincemedia/thiri-mcp

MCP Server

THIRI ships an MCP server alongside the REST API. Any MCP-compatible client — Claude Desktop, Cursor, custom agents — can reach into the engine directly without writing HTTP plumbing. Two ways to connect: hosted (one-click, nothing to install) or local (npm/stdio).

Hosted — custom connector (Claude Desktop / web / mobile)

No install, no config file. In Claude: Settings → Connectors → Add custom connector, then paste the URL below. Claude registers itself and opens the THIRI consent page — paste your sk_live_ key once and the four tools appear.

CONNECTOR URL https://mcp.thiri.ai/mcp

Authenticated with your existing THIRI key (key-as-credential OAuth) — same key, same monthly quota as REST and the npm client.

Local — npm / stdio config (Claude Code, Cursor)

~/.claude/settings.json
{
  "mcpServers": {
    "thiri": {
      "command": "npx",
      "args": ["-y", "@bluesprincemedia/thiri-mcp"],
      "env": {
        "THIRI_API_KEY": "sk_live_your_key"
      }
    }
  }
}

Available tools

ToolDescription
analyze_chordParse a chord symbol into root, quality, intervals, extensions, and harmonic function
resolve_chordResolve to spelled notes, frequencies, MIDI, and recommended scales
generate_voicingInstrument-ready voicings in any style, voice-leading aware
reharmonizeSubstitution suggestions and complete alternative progressions

Same engine, same auth, same rate limits as the REST API. Use MCP when you want the engine inside an agent loop; use REST when you want it inside an app.


Error Handling

All endpoints return standard HTTP status codes.

200
Success
400
Invalid input — malformed chord or missing field
401
Unauthorized — invalid or missing token
404
Chord not found in harmony engine
429
Rate limit exceeded
500
Internal server error
Error Response
{
  "error": "invalid_chord",
  "message": "Could not parse chord symbol: Xmaj99"
}
Rate Limits
Free
30
requests / minute
Builder
100
requests / minute
Enterprise
Custom
contact us

Start Free. Scale When Ready.

API live — free tier includes 1,000 calls/mo. Paste your key on the usage dashboard to see quota.

Free
$0
forever
1,000 API calls / month
All four endpoints
MCP server access
30 req/min rate limit
Enterprise
Custom
contact us
Unlimited calls
Dedicated SLA
Self-hosted option
Custom rate limits
Copied to clipboard