# Music Production Calc – Song Length Calculator

> Music Production Calc – Song Length Calculator is a paid API for AI agents from music-production-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Calculates song length in seconds and M:SS from bars, BPM, and time signature, and optionally computes the bars needed or BPM required to hit a target duration.

## Facts

- Endpoint: GET https://music-production-calc.x402tookit.com/song-length?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/music-production-calc-song-length-calculator-6cdc8e9d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rHM6584OeX2QaZxAOhm0R

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-production-calc-song-length-calculator-6cdc8e9d
```

Example prompt: How long is a song that's 96 bars at 128 BPM with a 4/4 time signature? Also tell me what BPM I'd need to make those 96 bars land exactly at 3 minutes 30 seconds.

## When to prefer this

Choose this endpoint when you need precise musical timing calculations — converting bars and tempo to wall-clock duration, or reverse-engineering the BPM or bar count to hit a specific length. It natively handles non-standard time signatures and BPM counting modes (quarter vs. denominator note), making it more accurate than generic calculators for compound meters like 6/8 or odd time signatures.

## Known failure modes

- Missing required 'bars' or 'bpm' parameters returns a validation error
- BPM outside the 20–400 range may be rejected or produce implausible results
- Invalid beatUnit (not 1, 2, 4, 8, or 16) causes a schema error
- Invalid bpmUnit string causes an error
- Payment not included or insufficient results in HTTP 402 Payment Required

## How this service works

Song length in seconds and m:ss from bars, BPM and time signature, plus bars or BPM needed for a target length.

## Output

Returns total song duration in seconds and M:SS clock format, along with derived values like bars per minute, seconds per bar, total beats, and seconds per counted beat. When a targetSeconds value is provided, also returns the number of bars needed and the BPM that would make the given bar count fit exactly into the target duration.

## 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": [
      "bars",
      "bpm"
     ],
     "properties": {
      "bpm": {
       "type": "number",
       "description": "Tempo in BPM, 20 to 400"
      },
      "bars": {
       "type": "number",
       "description": "Number of bars (partial bars allowed)"
      },
      "bpmUnit": {
       "type": "string",
       "description": "quarter (default): BPM counts quarter notes; beat: BPM counts the denominator note (6/8 at 120 = 120 eighths a minute)"
      },
      "beatUnit": {
       "type": "integer",
       "description": "Time signature denominator: 1, 2, 4, 8 or 16 (default 4)"
      },
      "beatsPerBar": {
       "type": "integer",
       "description": "Time signature numerator (default 4)"
      },
      "targetSeconds": {
       "type": "number",
       "description": "A target length in seconds, to get bars needed and the BPM that fits your bars"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "bpm": {
       "type": [
        "null",
        "number"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "bars": {
       "type": [
        "null",
        "number"
       ]
      },
      "clock": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "bpmCounts": {
       "type": [
        "null",
        "string"
       ]
      },
      "barSeconds": {
    
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/music-production-calc-song-length-calculator-6cdc8e9d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from music-production-calc.x402tookit.com](https://www.zero.xyz/host/music-production-calc.x402tookit.com/llms.txt)
