{
  "openapi": "3.0.1",
  "info": {
    "title": "Beat Detector - BPM, Drops & Video Edit Markers",
    "description": "Analyze any song or video soundtrack and get a precise beat grid: BPM, every beat and bar timestamp, energy curve, drop and breakdown points, section mood labels, plus ready-to-import markers for Premiere, DaVinci, Audacity and CapCut. No rental fee - you pay Apify compute only.",
    "version": "0.5",
    "x-build-id": "dPxJXGv2B1nN1USnO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/andrew_babo~audio-beat-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-andrew_babo-audio-beat-analyzer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/andrew_babo~audio-beat-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-andrew_babo-audio-beat-analyzer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/andrew_babo~audio-beat-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-andrew_babo-audio-beat-analyzer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "audioUrls": {
            "title": "Audio or video URLs",
            "type": "array",
            "description": "Direct links to MP3, WAV, M4A, FLAC, OGG, MP4 or MOV files. Audio is extracted automatically from video.",
            "items": {
              "type": "string"
            }
          },
          "keyValueStoreRecords": {
            "title": "Uploaded files (key-value store records)",
            "type": "array",
            "description": "Files you uploaded to an Apify key-value store, e.g. [{\"storeId\":\"<store id>\",\"key\":\"track.mp3\"}]. Omit storeId to read from this run's own store."
          },
          "beatsPerBar": {
            "title": "Beats per bar",
            "minimum": 2,
            "maximum": 12,
            "type": "integer",
            "description": "Time signature numerator used for bar (downbeat) markers. 4 covers most music.",
            "default": 4
          },
          "depth": {
            "title": "Analysis depth",
            "enum": [
              "fast",
              "standard",
              "deep"
            ],
            "type": "string",
            "description": "How deep the analysis goes. Fast is ~100x realtime, standard is the default, deep adds chord segments and drum/bass/harmony/voice levels.",
            "default": "standard"
          },
          "tempoMode": {
            "title": "Tempo tracking",
            "enum": [
              "auto",
              "constant",
              "variable"
            ],
            "type": "string",
            "description": "Constant fits one BPM to the whole track (best for electronic music). Variable follows tempo changes (live bands, rubato piano, film score). Auto picks per track.",
            "default": "auto"
          },
          "precisionMode": {
            "title": "Beat precision",
            "enum": [
              "high",
              "standard"
            ],
            "type": "string",
            "description": "High snaps every beat to the real onset at 2.9 ms resolution with sub-frame interpolation, then re-fits tempo and phase. Grid drift typically drops from ~20 ms to 3-8 ms.",
            "default": "high"
          },
          "detectMeter": {
            "title": "Detect time signature",
            "type": "boolean",
            "description": "Guess 3/4 vs 4/4 automatically instead of always using the beats-per-bar value.",
            "default": true
          },
          "fixedBpm": {
            "title": "Known BPM (optional)",
            "type": "string",
            "description": "Force the grid to a BPM you already know, e.g. 128. Leave empty to detect automatically."
          },
          "bpmRangeMin": {
            "title": "Minimum BPM",
            "minimum": 30,
            "maximum": 200,
            "type": "integer",
            "description": "Lower bound used to resolve half/double-tempo ambiguity.",
            "default": 60
          },
          "bpmRangeMax": {
            "title": "Maximum BPM",
            "minimum": 60,
            "maximum": 300,
            "type": "integer",
            "description": "Upper bound used to resolve half/double-tempo ambiguity.",
            "default": 190
          },
          "peakSensitivity": {
            "title": "Drop detection sensitivity",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Higher values return more climax and breakdown points; lower values keep only the strongest ones.",
            "default": 5
          },
          "maxSections": {
            "title": "Maximum sections",
            "minimum": 2,
            "maximum": 24,
            "type": "integer",
            "description": "Upper bound on how many structural sections the track is split into.",
            "default": 10
          },
          "analyzeMood": {
            "title": "Label section mood",
            "type": "boolean",
            "description": "Add happy / sad / intense / calm labels plus energy and brightness scores per section. Turn off for a faster run.",
            "default": true
          },
          "includeBeatList": {
            "title": "Include every beat timestamp",
            "type": "boolean",
            "description": "Return the full beat and downbeat arrays in the dataset row. Turn off for compact output; marker files still contain them.",
            "default": true
          },
          "exportMarkerFiles": {
            "title": "Export marker files",
            "type": "boolean",
            "description": "Write Premiere/DaVinci CSV, Audacity TXT, CapCut JSON and a strong-beat cue list to the run key-value store.",
            "default": true
          },
          "concurrency": {
            "title": "Parallel files",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many files are analyzed at the same time in one run. Higher values finish large batches sooner.",
            "default": 3
          },
          "maxDurationSecs": {
            "title": "Analyze only first N seconds",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "0 analyzes the whole file. Use a value to cap cost on long files.",
            "default": 0
          },
          "failOnZeroResults": {
            "title": "Fail the run when nothing could be analyzed",
            "type": "boolean",
            "description": "Off by default: unreadable links return a dataset row with an error code and the run still finishes successfully. Turn on if your pipeline relies on a failed run status.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}