{
  "openapi": "3.0.1",
  "info": {
    "title": "ToneParcel — Audio Mastering & Loudness API",
    "description": "Batch audio mastering with six presets, loudness normalization and measured output.",
    "version": "0.1",
    "x-build-id": "hMCiXsZiVPzwbaEQR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/epubpreflight~toneparcel-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-epubpreflight-toneparcel-api",
        "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/epubpreflight~toneparcel-api/runs": {
      "post": {
        "operationId": "runs-sync-epubpreflight-toneparcel-api",
        "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/epubpreflight~toneparcel-api/run-sync": {
      "post": {
        "operationId": "run-sync-epubpreflight-toneparcel-api",
        "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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Source file URLs",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "1–10 public WAV/MP3 URLs; 0.4–300 seconds, 60 MiB, mono/stereo, 44.1/48 kHz.",
            "items": {
              "type": "string"
            }
          },
          "options": {
            "title": "Processing options",
            "type": "object",
            "description": "Choose a mastering preset or set mode to normalize/analyze. Preset and effects apply only in master mode. See README for options.",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "analyze",
                  "normalize",
                  "master"
                ],
                "title": "mode",
                "description": "Optional mode override. See README for defaults and behavior.",
                "editor": "select"
              },
              "preset": {
                "type": "string",
                "enum": [
                  "transparent",
                  "warm-tape",
                  "crystal-air",
                  "punch-glue",
                  "wide-cinema",
                  "loud-clear"
                ],
                "title": "preset",
                "description": "Optional preset override. See README for defaults and behavior.",
                "editor": "select"
              },
              "targetLufs": {
                "type": "number",
                "minimum": -30,
                "maximum": -9,
                "title": "targetLufs",
                "description": "Optional targetLufs override. See README for defaults and behavior.",
                "editor": "number"
              },
              "truePeakCeiling": {
                "type": "number",
                "minimum": -6,
                "maximum": -0.3,
                "title": "truePeakCeiling",
                "description": "Optional truePeakCeiling override. See README for defaults and behavior.",
                "editor": "number"
              },
              "format": {
                "type": "string",
                "enum": [
                  "wav",
                  "mp3"
                ],
                "title": "format",
                "description": "Optional format override. See README for defaults and behavior.",
                "editor": "select"
              },
              "sampleRate": {
                "type": "integer",
                "title": "sampleRate",
                "description": "Accepted values: 44100, 48000. Other numbers are rejected by the processor.",
                "editor": "number",
                "minimum": 44100,
                "maximum": 48000
              },
              "bitDepth": {
                "type": "integer",
                "title": "bitDepth",
                "description": "Accepted values: 16, 24. Other numbers are rejected by the processor.",
                "editor": "number",
                "minimum": 16,
                "maximum": 24
              },
              "mp3Bitrate": {
                "type": "integer",
                "title": "mp3Bitrate",
                "description": "Accepted values: 128, 192, 256, 320. Other numbers are rejected by the processor.",
                "editor": "number",
                "minimum": 128,
                "maximum": 320
              },
              "effects": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "warmth": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "title": "warmth",
                    "description": "Optional warmth override. See README for defaults and behavior.",
                    "editor": "number"
                  },
                  "clarity": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "title": "clarity",
                    "description": "Optional clarity override. See README for defaults and behavior.",
                    "editor": "number"
                  },
                  "air": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "title": "air",
                    "description": "Optional air override. See README for defaults and behavior.",
                    "editor": "number"
                  },
                  "lowEndClean": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "title": "lowEndClean",
                    "description": "Optional lowEndClean override. See README for defaults and behavior.",
                    "editor": "number"
                  },
                  "glueCompression": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "title": "glueCompression",
                    "description": "Optional glueCompression override. See README for defaults and behavior.",
                    "editor": "number"
                  },
                  "autoLevelStrength": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "title": "autoLevelStrength",
                    "description": "Optional autoLevelStrength override. See README for defaults and behavior.",
                    "editor": "number"
                  },
                  "stereoWidth": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 150,
                    "title": "stereoWidth",
                    "description": "Optional stereoWidth override. See README for defaults and behavior.",
                    "editor": "number"
                  },
                  "monoBassAnchor": {
                    "type": "boolean",
                    "title": "monoBassAnchor",
                    "description": "Optional monoBassAnchor override. See README for defaults and behavior.",
                    "editor": "checkbox"
                  }
                },
                "title": "effects",
                "description": "Optional effects override. See README for defaults and behavior.",
                "editor": "json"
              }
            },
            "default": {
              "mode": "master",
              "preset": "transparent"
            },
            "additionalProperties": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}