{
  "openapi": "3.0.1",
  "info": {
    "title": "CremyX Turbo ASR",
    "version": "0.4",
    "x-build-id": "PApaYdjfqiH598d7Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/andrew_babo~cremyx-turbo-asr/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-andrew_babo-cremyx-turbo-asr",
        "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~cremyx-turbo-asr/runs": {
      "post": {
        "operationId": "runs-sync-andrew_babo-cremyx-turbo-asr",
        "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~cremyx-turbo-asr/run-sync": {
      "post": {
        "operationId": "run-sync-andrew_babo-cremyx-turbo-asr",
        "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": [
          "source"
        ],
        "properties": {
          "source": {
            "title": "Source",
            "type": "string",
            "description": "https:// URL (public artifact URL from a previous run, or any reachable media) or kv:<storeId>/<key>. Range-queried when the server allows it."
          },
          "start_sec": {
            "title": "Shard start (seconds)",
            "type": "number",
            "description": "Offset of this shard on the original timeline.",
            "default": 0
          },
          "duration_sec": {
            "title": "Shard duration (seconds)",
            "type": "number",
            "description": "Shard length before the tail overlap. 240-300s is the measured sweet spot for faster-whisper on CPU (RTF ~4.7x); short 15-45s shards waste fixed overhead.",
            "default": 240
          },
          "overlap_sec": {
            "title": "Tail overlap (seconds)",
            "maximum": 30,
            "type": "number",
            "description": "Extra audio past duration_sec; words there are flagged _overlap so the engine can dedupe.",
            "default": 1.5
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "ISO code (en, vi, ...). Omit for auto-detect."
          },
          "preset": {
            "title": "Preset",
            "enum": [
              "fast",
              "adaptive",
              "balanced",
              "accurate"
            ],
            "type": "string",
            "description": "fast | adaptive | balanced | accurate",
            "default": "fast"
          },
          "allow_empty": {
            "title": "Allow empty transcript",
            "type": "boolean",
            "description": "Silent windows return 0 words instead of failing.",
            "default": true
          },
          "model": {
            "title": "Model",
            "enum": [
              "large-v3-turbo",
              "distil-large-v3",
              "medium"
            ],
            "type": "string",
            "description": "Baked models. large-v3-turbo = multilingual default (Vietnamese OK). distil-large-v3 is ENGLISH-ONLY and is auto-downgraded to large-v3-turbo for non-English audio. medium = smaller/faster, lower accuracy.",
            "default": "large-v3-turbo"
          },
          "vad_filter": {
            "title": "VAD filter",
            "type": "boolean",
            "description": "Skip silence before decoding. Cuts compute on sparse audio but can clip word boundaries.",
            "default": false
          },
          "cpu_threads": {
            "title": "CPU threads",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "faster-whisper cpu_threads. 4 measured best on a 16 GB Apify run (~4 vCPU).",
            "default": 4
          },
          "batch_size": {
            "title": "Batch size",
            "minimum": 0,
            "maximum": 32,
            "type": "integer",
            "description": "BatchedInferencePipeline batch size: VAD chunks decoded in parallel so every cpu_thread stays busy. 0/1 = sequential decode.",
            "default": 8
          },
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "Để trống = 1 window/run. 'batch' = worker ấm chạy danh sách 'windows' (khuyến nghị). 'pool_worker' = lấy window từ Apify request queue (cần cùng account + full permissions).",
            "default": ""
          },
          "queue_id": {
            "title": "Request queue id (pool_worker)",
            "type": "string",
            "description": "Apify request queue holding the windows. fetch_next_request is atomic, so workers never take the same window twice."
          },
          "dataset_id": {
            "title": "Shared dataset id (pool_worker)",
            "type": "string",
            "description": "Dataset every worker pushes its window rows into, so the engine reads one stream."
          },
          "worker_label": {
            "title": "Worker label (pool_worker)",
            "type": "string",
            "description": "Free-form label echoed back in each row for telemetry."
          },
          "idle_sec": {
            "title": "Idle leash (pool_worker)",
            "type": "number",
            "description": "Exit after this many seconds with an empty queue. 2-120.",
            "default": 25
          },
          "max_life_sec": {
            "title": "Lifetime leash (pool_worker)",
            "type": "number",
            "description": "Hard stop for one worker. 30-900.",
            "default": 600
          },
          "max_jobs": {
            "title": "Job leash (pool_worker)",
            "type": "integer",
            "description": "Hard stop after this many windows. 1-512.",
            "default": 64
          },
          "windows": {
            "title": "Windows (batch worker)",
            "type": "array",
            "description": "Danh sách window chia sẵn cho MỘT worker ấm: [{job_id,shard_index,source,start_sec,duration_sec,overlap_sec,preset,model,vad_filter}]. Mô hình nạp một lần cho cả danh sách."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}