{
  "openapi": "3.0.1",
  "info": {
    "title": "Court Hearing Transcription (Degravação) with Speakers",
    "description": "Transcribe court hearings and legal audio (degravação de audiências) into a DOCX and TXT with speaker separation and timestamps per turn. High-precision Whisper for Portuguese. Pay per minute. Draft for review, not a certified transcript.",
    "version": "0.1",
    "x-build-id": "SJuE24li8e0q4hhTI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plum_spear~aztec-court-hearing-transcription/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plum_spear-aztec-court-hearing-transcription",
        "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/plum_spear~aztec-court-hearing-transcription/runs": {
      "post": {
        "operationId": "runs-sync-plum_spear-aztec-court-hearing-transcription",
        "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/plum_spear~aztec-court-hearing-transcription/run-sync": {
      "post": {
        "operationId": "run-sync-plum_spear-aztec-court-hearing-transcription",
        "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": [
          "mediaUrls"
        ],
        "properties": {
          "mediaUrls": {
            "title": "Media file URLs",
            "minItems": 1,
            "type": "array",
            "description": "Direct links to audio or video files (mp3, wav, m4a, aac, flac, ogg, opus, mp4, webm, mkv, mov). Each link must return the file itself, not a web page. For a file you uploaded to an Apify key-value store, use the record's public URL (with its signature). YouTube, Instagram, TikTok and similar platforms are refused.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "ISO 639-1 code of the spoken language. 'pt' for Portuguese (Brazil and Portugal), 'en' for English. Use 'auto' to detect it.",
            "default": "pt"
          },
          "quality": {
            "title": "Quality",
            "enum": [
              "high",
              "standard"
            ],
            "type": "string",
            "description": "'high' (default) transcribes with Whisper large-v3-turbo on Groq: far more accurate than the in-container model, especially in Portuguese and in noisy audio. WITH 'high' THE AUDIO IS SENT TO GROQ (United States). 'standard' runs a smaller Whisper model inside this Actor, the audio never leaves the run, and the accuracy is clearly lower. If Groq is unavailable for a block, that block is transcribed in the container and billed at the standard price.",
            "default": "high"
          },
          "speakerCount": {
            "title": "Number of speakers",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "If you know how many people speak, set it (1 to 10): it makes the speaker separation more reliable. Leave empty to detect it automatically."
          },
          "speakerLabels": {
            "title": "Speaker names or roles",
            "type": "array",
            "description": "Names for the speakers in the order they first speak, for example Juiz, Advogado, Testemunha. Speakers without a name are called Falante 3, Falante 4 and so on.",
            "items": {
              "type": "string"
            }
          },
          "caseNumber": {
            "title": "Case number",
            "type": "string",
            "description": "Shown in the header of the DOCX and TXT."
          },
          "court": {
            "title": "Court",
            "type": "string",
            "description": "Court or panel, shown in the header."
          },
          "hearingDate": {
            "title": "Hearing date",
            "type": "string",
            "description": "Free text, shown in the header (for example 07/10/2026)."
          },
          "documentTitle": {
            "title": "Document title",
            "type": "string",
            "description": "Replaces the default title 'Degravação de audiência'."
          },
          "outputs": {
            "title": "Documents",
            "type": "array",
            "description": "Files saved in the key-value store of the run, with a download link in each dataset item. The dataset item always carries the full transcript as JSON.",
            "items": {
              "type": "string",
              "enum": [
                "docx",
                "txt"
              ]
            },
            "default": [
              "docx",
              "txt"
            ]
          },
          "maxDurationMinutes": {
            "title": "Max duration per file (minutes)",
            "minimum": 1,
            "maximum": 240,
            "type": "integer",
            "description": "Audio beyond this length is not transcribed or charged. Files whose header already shows a longer duration are refused without charge.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}