{
  "openapi": "3.0.1",
  "info": {
    "title": "Audio Splitter & Compressor for Whisper and Speech-to-Text",
    "description": "Split audio/video at pauses or compress under 25 MB for OpenAI Whisper, Groq & other STT APIs. Timestamps for stitching. ffmpeg, no AI key.",
    "version": "0.1",
    "x-build-id": "UqXKukqDq7p9B8Kcv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ataism~whisper-audio-splitter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ataism-whisper-audio-splitter",
        "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/ataism~whisper-audio-splitter/runs": {
      "post": {
        "operationId": "runs-sync-ataism-whisper-audio-splitter",
        "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/ataism~whisper-audio-splitter/run-sync": {
      "post": {
        "operationId": "run-sync-ataism-whisper-audio-splitter",
        "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 file URLs",
            "type": "array",
            "description": "Direct http(s) links to audio or video files (mp3, m4a, wav, ogg, opus, webm, mp4, mov, flac and more), one per line. Private and local addresses are blocked. To use a file from your computer, upload it with the next field.",
            "default": [
              "https://upload.wikimedia.org/wikipedia/commons/a/a5/Booker_T._Washington_reading_an_excerpt_from_his_1895_Atlanta_Compromise_speech.mp3"
            ],
            "items": {
              "type": "string"
            }
          },
          "audioFiles": {
            "title": "Uploaded files",
            "type": "array",
            "description": "Upload files from your computer (the editor stores them in a key-value store), or paste key-value store record URLs."
          },
          "operation": {
            "title": "What to do",
            "enum": [
              "split",
              "fit",
              "convert"
            ],
            "type": "string",
            "description": "Split: chunks no longer than the max chunk length and no bigger than the target size, cut at pauses. Fit: one file compressed to fit the target size. Convert: one file in the chosen format, no size control.",
            "default": "split"
          },
          "target": {
            "title": "Target size limit",
            "enum": [
              "openai-25mb",
              "groq-25mb",
              "groq-100mb",
              "custom"
            ],
            "type": "string",
            "description": "The upload limit of your speech-to-text service. Files stay 3% below it.",
            "default": "openai-25mb"
          },
          "customTargetMb": {
            "title": "Custom target size (MB)",
            "minimum": 1,
            "maximum": 150,
            "type": "number",
            "description": "Only used when Target size limit is Custom. 1 to 150 MB.",
            "default": 25
          },
          "maxChunkMinutes": {
            "title": "Max chunk length (minutes)",
            "minimum": 0.5,
            "maximum": 240,
            "type": "number",
            "description": "Split only. Each chunk is at most this long (and always under the target size). Some models also limit duration, so 10 minutes is a safe default.",
            "default": 10
          },
          "overlapSeconds": {
            "title": "Overlap (seconds)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Split only. Each chunk after the first starts this many seconds before its cut, so no word is lost when a cut falls mid-word. 0 to 5. Overlap is not charged.",
            "default": 0
          },
          "format": {
            "title": "Output format",
            "enum": [
              "mp3",
              "m4a",
              "ogg",
              "flac",
              "wav"
            ],
            "type": "string",
            "description": "mp3 works everywhere. m4a and ogg (Opus) are smaller for the same quality, but check that your service accepts them. flac and wav are lossless and large (not available for Fit).",
            "default": "mp3"
          },
          "bitrateKbps": {
            "title": "Bitrate (kbps)",
            "minimum": 8,
            "maximum": 320,
            "type": "integer",
            "description": "For mp3, m4a and ogg. 48 kbps mono is clear for speech (about 21 MB per hour). Fit lowers it if needed to reach the target size.",
            "default": 48
          },
          "sampleRate": {
            "title": "Sample rate (Hz)",
            "minimum": 8000,
            "maximum": 48000,
            "type": "integer",
            "description": "16000 Hz is what speech models use internally; higher rates only make files bigger.",
            "default": 16000
          },
          "mono": {
            "title": "Mono",
            "type": "boolean",
            "description": "Mix down to one channel (recommended for speech). Turn off to keep the source's channels.",
            "default": true
          },
          "maxFileSizeMb": {
            "title": "Max input file size (MB)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Larger files are skipped, not charged. Hard cap 2000 MB; also limited by the run's disk (2x memory), so give big files more memory.",
            "default": 500
          },
          "maxDurationMinutes": {
            "title": "Max duration per file (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Longer files are skipped, not charged. Hard cap 600 minutes.",
            "default": 240
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 1800,
            "type": "integer",
            "description": "Per file, including redirects.",
            "default": 300
          },
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "Internal: \"selfTest\" runs the maintainer health check and saves no items.",
            "default": "run"
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}