# Music Interval Calculator

> Music Interval Calculator is a paid API for AI agents from music.openverbs.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Names the musical interval between two notes, returning semitone count, diatonic number, and quality (perfect/major/minor/augmented/diminished) with correct enharmonic spelling awareness.

## Facts

- Endpoint: POST https://music.openverbs.com/v1/interval
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/music-interval-calculator-5734378d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NXVhOh-dEyzQBFYpR2DnR

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability music-interval-calculator-5734378d -d '<json body>'
```

Example prompt: What's the interval between C4 and F#4 — tell me the diatonic number, quality, and how many semitones it spans?

## When to prefer this

Use this endpoint when you need to identify or validate the precise diatonic interval between two notes, especially when enharmonic spelling matters (e.g. augmented vs diminished distinctions). Prefer this over general music theory lookups or MIDI pitch-difference calculations when the quality label (major/minor/perfect/augmented/diminished) is required alongside semitone distance.

## Known failure modes

- Invalid note name format (e.g. missing letter or bad accidental) returns an error
- Upper note lower than lower note returns an error (to must be >= from)
- Unsupported accidental symbols or octave numbers out of range may be rejected
- Enharmonic inputs with ambiguous spelling may return unexpected quality names

## How this service works

Name the interval between two notes (`to` at or above `from`) — its size in semitones, its diatonic number and its quality (perfect/major/minor/augmented/diminished). Correct spelling matters: C→F# is an augmented fourth, C→Gb a diminished fifth.

## Output

Returns the named interval between the two input notes, including: the number of semitones between them, the diatonic interval number (e.g. fourth, fifth), and the quality (perfect, major, minor, augmented, or diminished). Correct enharmonic spelling of both notes is respected, so C→F# (augmented fourth) differs from C→Gb (diminished fifth) despite being the same pitch distance.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "from": {
       "type": "string",
       "minLength": 1,
       "maxLength": 8,
       "description": "Lower note."
      },
      "to": {
       "type": "string",
       "minLength": 1,
       "maxLength": 8,
       "description": "Upper note (>= from)."
      }
     },
     "required": [
      "from",
      "to"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/music-interval-calculator-5734378d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from music.openverbs.com](https://www.zero.xyz/host/music.openverbs.com/llms.txt)
