{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF to MP3 - Convert PDF, EPUB, DOCX & Text to Audiobook",
    "description": "Turn PDF, EPUB, DOCX, Markdown, HTML, TXT or RTF into an MP3 audiobook. Free Edge neural TTS needs no API key, OCR recovers scanned pages, 70+ languages are auto-detected, and OpenAI or ElevenLabs voices work with your own key. Long books split into chapter-sized parts.",
    "version": "0.0",
    "x-build-id": "evmz4Jah1dMjjj4hR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/marielise.dev~pdf-to-mp3/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-marielise.dev-pdf-to-mp3",
        "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/marielise.dev~pdf-to-mp3/runs": {
      "post": {
        "operationId": "runs-sync-marielise.dev-pdf-to-mp3",
        "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/marielise.dev~pdf-to-mp3/run-sync": {
      "post": {
        "operationId": "run-sync-marielise.dev-pdf-to-mp3",
        "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": {
          "documentUrl": {
            "title": "Document URL",
            "type": "string",
            "description": "Public http(s) URL of the document to narrate. Handles PDF, DOCX, EPUB, Markdown (.md/.mdx), TXT, HTML and RTF; the format is detected from the bytes, not the extension. Scanned PDFs are recovered with OCR and encrypted PDFs need pdfPassword. Use this OR documentFile OR documentBase64 OR text.",
            "default": "https://www.orimi.com/pdf-test.pdf"
          },
          "documentFile": {
            "title": "Or upload a file from your device",
            "type": "array",
            "description": "File picker for the Apify Console. Accepts .pdf, .docx, .epub, .md, .txt, .html and .rtf. Only the first file is used. API and MCP callers should use documentUrl, documentBase64 or text instead."
          },
          "documentBase64": {
            "title": "Or paste Base64-encoded document",
            "type": "string",
            "description": "Base64-encoded document bytes, for documents that are not publicly hosted. The format is auto-detected from the decoded content. Prefer documentUrl when a URL exists, since base64 inflates the input payload by about a third."
          },
          "text": {
            "title": "Or paste raw text / Markdown",
            "type": "string",
            "description": "Prose, Markdown or HTML pasted directly, for narrating a draft, an article body or a generated summary with no file involved. Markdown and HTML markup is stripped so the voice reads natural prose. Roughly 900 characters becomes one minute of audio."
          },
          "model": {
            "title": "TTS model",
            "enum": [
              "edge-tts",
              "openai-gpt-4o-mini-tts",
              "openai-tts-1",
              "openai-tts-1-hd",
              "elevenlabs-flash-v2_5",
              "elevenlabs-turbo-v2_5"
            ],
            "type": "string",
            "description": "Speech engine. Keep edge-tts unless you need a specific vendor voice: it is free and needs no key. Every openai-* and elevenlabs-* model requires your own API key and is billed by that provider.",
            "default": "edge-tts"
          },
          "language": {
            "title": "Language",
            "enum": [
              "auto",
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "nl",
              "ru",
              "pl",
              "tr",
              "ar",
              "zh",
              "ja",
              "ko",
              "hi",
              "uk",
              "sv",
              "no",
              "da",
              "fi",
              "cs",
              "el",
              "he",
              "th",
              "vi",
              "id",
              "ro",
              "hu"
            ],
            "type": "string",
            "description": "Document language. Keep auto to sample the text and pick a matching voice. Set a code only to correct a bad detection. Ignored when voice is set, and for OpenAI models.",
            "default": "auto"
          },
          "voice": {
            "title": "Voice (optional, overrides language)",
            "type": "string",
            "description": "Leave blank to auto-pick a voice for the detected language. For Edge TTS pass an Azure ShortName such as en-US-AndrewNeural, en-US-AvaNeural, en-GB-SoniaNeural, es-ES-ElviraNeural, fr-FR-DeniseNeural, de-DE-KatjaNeural or pt-BR-FranciscaNeural (400+ voices, 70+ languages). For OpenAI use alloy, echo, fable, onyx, nova, shimmer, coral or sage. For ElevenLabs use a voice ID."
          },
          "speed": {
            "title": "Speech speed",
            "minimum": 0.25,
            "maximum": 4,
            "type": "number",
            "description": "Playback speed multiplier, where 1.0 is the natural pace and 1.5 is comfortable speed-listening. Applies only to the openai-tts-1 and openai-tts-1-hd models; edge-tts and gpt-4o-mini-tts ignore it. Faster speech produces fewer audio minutes and therefore costs less.",
            "default": 1
          },
          "instructions": {
            "title": "Voice instructions (gpt-4o-mini-tts only)",
            "type": "string",
            "description": "Plain-language delivery direction for the openai-gpt-4o-mini-tts model only, for example a calm audiobook narrator or an energetic podcast host. Every other model ignores this field."
          },
          "pageRange": {
            "title": "Page / section range",
            "type": "string",
            "description": "1-indexed range to narrate, for example 1-10 or 1,3,5 or 1-3,7-9. Leave empty for the whole document. For PDFs these are real pages; DOCX, EPUB, TXT, MD, HTML and RTF are split into roughly 3000-character pseudo-pages so the same syntax applies. Narrowing the range is the direct way to cut both run time and cost."
          },
          "enableOcr": {
            "title": "OCR scanned / image-only PDFs",
            "type": "boolean",
            "description": "Recover text from PDF pages that have no selectable text layer by rendering them and running Tesseract OCR. Only pages that actually need it are processed and billed. Turn this off to fail fast on a scan instead of paying to read it.",
            "default": true
          },
          "pdfPassword": {
            "title": "PDF password (for encrypted PDFs)",
            "type": "string",
            "description": "Password used to decrypt a password-protected PDF before text extraction. Leave blank for normal PDFs. Encrypted DOCX and EPUB files are not supported."
          },
          "maxCostUsd": {
            "title": "Max cost ceiling (USD, optional)",
            "minimum": 0.05,
            "type": "number",
            "description": "Hard ceiling on this Actor's charges. If the pre-flight estimate already exceeds it the run stops before any speech is synthesized and you pay only the start fee. If the document turns out longer than estimated, narration stops cleanly at the last part the budget covers and returns status 'capped'. Minimum 0.05. Does not bound third-party OpenAI or ElevenLabs charges."
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 500,
            "maximum": 4096,
            "type": "integer",
            "description": "Characters sent per TTS request. The default suits every model; ElevenLabs is auto-clamped to 2500. Smaller chunks recover better from a single bad passage but do not change the total price.",
            "default": 4000
          },
          "concurrency": {
            "title": "Parallel TTS requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many chunks are synthesized at once. Auto-clamped per provider to Edge 8, OpenAI 10, ElevenLabs 2. Higher is faster and cheaper in compute; lower it only if the provider rate-limits you.",
            "default": 5
          },
          "resume": {
            "title": "Resume from a previous run",
            "type": "boolean",
            "description": "Reuse chunks already synthesized by an earlier run of the same document, voice and model, so a book that timed out continues instead of restarting. Turn off to force a full re-narration.",
            "default": true
          },
          "skipFailedChunks": {
            "title": "Skip failed chunks instead of aborting",
            "type": "boolean",
            "description": "Keep narrating when a single passage fails after retries, marking the result status 'partial' and listing the gaps. Authentication and quota errors always abort, since every remaining chunk would fail the same way.",
            "default": true
          },
          "maxPartMb": {
            "title": "Max size per audio part (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Long documents are cut into MP3 parts; a part is finalized and uploaded once it reaches this size. Lower values give more, smaller, chapter-like files. The default is about 15 hours of speech per part.",
            "default": 40
          },
          "openaiApiKey": {
            "title": "OpenAI API key (required for OpenAI models)",
            "type": "string",
            "description": "Your own OpenAI key, required whenever model starts with openai-. OpenAI bills you directly for the speech; this Actor's own charges are unchanged. Not needed for the free edge-tts default. Create one at https://platform.openai.com/api-keys"
          },
          "elevenlabsApiKey": {
            "title": "ElevenLabs API key (required for ElevenLabs models)",
            "type": "string",
            "description": "Your own ElevenLabs key, required whenever model starts with elevenlabs-. ElevenLabs bills you directly for the audio. Not needed for the free edge-tts default. Create one at https://elevenlabs.io/app/settings/api-keys"
          },
          "proxyConfiguration": {
            "title": "Proxy (for document URL fetch only)",
            "type": "object",
            "description": "Optional proxy applied only to the documentUrl fetch, for hosts that block datacenter IPs. Ignored for uploads, base64 and raw text, and never used for the speech requests.",
            "default": {
              "useApifyProxy": false
            }
          },
          "debug": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Raise the log level so per-chunk detail appears in the run log. Useful when reporting a problem.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}