{
  "openapi": "3.0.1",
  "info": {
    "title": "Document to Audiobook: EPUB, PDF, DOCX to MP3",
    "description": "Turn EPUB, PDF, DOCX, MOBI, AZW3, ODT, RTF, PPTX, web articles and 150+ other formats into MP3 or M4B audiobooks with chapters and SRT subtitles. Batch files or a ZIP, 322 natural voices in 75 languages, OCR for scans. $0.01 per audio minute.",
    "version": "1.0",
    "x-build-id": "a4r4bNeqjPyujPidt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/offerastudio~document-to-audiobook/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-offerastudio-document-to-audiobook",
        "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/offerastudio~document-to-audiobook/runs": {
      "post": {
        "operationId": "runs-sync-offerastudio-document-to-audiobook",
        "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/offerastudio~document-to-audiobook/run-sync": {
      "post": {
        "operationId": "run-sync-offerastudio-document-to-audiobook",
        "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": {
          "documentFile": {
            "title": "Document file (upload)",
            "type": "string",
            "description": "Upload one document, or a ZIP / 7z / RAR / TAR archive with many documents (each becomes its own audiobook, or one audiobook with \"Merge into one audiobook\"). EPUB, PDF, DOCX, DOC, MOBI, AZW3, ODT, RTF, TXT, Markdown, HTML, PPTX, XLSX, FB2, LIT, CHM, DjVu, XPS, images (OCR) and 150+ more."
          },
          "documentUrls": {
            "title": "Document or web page URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Direct links to documents in any supported format, Google Drive / Docs, Dropbox or OneDrive share links (shared with anyone who has the link), or web pages (only the main article is read). Up to 100; put more files in one ZIP.",
            "items": {
              "type": "string"
            }
          },
          "text": {
            "title": "Text",
            "type": "string",
            "description": "Or paste text directly. Lines like \"Chapter 1\" start new chapters."
          },
          "language": {
            "title": "Language",
            "enum": [
              "auto",
              "af",
              "sq",
              "am",
              "ar",
              "az",
              "bn",
              "bs",
              "bg",
              "my",
              "ca",
              "zh",
              "hr",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fil",
              "fi",
              "fr",
              "gl",
              "ka",
              "de",
              "el",
              "gu",
              "he",
              "hi",
              "hu",
              "is",
              "id",
              "iu",
              "ga",
              "it",
              "ja",
              "jv",
              "kn",
              "kk",
              "km",
              "ko",
              "lo",
              "lv",
              "lt",
              "mk",
              "ms",
              "ml",
              "mt",
              "mr",
              "mn",
              "ne",
              "nb",
              "ps",
              "fa",
              "pl",
              "pt",
              "ro",
              "ru",
              "sr",
              "si",
              "sk",
              "sl",
              "so",
              "es",
              "su",
              "sw",
              "sv",
              "ta",
              "te",
              "th",
              "tr",
              "uk",
              "ur",
              "uz",
              "vi",
              "cy",
              "zu"
            ],
            "type": "string",
            "description": "Language of the voice. Auto detects it from each document's text.",
            "default": "auto"
          },
          "voiceGender": {
            "title": "Voice gender",
            "enum": [
              "female",
              "male"
            ],
            "type": "string",
            "description": "Used when no voice is named below.",
            "default": "female"
          },
          "voice": {
            "title": "Voice (optional)",
            "type": "string",
            "description": "A specific voice, such as en-US-AndrewNeural, en-GB-SoniaNeural, de-DE-KatjaNeural or tr-TR-AhmetNeural. Overrides language and gender. The README lists all 322 voices."
          },
          "speed": {
            "title": "Speed (%)",
            "minimum": -50,
            "maximum": 100,
            "type": "integer",
            "description": "-50 is half speed, 0 normal, 100 twice as fast. Faster speech means fewer audio minutes, so it also costs less.",
            "default": 0
          },
          "pitch": {
            "title": "Pitch (Hz)",
            "minimum": -50,
            "maximum": 50,
            "type": "integer",
            "description": "Lower or raise the voice.",
            "default": 0
          },
          "volume": {
            "title": "Volume (%)",
            "minimum": -50,
            "maximum": 50,
            "type": "integer",
            "description": "Quieter or louder.",
            "default": 0
          },
          "audioFormat": {
            "title": "Audio format",
            "enum": [
              "mp3",
              "m4b"
            ],
            "type": "string",
            "description": "Both formats include chapter marks, title and author.",
            "default": "mp3"
          },
          "mergeIntoOne": {
            "title": "Merge into one audiobook",
            "type": "boolean",
            "description": "With several documents, make one audiobook in which each document is a chapter, instead of one audiobook per document.",
            "default": false
          },
          "chapterFiles": {
            "title": "Also save one file per chapter",
            "type": "boolean",
            "description": "Besides the full audiobook, save every chapter as its own file (for players without chapter support). Same price.",
            "default": false
          },
          "subtitles": {
            "title": "SRT subtitles",
            "type": "boolean",
            "description": "Save a timed SRT transcript of the audio, sentence by sentence.",
            "default": true
          },
          "speakChapterTitles": {
            "title": "Read chapter titles aloud",
            "type": "boolean",
            "description": "Say each chapter heading before its text.",
            "default": true
          },
          "readTables": {
            "title": "Read tables",
            "type": "boolean",
            "description": "Read table rows as sentences. Off: skip tables.",
            "default": true
          },
          "readCode": {
            "title": "Read code blocks",
            "type": "boolean",
            "description": "Read program code in technical documents. Off: skip it.",
            "default": false
          },
          "ocr": {
            "title": "OCR for scans and images",
            "type": "boolean",
            "description": "Read scanned PDFs, DjVu files, photos of pages, handwriting and comic archives with AI OCR. Charged per page. Off: such files fail without charge.",
            "default": true
          },
          "ocrLanguage": {
            "title": "OCR language (optional)",
            "type": "string",
            "description": "Only for the classic OCR fallback (AI OCR detects the language itself). Tesseract codes joined with +, for example eng, tur, deu+eng, chi_sim. Empty: the Language above (English when Auto)."
          },
          "maxCharactersPerDocument": {
            "title": "Max characters per document",
            "minimum": 100,
            "maximum": 10000000,
            "type": "integer",
            "description": "Safety limit: longer documents are cut (2,000,000 characters is about a 40-hour audiobook). \"Max cost per run\" is also respected: when it would be passed, only the beginning is read.",
            "default": 2000000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}