# Music Theory: Frequency to Nearest Note

> Music Theory: Frequency to Nearest Note is a paid API for AI agents from music-theory.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Converts a frequency in Hz to the nearest musical note, MIDI number, and cents offset, with adjustable A4 reference pitch.

## Facts

- Endpoint: GET https://music-theory.x402tookit.com/freq-note?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/music-theory-frequency-to-nearest-note-cb72cebd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_35FYPKm83nAuoGYGXumQV

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-theory-frequency-to-nearest-note-cb72cebd
```

Example prompt: What's the nearest musical note to 432 Hz, using A4 = 432 as the reference, and tell me the MIDI number and how many cents off it is?

## When to prefer this

Use this endpoint when you need to identify the musical note, MIDI number, and tuning deviation for a raw frequency value — ideal for tuner apps, pitch analysis, instrument calibration, or translating audio frequency measurements into musical context. Prefer this over a note-to-frequency endpoint when the input is a raw Hz value rather than a note name.

## Known failure modes

- Frequency out of range (below 8 Hz or above 14000 Hz) returns an error
- A4 reference out of allowed range (400–480 Hz) returns a validation error
- Missing required 'hz' query parameter results in a bad request error
- Invalid accidentals value (not 'sharps' or 'flats') may cause unexpected behavior

## How this service works

Frequency in Hz to the nearest note, MIDI number and offset in cents; adjustable A4 reference; tuner-style result.

## Output

Returns the nearest note name (e.g. A4, C#3), MIDI number, fractional MIDI, cents offset from the nearest note, the nearest note's exact frequency in Hz, the A4 reference used, and metadata such as a summary and direction (sharp/flat).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "hz"
     ],
     "properties": {
      "a4": {
       "type": "number",
       "description": "Reference pitch for A4 in Hz, 400 to 480 (default 440)"
      },
      "hz": {
       "type": "number",
       "description": "Frequency in Hz, 8 to 14000"
      },
      "accidentals": {
       "type": "string",
       "description": "sharps (default) or flats for the note name"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "a4Hz": {
       "type": [
        "null",
        "number"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "midi": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "direction": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "centsOffset": {
       "type": [
        "null",
        "number"
       ]
      },
      "frequencyHz": {
       "type": [
        "null",
        "number"
       ]
      },
      "nearestNote": {
       "type": [
        "null",
        "string"
       ]
      },
      "fractionalMidi": {
       "type": [
        "null",
        "number"
       ]
     
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/music-theory-frequency-to-nearest-note-cb72cebd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from music-theory.x402tookit.com](https://www.zero.xyz/host/music-theory.x402tookit.com/llms.txt)
