{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF to Audiobook — Text to Speech for PDF, EPUB, DOCX & Web",
    "description": "Turn PDF, EPUB, DOCX, TXT files and web articles into natural-sounding audiobooks (MP3 or M4B with chapters) with Kokoro AI voices. English, Spanish, French, Italian, Portuguese, Hindi. Bulk text to speech from datasets. No API key needed.",
    "version": "1.0",
    "x-build-id": "Pc1czMhaDaFMJ6QGH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidydata~pdf-to-audiobook/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidydata-pdf-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/tidydata~pdf-to-audiobook/runs": {
      "post": {
        "operationId": "runs-sync-tidydata-pdf-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/tidydata~pdf-to-audiobook/run-sync": {
      "post": {
        "operationId": "run-sync-tidydata-pdf-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": {
          "fileUrls": {
            "title": "Document links",
            "type": "array",
            "description": "One link per line: PDF, EPUB, DOCX, ODT, RTF, TXT or Markdown files, Google Docs / Google Drive / Dropbox / OneDrive share links, or any web article (its main text is read, menus and ads are left out). Each document becomes one audiobook. DRM-protected ebooks and scanned PDFs without text are not supported (free).",
            "items": {
              "type": "string"
            }
          },
          "uploadedFiles": {
            "title": "Or upload documents",
            "type": "array",
            "description": "Upload PDF, EPUB, DOCX, TXT… files from your computer (they go to a key-value store of your account and only this run reads them)."
          },
          "texts": {
            "title": "Or: text to read aloud",
            "type": "array",
            "description": "Each line/item is read aloud into its own audio file (bulk text to speech). Paste a whole article as one item; Markdown headings (# Title) become chapters.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language",
            "enum": [
              "auto",
              "en-us",
              "en-gb",
              "es",
              "fr",
              "it",
              "pt-br",
              "hi"
            ],
            "type": "string",
            "description": "Language of the text: it decides the pronunciation and the default voice.",
            "default": "auto"
          },
          "voice": {
            "title": "Voice",
            "enum": [
              "female",
              "male",
              "af_heart",
              "af_bella",
              "af_nicole",
              "af_aoede",
              "af_kore",
              "af_sarah",
              "af_nova",
              "af_sky",
              "am_michael",
              "am_fenrir",
              "am_puck",
              "am_echo",
              "am_eric",
              "am_liam",
              "am_onyx",
              "am_adam",
              "bf_emma",
              "bf_isabella",
              "bf_alice",
              "bf_lily",
              "bm_george",
              "bm_fable",
              "bm_lewis",
              "bm_daniel",
              "ef_dora",
              "em_alex",
              "em_santa",
              "ff_siwis",
              "if_sara",
              "im_nicola",
              "pf_dora",
              "pm_alex",
              "hf_alpha",
              "hf_beta",
              "hm_omega",
              "hm_psi"
            ],
            "type": "string",
            "description": "'Female' / 'Male' pick the best Kokoro voice for the detected language. A named voice reads any language with its own accent.",
            "default": "female"
          },
          "speed": {
            "title": "Reading speed",
            "minimum": 0.5,
            "maximum": 2,
            "type": "number",
            "description": "1 = natural pace (about 150 words per minute in English). 0.9 for learners, 1.2-1.3 for fast listening. You pay per minute of the result, so faster = cheaper.",
            "default": 1
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "mp3",
              "m4b",
              "m4a",
              "opus",
              "wav"
            ],
            "type": "string",
            "description": "Chapter marks come from the book's table of contents (EPUB, PDF bookmarks, Word headings, Markdown headings). EPUB covers are embedded as artwork.",
            "default": "mp3"
          },
          "chapterFiles": {
            "title": "Also one file per chapter",
            "type": "boolean",
            "description": "Besides the full audiobook, return each chapter as its own MP3 (or the chosen format). Included in the price.",
            "default": false
          },
          "readChapterTitles": {
            "title": "Read chapter titles",
            "type": "boolean",
            "description": "Say each chapter's title before it, with a short pause.",
            "default": true
          },
          "readTitle": {
            "title": "Read the book title and author first",
            "type": "boolean",
            "description": "Starts with e.g. 'Alice's Adventures in Wonderland. By Lewis Carroll.' when the document has them.",
            "default": true
          },
          "saveText": {
            "title": "Save the text that was read",
            "type": "boolean",
            "description": "A .txt with exactly what the voice read (after removing page numbers, headers, footnote marks, links). Free.",
            "default": true
          },
          "embedCover": {
            "title": "Embed the EPUB cover",
            "type": "boolean",
            "description": "Use the ebook's cover as the audiobook artwork (MP3 / M4B / M4A).",
            "default": true
          },
          "bitrateKbps": {
            "title": "Bitrate",
            "minimum": 32,
            "maximum": 192,
            "type": "integer",
            "description": "Mono speech: 64 kbps is clear and small (≈ 28 MB per hour); 96-128 for archiving.",
            "default": 64
          },
          "maxCharactersPerDocument": {
            "title": "Max characters per document",
            "minimum": 100,
            "maximum": 10000000,
            "type": "integer",
            "description": "Reading stops after about this many characters (1,500,000 ≈ 28 hours of audio), so a huge file by mistake can't run up a big bill. A novel is 300,000-600,000.",
            "default": 1500000
          },
          "maxPagesPerPdf": {
            "title": "Max pages per PDF",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Only the first pages are read beyond this.",
            "default": 2000
          },
          "maxDocuments": {
            "title": "Max documents",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many documents (links, texts, dataset rows together).",
            "default": 100
          },
          "maxFileSizeMb": {
            "title": "Max input file size",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Bigger files are not downloaded (free).",
            "default": 200
          },
          "keyValueStoreId": {
            "title": "Or: documents of a key-value store",
            "type": "string",
            "description": "Read aloud the documents saved in one of your key-value stores (keys ending in .pdf, .epub, .docx, .txt…). Only read access to this one store is requested."
          },
          "keyValueStoreKeys": {
            "title": "Only these keys of the store",
            "type": "array",
            "description": "Record keys to read. Empty = every document record of the store (up to 'Max documents').",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or: dataset of another Actor (chain it)",
            "type": "string",
            "description": "A dataset from another run: each row's text field is read aloud into its own file (e.g. articles, posts, product descriptions), and/or its document links are turned into audiobooks. Only read access to this one dataset is requested."
          },
          "datasetTextField": {
            "title": "Dataset field with the text",
            "type": "string",
            "description": "Field holding the text to read (nested paths work: article.body). One audio file per row."
          },
          "datasetUrlFields": {
            "title": "Dataset fields with document links",
            "type": "string",
            "description": "Field name(s), comma separated, holding links to PDF/EPUB/DOCX files or articles."
          },
          "datasetNameField": {
            "title": "Dataset field for the file name",
            "type": "string",
            "description": "Optional: name each audio file after this field (e.g. title, id)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}