{"access":{"authentication":{"format":"L402 {macaroon}:{proof_of_payment}","header":"Authorization","protocols":["L402","MPP"],"format_mpp":"Payment <base64url_json>"},"endpoint":"https://sats4ai.com/api/l402/epub-audiobook","method":"POST"},"content_type":"api","description":"Convert books (EPUB/PDF/TXT) to full audiobooks with chapter markers. 3 voice tiers: OmniVoice Global (602+ langs, {voiceRate(\"omnivoice\")}), Inworld Premium (#1 ranked TTS ELO 1217, {voiceRate(\"inworld\")}, DEFAULT), Minimax Studio (voice cloning from reference clip, {voiceRate(\"minimax\")}). Pay with Bitcoin Lightning.\n\nAsync — returns jobId, poll status at poll_url until COMPLETED.\n\nSend parameters as JSON:\n```\n{\n    \"epubBase64\": \"<base64-encoded file>\",\n    \"fileName\": \"mybook.epub\",\n    \"voice\": \"Ashley\",\n    \"language\": \"English\",\n    \"speed\": 1.0,\n    \"modelId\": \"best\"\n}\n```\nSupported formats: .epub, .pdf, .txt (max 50 MB).\nvoice: TTS voice name. OMIT IT unless you also pin modelId — each tier has its own voice set and a voice from the wrong set is rejected (\"Ashley\" is Inworld-only). language: narration language (default: \"English\"). speed: 0.5-2.0 (default: 1.0). modelId: optional — omit for the default tier (Inworld Premium).\n\nResponse (202): { jobId, jobType, status, poll_url, poll_interval_ms }\nPoll GET poll_url until: { status: \"COMPLETED\", result: { url: \"...\", annexeUrl: \"...\" } }\nurl is the M4B audiobook. annexeUrl is a companion PDF holding equations, tables, Bitcoin addresses, keys and hashes that are NOT narrated — the audio says \"see table 7.3\" and the numbered entry is in the PDF. It is null when the book contained none of that. Fetch both; the narration references the annexe out loud.\n\nDynamic pricing varies by voice tier (minimum 500 sats).\nProcessing time: 5-60+ minutes depending on book length.","name":"Book to Audiobook","parameters":{"epubBase64":{"type":"string","required":true,"description":"Base64-encoded book file (EPUB, PDF, or TXT). Max 50 MB."},"fileName":{"type":"string","required":true,"description":"Original filename with extension (e.g., 'mybook.epub', 'document.pdf', 'story.txt'). Required to detect format."},"voice":{"type":"string","required":false,"description":"Voice ID. Must belong to the resolved tier's own set — Minimax: English_expressive_narrator, Wise_Woman; Inworld: Ashley, Abby. Omit for a valid per-tier default. On the OmniVoice tier, voice is a voice design instead: words, one per group, separated by commas: male|female; child|teenager|young adult|middle-aged|elderly; very low|low|moderate|high|very high pitch; whisper; american|british|australian|canadian|indian|chinese|korean|japanese|portuguese|russian accent. Omit it for OmniVoice's default voice. Any other word is refused before payment."},"language":{"type":"string","required":false,"description":"Language boost (default: English)."},"speed":{"type":"number","required":false,"description":"Speech speed 0.5-2.0 (default: 1.0)."},"modelId":{"type":"string|number","required":false,"description":"Model ID. Omit for the default (Inworld Premium). 3 tiers: OmniVoice Global (602+ langs, ~106 chars/sat), Inworld Premium (#1 ranked, ~16 chars/sat, DEFAULT), Minimax Studio (voice cloning, ~5 chars/sat). Rates are BTC-pegged and re-quoted hourly, so treat them as approximate and rely on the 402 quote."},"selectedChapterIndices":{"type":"array","required":false,"description":"Array of chapter indices to include (0-based). Omit to auto-select content chapters."},"translateToLanguage":{"type":"string","required":false,"description":"Translate book to this language before narration. Accepts English names ('Spanish', 'Chinese (Simplified)') or ISO-639 codes / locale tags ('es', 'en-US', 'pt-BR'). Translation cost added to price."}}}