# Halowerk Music Interval N-gram Jaccard Similarity

> Halowerk Music Interval N-gram Jaccard Similarity is a paid API for AI agents from creator.halowerk.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Converts two MIDI note sequences to pitch-interval n-grams and computes their Jaccard similarity score

## Facts

- Endpoint: POST https://creator.halowerk.com/v1/plagiarism-music
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/halowerk-music-interval-n-gram-jaccard-similarity-a83dc36c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aruAHIK3rUEwDkYN1DPpc

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 halowerk-music-interval-n-gram-jaccard-similarity-a83dc36c -d '<json body>'
```

Example prompt: Compare these two melodies for pitch interval similarity using trigrams (n-gram size 3): reference MIDI notes [60, 62, 64, 65, 67] and candidate MIDI notes [60, 62, 64, 67, 69], and tell me the Jaccard overlap score.

## When to prefer this

Choose this endpoint when you need a fast, deterministic, purely melodic interval-pattern comparison between two MIDI note sequences expressed as pitch integers. It is ideal for pre-screening melodies for interval similarity before deeper legal or harmonic analysis, or for building melody-matching pipelines. Do not use it for rhythm analysis, harmonic analysis, audio recordings, timbre comparison, or legal determinations of plagiarism — it only measures pitch interval n-gram overlap.

## Known failure modes

- Fewer than 3 MIDI notes provided for either sequence — minimum input size not met
- MIDI note values outside 0–127 range — validation error
- n-gram size exceeds 8 or is less than 1 — parameter out of bounds
- Either sequence has more than 2000 notes — exceeds maximum item count
- Payment not included or insufficient — x402 payment required error
- Empty array or missing required field — request body validation failure

## How this service works

Converts caller-supplied MIDI-note sequences to adjacent pitch intervals, forms fixed-length interval n-gram sets and reports Jaccard overlap. It does not analyze rhythm, harmony, timbre, recordings, access to prior work or legal substantial similarity, and cannot determine plagiarism.

## Output

Returns the Jaccard similarity score between the reference and candidate melody's interval n-gram sets — a value between 0 (no shared interval patterns) and 1 (identical interval n-gram sets). Also returns the computed interval n-gram sets derived from both MIDI note sequences.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "interval_ngram_size": {
   "type": "integer",
   "maximum": 8,
   "minimum": 1
  },
  "candidate_midi_notes": {
   "type": "array",
   "items": {
    "type": "integer",
    "maximum": 127,
    "minimum": 0
   },
   "maxItems": 2000,
   "minItems": 3
  },
  "reference_midi_notes": {
   "type": "array",
   "items": {
    "type": "integer",
    "maximum": 127,
    "minimum": 0
   },
   "maxItems": 2000,
   "minItems": 3
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/halowerk-music-interval-n-gram-jaccard-similarity-a83dc36c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from creator.halowerk.com](https://www.zero.xyz/host/creator.halowerk.com/llms.txt)
