openapi: 3.1.0 info: title: AI Audiobook Studio API version: 0.1.0 description: > Local-first MVP API for project creation, manuscript import, structure management, voice assignment, segment rendering, chapter assembly, review, rights gating, and export. servers: - url: http://localhost:8000 tags: - name: Projects - name: Source - name: Structure - name: Casting - name: Pronunciation - name: Rendering - name: Sound Design - name: Local AI - name: Settings - name: Jobs - name: Review - name: Exports - name: Rights paths: /api/v1/settings/tts: get: tags: [Settings] summary: Get active local TTS settings and readiness responses: "200": description: Active TTS settings content: application/json: schema: $ref: "#/components/schemas/TtsSettings" put: tags: [Settings] summary: Save local TTS settings after validation requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TtsSettingsUpdate" responses: "200": description: TTS settings saved content: application/json: schema: $ref: "#/components/schemas/TtsSettings" /api/v1/settings/tts/providers: get: tags: [Settings] summary: List local TTS provider readiness and capabilities responses: "200": description: Local provider status list content: application/json: schema: type: array items: $ref: "#/components/schemas/TtsProviderInfo" /api/v1/settings/tts/kokoro/setup: get: tags: [Settings] summary: Report managed Kokoro ONNX setup status description: > Reports whether the local managed Kokoro runtime is not started, incomplete, failed, ready, or active. Managed setup is local-only and stores runtime files under `.echodraft/kokoro/managed-onnx-v1` by default. responses: "200": description: Managed Kokoro setup status content: application/json: schema: $ref: "#/components/schemas/KokoroSetupStatus" /api/v1/settings/tts/kokoro/setup/install: post: tags: [Settings] summary: Start managed Kokoro ONNX setup description: > Starts a local setup job that creates the Kokoro runtime, installs Kokoro ONNX packages, downloads model and voice assets, builds the voice registry, validates a preview, and saves settings only after validation succeeds. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/KokoroSetupInstallRequest" responses: "200": description: Setup job accepted content: application/json: schema: $ref: "#/components/schemas/JobStatus" /api/v1/local-ai/catalog: get: tags: [Local AI] summary: List local model and tool catalog entries with health responses: "200": description: Local AI catalog content: application/json: schema: type: array items: $ref: "#/components/schemas/LocalAiCatalogItem" /api/v1/local-ai/installed: get: tags: [Local AI] summary: List persisted local model and tool installation records responses: "200": description: Installed local capabilities content: application/json: schema: type: array items: $ref: "#/components/schemas/LocalAiInstallation" /api/v1/local-ai/models/{model_key}/install: post: tags: [Local AI] summary: Start a local model or system-tool install job parameters: - name: model_key in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LocalAiInstallRequest" responses: "202": description: Install job accepted content: application/json: schema: $ref: "#/components/schemas/JobStatus" /api/v1/local-ai/models/{model_key}: delete: tags: [Local AI] summary: Remove an app-managed local model entry parameters: - name: model_key in: path required: true schema: type: string responses: "204": description: App-managed model entry removed /api/v1/local-ai/models/{model_key}/verify: post: tags: [Local AI] summary: Verify and persist one local capability health record parameters: - name: model_key in: path required: true schema: type: string responses: "200": description: Installation status after verification content: application/json: schema: $ref: "#/components/schemas/LocalAiInstallation" /api/v1/local-ai/models/{model_key}/health: get: tags: [Local AI] summary: Check current health for one local capability parameters: - name: model_key in: path required: true schema: type: string responses: "200": description: Local capability health content: application/json: schema: $ref: "#/components/schemas/LocalAiHealth" /api/v1/local-ai/jobs/{jobId}: get: tags: [Local AI] summary: Get local model install job metadata parameters: - $ref: "#/components/parameters/JobId" responses: "200": description: Local AI install job metadata content: application/json: schema: $ref: "#/components/schemas/LocalAiInstallJob" /api/v1/local-llm/ollama/models: get: tags: [Local LLM] summary: List installed Ollama models from /api/tags responses: "200": description: Ollama local model list content: application/json: schema: type: array items: type: object additionalProperties: true /api/v1/local-llm/embeddings: post: tags: [Local LLM] summary: Generate local embeddings through Ollama /api/embed requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/EmbeddingRequest" responses: "200": description: Embeddings content: application/json: schema: $ref: "#/components/schemas/EmbeddingResult" /api/v1/projects/{projectId}/local-llm/extractions: post: tags: [Local LLM] summary: Start a schema-first local LLM extraction job parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LlmExtractionRequest" responses: "202": description: Extraction job accepted content: application/json: schema: $ref: "#/components/schemas/JobAcceptedResponse" /api/v1/projects/{projectId}/llm-runs: get: tags: [Local LLM] summary: List local LLM runs for a project parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: LLM run list content: application/json: schema: type: array items: $ref: "#/components/schemas/LlmRun" /api/v1/llm-runs/{runId}: get: tags: [Local LLM] summary: Get one local LLM run parameters: - name: runId in: path required: true schema: type: string responses: "200": description: LLM run content: application/json: schema: $ref: "#/components/schemas/LlmRun" /api/v1/sources/{source_id}: get: tags: [Source] summary: Get one source document and canonical preview parameters: - name: source_id in: path required: true schema: type: string responses: "200": description: Source document with canonical preview when available content: application/json: schema: $ref: "#/components/schemas/SourceDocument" /api/v1/sources/{source_id}/pages: get: tags: [Source] summary: List page-level extraction records for a source document parameters: - name: source_id in: path required: true schema: type: string responses: "200": description: Source page records content: application/json: schema: type: array items: $ref: "#/components/schemas/SourcePage" /api/v1/sources/{source_id}/pages/{page_number}: get: tags: [Source] summary: Get one page-level extraction record parameters: - name: source_id in: path required: true schema: type: string - name: page_number in: path required: true schema: type: integer responses: "200": description: Source page record content: application/json: schema: $ref: "#/components/schemas/SourcePage" /api/v1/sources/{source_id}/cleaning-issues: get: tags: [Source] summary: List clean-text review issues for a source document parameters: - name: source_id in: path required: true schema: type: string responses: "200": description: Clean-text review issue records content: application/json: schema: type: array items: $ref: "#/components/schemas/TextCleanlinessIssue" /api/v1/sources/{source_id}/cleaning-runs: get: tags: [Source] summary: List clean-text runs for a source document parameters: - name: source_id in: path required: true schema: type: string responses: "200": description: Clean-text run records content: application/json: schema: type: array items: $ref: "#/components/schemas/CleaningRun" /api/v1/cleaning-issues/{issue_id}: patch: tags: [Source] summary: Update clean-text review issue state parameters: - name: issue_id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TextCleanlinessIssueUpdate" responses: "200": description: Updated clean-text review issue content: application/json: schema: $ref: "#/components/schemas/TextCleanlinessIssue" /api/v1/projects: get: tags: [Projects] summary: List projects responses: "200": description: Project list content: application/json: schema: type: array items: $ref: "#/components/schemas/Project" post: tags: [Projects] summary: Create project requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateProjectRequest" responses: "201": description: Project created content: application/json: schema: $ref: "#/components/schemas/Project" /api/v1/projects/{projectId}: get: tags: [Projects] summary: Get project parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Project detail content: application/json: schema: $ref: "#/components/schemas/Project" patch: tags: [Projects] summary: Update project parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateProjectRequest" responses: "200": description: Project updated content: application/json: schema: $ref: "#/components/schemas/Project" delete: tags: [Projects] summary: Delete project parameters: - $ref: "#/components/parameters/ProjectId" responses: "204": description: Project deleted /api/v1/projects/{projectId}/source/import: post: tags: [Source] summary: Import manuscript source parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: multipart/form-data: schema: type: object required: [file] properties: file: type: string format: binary responses: "202": description: Import job accepted content: application/json: schema: $ref: "#/components/schemas/JobAcceptedResponse" /api/v1/projects/{projectId}/source/reparse: post: tags: [Source] summary: Re-run parsing on source document parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/ReparseRequest" responses: "202": description: Reparse job accepted content: application/json: schema: $ref: "#/components/schemas/JobAcceptedResponse" /api/v1/projects/{projectId}/source: get: tags: [Source] summary: Get the latest imported source document and canonical preview parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Latest source document content: application/json: schema: $ref: "#/components/schemas/SourceDocument" /api/v1/projects/{projectId}/chapters: get: tags: [Structure] summary: List chapters for project parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Chapter list content: application/json: schema: type: array items: $ref: "#/components/schemas/Chapter" /api/v1/projects/{projectId}/structure-warnings: get: tags: [Structure] summary: List parser warnings for the current structure parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Structure parser warning list content: application/json: schema: type: array items: $ref: "#/components/schemas/StructureParserWarning" /api/v1/projects/{projectId}/structure/quality: get: tags: [Structure] summary: Get structure quality metrics for the current draft parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Structure quality summary content: application/json: schema: $ref: "#/components/schemas/StructureQuality" /api/v1/chapters/{chapterId}: get: tags: [Structure] summary: Get chapter detail parameters: - $ref: "#/components/parameters/ChapterId" responses: "200": description: Chapter detail content: application/json: schema: $ref: "#/components/schemas/Chapter" patch: tags: [Structure] summary: Update chapter metadata parameters: - $ref: "#/components/parameters/ChapterId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ChapterUpdate" responses: "200": description: Chapter updated content: application/json: schema: $ref: "#/components/schemas/Chapter" /api/v1/chapters/{chapterId}/scenes: get: tags: [Structure] summary: List scenes for chapter parameters: - $ref: "#/components/parameters/ChapterId" responses: "200": description: Scene list content: application/json: schema: type: array items: $ref: "#/components/schemas/Scene" /api/v1/scenes/{sceneId}: patch: tags: [Structure] summary: Update scene metadata parameters: - $ref: "#/components/parameters/SceneId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SceneUpdate" responses: "200": description: Scene updated content: application/json: schema: $ref: "#/components/schemas/Scene" /api/v1/scenes/{sceneId}/segments: get: tags: [Structure] summary: List segments for scene parameters: - $ref: "#/components/parameters/SceneId" responses: "200": description: Segment list content: application/json: schema: type: array items: $ref: "#/components/schemas/Segment" /api/v1/segments/{segmentId}: patch: tags: [Structure] summary: Update segment text, speaker, or direction parameters: - $ref: "#/components/parameters/SegmentId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateSegmentRequest" responses: "200": description: Segment updated content: application/json: schema: $ref: "#/components/schemas/Segment" /api/v1/structure-locks/{scopeType}/{scopeId}: put: tags: [Structure] summary: Lock or unlock a chapter, scene, or segment parameters: - name: scopeType in: path required: true schema: type: string enum: [chapter, scene, segment] - name: scopeId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/StructureLockUpdate" responses: "200": description: Locked structure item content: application/json: schema: oneOf: - $ref: "#/components/schemas/Chapter" - $ref: "#/components/schemas/Scene" - $ref: "#/components/schemas/Segment" /api/v1/segments/{segmentId}/split: post: tags: [Structure] summary: Split a segment at a character offset parameters: - $ref: "#/components/parameters/SegmentId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SegmentSplitRequest" responses: "200": description: Segment split content: application/json: schema: $ref: "#/components/schemas/Segment" /api/v1/segments/{segmentId}/merge: post: tags: [Structure] summary: Merge a segment with the next adjacent segment parameters: - $ref: "#/components/parameters/SegmentId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SegmentMergeRequest" responses: "200": description: Segment merged content: application/json: schema: $ref: "#/components/schemas/Segment" /api/v1/projects/{projectId}/segment-directions: get: tags: [Direction] summary: List segment directions parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Segment direction list content: application/json: schema: type: array items: $ref: "#/components/schemas/SegmentDirection" /api/v1/projects/{projectId}/segments/{segmentId}/direction: get: tags: [Direction] summary: Get segment direction parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/SegmentId" responses: "200": description: Segment direction content: application/json: schema: $ref: "#/components/schemas/SegmentDirection" put: tags: [Direction] summary: Save segment direction parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/SegmentId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateSegmentDirectionRequest" responses: "200": description: Segment direction saved content: application/json: schema: $ref: "#/components/schemas/SegmentDirection" /api/v1/projects/{projectId}/directions/infer: post: tags: [Direction] summary: Infer local segment directions parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/DirectionInferenceRunRequest" responses: "202": description: Direction inference job queued content: application/json: schema: $ref: "#/components/schemas/Job" /api/v1/projects/{projectId}/characters: get: tags: [Casting] summary: List characters parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Character list content: application/json: schema: type: array items: $ref: "#/components/schemas/Character" post: tags: [Casting] summary: Create character parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateCharacterRequest" responses: "201": description: Character created content: application/json: schema: $ref: "#/components/schemas/Character" /api/v1/characters/{characterId}: patch: tags: [Casting] summary: Update character parameters: - $ref: "#/components/parameters/CharacterId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateCharacterRequest" responses: "200": description: Character updated content: application/json: schema: $ref: "#/components/schemas/Character" /api/v1/characters/{characterId}/merge: post: tags: [Casting] summary: Merge another character into this target character parameters: - $ref: "#/components/parameters/CharacterId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/MergeCharacterRequest" responses: "200": description: Target character after merge content: application/json: schema: $ref: "#/components/schemas/Character" /api/v1/characters/{characterId}/split: post: tags: [Casting] summary: Split a new character record out of an existing character parameters: - $ref: "#/components/parameters/CharacterId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SplitCharacterRequest" responses: "201": description: Newly split character content: application/json: schema: $ref: "#/components/schemas/Character" /api/v1/projects/{projectId}/speaker-attributions: get: tags: [Casting] summary: List speaker attributions parameters: - $ref: "#/components/parameters/ProjectId" - name: status in: query schema: type: string responses: "200": description: Speaker attribution list content: application/json: schema: type: array items: $ref: "#/components/schemas/SpeakerAttribution" /api/v1/projects/{projectId}/speaker-attributions/run: post: tags: [Casting] summary: Run deterministic speaker attribution, optionally with local Ollama fallback parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/RunSpeakerAttributionRequest" responses: "202": description: Speaker attribution job queued content: application/json: schema: $ref: "#/components/schemas/Job" /api/v1/speaker-attributions/{speakerAttributionId}: patch: tags: [Casting] summary: Update speaker attribution review decision parameters: - name: speakerAttributionId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateSpeakerAttributionRequest" responses: "200": description: Speaker attribution updated content: application/json: schema: $ref: "#/components/schemas/SpeakerAttribution" /api/v1/projects/{projectId}/voices: get: tags: [Casting] summary: List voice profiles parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Voice profile list content: application/json: schema: type: array items: $ref: "#/components/schemas/VoiceProfile" post: tags: [Casting] summary: Create voice profile parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateVoiceProfileRequest" responses: "201": description: Voice profile created content: application/json: schema: $ref: "#/components/schemas/VoiceProfile" /api/v1/voices/{voiceId}: patch: tags: [Casting] summary: Update voice profile parameters: - $ref: "#/components/parameters/VoiceId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateVoiceProfileRequest" responses: "200": description: Voice profile updated content: application/json: schema: $ref: "#/components/schemas/VoiceProfile" /api/v1/voices/{voiceId}/preview: post: tags: [Casting] summary: Generate a voice preview clip parameters: - $ref: "#/components/parameters/VoiceId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/VoicePreviewRequest" responses: "202": description: Preview job accepted content: application/json: schema: $ref: "#/components/schemas/JobAcceptedResponse" /api/v1/characters/{characterId}/assign-voice: post: tags: [Casting] summary: Assign voice to character parameters: - $ref: "#/components/parameters/CharacterId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AssignVoiceRequest" responses: "200": description: Voice assigned /api/v1/projects/{projectId}/pronunciations: get: tags: [Pronunciation] summary: List pronunciation entries parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Pronunciation list content: application/json: schema: type: array items: $ref: "#/components/schemas/PronunciationEntry" post: tags: [Pronunciation] summary: Create pronunciation entry parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreatePronunciationEntryRequest" responses: "201": description: Pronunciation entry created content: application/json: schema: $ref: "#/components/schemas/PronunciationEntry" /api/v1/pronunciations/{entryId}: patch: tags: [Pronunciation] summary: Update pronunciation entry parameters: - $ref: "#/components/parameters/PronunciationEntryId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdatePronunciationEntryRequest" responses: "200": description: Pronunciation entry updated content: application/json: schema: $ref: "#/components/schemas/PronunciationEntry" delete: tags: [Pronunciation] summary: Delete pronunciation entry parameters: - $ref: "#/components/parameters/PronunciationEntryId" responses: "204": description: Pronunciation entry deleted /api/v1/projects/{projectId}/generate/chapters: post: tags: [Rendering] summary: Generate all or selected chapters parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/GenerateChaptersRequest" responses: "202": description: Generation job accepted content: application/json: schema: $ref: "#/components/schemas/JobAcceptedResponse" /api/v1/chapters/{chapterId}/generate: post: tags: [Rendering] summary: Generate a chapter parameters: - $ref: "#/components/parameters/ChapterId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/GenerateChapterRequest" responses: "202": description: Generation job accepted content: application/json: schema: $ref: "#/components/schemas/JobAcceptedResponse" /api/v1/segments/{segmentId}/generate: post: tags: [Rendering] summary: Generate or regenerate one segment parameters: - $ref: "#/components/parameters/SegmentId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/GenerateSegmentRequest" responses: "202": description: Segment generation job accepted content: application/json: schema: $ref: "#/components/schemas/JobAcceptedResponse" /api/v1/projects/{projectId}/segments/{segmentId}/renders/compare: get: tags: [Rendering] summary: Compare the latest segment render with its parent render parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/SegmentId" responses: "200": description: Segment render comparison content: application/json: schema: $ref: "#/components/schemas/SegmentRenderComparison" /api/v1/projects/{projectId}/segments/{segmentId}/review-inspector: get: tags: [Review] summary: Load the layered segment review inspector parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/SegmentId" responses: "200": description: Segment review inspector content: application/json: schema: $ref: "#/components/schemas/SegmentReviewInspector" /api/v1/projects/{projectId}/render-queue: get: tags: [Rendering] summary: List local render queue rows for a project or chapter parameters: - $ref: "#/components/parameters/ProjectId" - name: chapter_id in: query required: false schema: type: string responses: "200": description: Render queue rows content: application/json: schema: type: array items: $ref: "#/components/schemas/RenderQueueItem" /api/v1/projects/{projectId}/sound-assets: get: tags: [Sound Design] summary: List local sound assets for a project parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Local sound assets content: application/json: schema: type: array items: $ref: "#/components/schemas/SoundAsset" post: tags: [Sound Design] summary: Upload a local WAV sound asset description: Stores the WAV file under project artifacts and stores only metadata/path rows in the database. parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: multipart/form-data: schema: $ref: "#/components/schemas/SoundAssetUpload" responses: "201": description: Sound asset imported content: application/json: schema: $ref: "#/components/schemas/SoundAsset" /api/v1/projects/{projectId}/sound-assets/from-path: post: tags: [Sound Design] summary: Register an existing local WAV path as a sound asset parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SoundAssetCreate" responses: "201": description: Sound asset registered content: application/json: schema: $ref: "#/components/schemas/SoundAsset" /api/v1/projects/{projectId}/chapters/{chapterId}/sound-cues: get: tags: [Sound Design] summary: List sound design cues assigned to scenes in a chapter parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/ChapterId" responses: "200": description: Chapter sound cues content: application/json: schema: type: array items: $ref: "#/components/schemas/SoundCue" /api/v1/projects/{projectId}/chapters/{chapterId}/sound-plan: post: tags: [Sound Design] summary: Deterministically plan and materialize automatic Tier-0 sound cues parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/ChapterId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SoundPlanRequest" responses: "201": description: Sound plan and append-only manifest created content: application/json: schema: $ref: "#/components/schemas/SoundPlanResult" /api/v1/scenes/{sceneId}/sound-cues: get: tags: [Sound Design] summary: List sound design cues assigned to one scene parameters: - $ref: "#/components/parameters/SceneId" responses: "200": description: Scene sound cues content: application/json: schema: type: array items: $ref: "#/components/schemas/SoundCue" /api/v1/projects/{projectId}/sound-cues: post: tags: [Sound Design] summary: Assign a sound asset cue to a scene parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SoundCueCreate" responses: "201": description: Sound cue assigned content: application/json: schema: $ref: "#/components/schemas/SoundCue" /api/v1/projects/{projectId}/sound-cues/{cueId}: patch: tags: [Sound Design] summary: Mute or unmute a cue; automatic cues become user-locked parameters: - $ref: "#/components/parameters/ProjectId" - name: cueId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SoundCueUpdate" responses: "200": description: Sound cue updated content: application/json: schema: $ref: "#/components/schemas/SoundCue" /api/v1/projects/{projectId}/chapters/{chapterId}/assemble: post: tags: [Rendering] summary: Assemble the current successful segment renders into an immutable chapter render parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/ChapterId" requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/ChapterAssemblyRequest" responses: "202": description: Chapter stem assembled content: application/json: schema: $ref: "#/components/schemas/ChapterRender" "422": description: A non-empty segment has no successful render or an artifact is missing /api/v1/projects/{projectId}/chapters/{chapterId}/renders: get: tags: [Rendering] summary: List immutable chapter render history, newest first parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/ChapterId" responses: "200": description: Chapter render history content: application/json: schema: type: array items: $ref: "#/components/schemas/ChapterRender" /api/v1/projects/{projectId}/chapters/{chapterId}/active-render: get: tags: [Rendering] summary: Get the latest successful immutable chapter render parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/ChapterId" responses: "200": description: Active chapter render content: application/json: schema: $ref: "#/components/schemas/ChapterRender" "404": description: Chapter not found or no assembled render exists /api/v1/projects/{projectId}/readiness/run: post: tags: [Review] summary: Run deterministic readiness QA parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/ReadinessRunRequest" responses: "200": description: Readiness report content: application/json: schema: $ref: "#/components/schemas/ReadinessReport" /api/v1/projects/{projectId}/readiness/latest: get: tags: [Review] summary: Get latest readiness report parameters: - $ref: "#/components/parameters/ProjectId" - name: chapter_id in: query required: false schema: type: string responses: "200": description: Latest readiness report content: application/json: schema: $ref: "#/components/schemas/ReadinessReport" /api/v1/projects/{projectId}/readiness/reports: get: tags: [Review] summary: List readiness report history parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Readiness report history content: application/json: schema: type: array items: $ref: "#/components/schemas/ReadinessReport" /api/v1/jobs/{jobId}: get: tags: [Jobs] summary: Get job status parameters: - $ref: "#/components/parameters/JobId" responses: "200": description: Job status detail content: application/json: schema: $ref: "#/components/schemas/JobStatus" /api/v1/jobs/{jobId}/cancel: post: tags: [Jobs] summary: Cancel job parameters: - $ref: "#/components/parameters/JobId" responses: "200": description: Job cancellation result /api/v1/projects/{projectId}/issues: get: tags: [Review] summary: List project issues parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Issue list content: application/json: schema: type: array items: $ref: "#/components/schemas/Issue" post: tags: [Review] summary: Create an editorial issue parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/IssueCreate" responses: "201": description: Issue created content: application/json: schema: $ref: "#/components/schemas/Issue" /api/v1/issues/{issueId}: patch: tags: [Review] summary: Update issue state parameters: - $ref: "#/components/parameters/IssueId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateIssueRequest" responses: "200": description: Issue updated content: application/json: schema: $ref: "#/components/schemas/Issue" /api/v1/segments/{segmentId}/comments: post: tags: [Review] summary: Add comment on segment parameters: - $ref: "#/components/parameters/SegmentId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateCommentRequest" responses: "201": description: Comment created content: application/json: schema: $ref: "#/components/schemas/Comment" /api/v1/issues/{issueId}/comments: get: tags: [Review] summary: List issue comments parameters: - $ref: "#/components/parameters/IssueId" responses: "200": description: Comment list content: application/json: schema: type: array items: $ref: "#/components/schemas/Comment" post: tags: [Review] summary: Add a comment to an issue parameters: - $ref: "#/components/parameters/IssueId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CommentCreate" responses: "201": description: Comment created content: application/json: schema: $ref: "#/components/schemas/Comment" /api/v1/projects/{projectId}/segments/{segmentId}/patch: post: tags: [Review] summary: Patch one segment and reassemble only its owning chapter parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/SegmentId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SegmentPatchRequest" responses: "202": description: Patch completed with immutable render lineage content: application/json: schema: $ref: "#/components/schemas/SegmentPatchResult" /api/v1/segments/{segmentId}/mark-reviewed: post: tags: [Review] summary: Mark segment as reviewed parameters: - $ref: "#/components/parameters/SegmentId" responses: "200": description: Segment marked reviewed /api/v1/projects/{projectId}/exports: get: tags: [Exports] summary: List exports parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Export list content: application/json: schema: type: array items: $ref: "#/components/schemas/ExportPackage" post: tags: [Exports] summary: Create export package parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateExportRequest" responses: "202": description: Export package created content: application/json: schema: $ref: "#/components/schemas/ExportPackage" /api/v1/projects/{projectId}/exports/estimate: post: tags: [Exports] summary: Estimate an export and return blockers parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateExportRequest" responses: "200": description: Export preflight estimate content: application/json: schema: $ref: "#/components/schemas/ExportEstimate" /api/v1/projects/{projectId}/exports/{exportId}: get: tags: [Exports] summary: Get export detail parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/ExportId" responses: "200": description: Export detail content: application/json: schema: $ref: "#/components/schemas/ExportPackage" /api/v1/projects/{projectId}/exports/{exportId}/download: get: tags: [Exports] summary: Download export ZIP parameters: - $ref: "#/components/parameters/ProjectId" - $ref: "#/components/parameters/ExportId" responses: "200": description: Export ZIP archive /api/v1/projects/{projectId}/rights: get: tags: [Rights] summary: Get rights declarations parameters: - $ref: "#/components/parameters/ProjectId" responses: "200": description: Rights detail content: application/json: schema: $ref: "#/components/schemas/RightsDeclaration" /api/v1/projects/{projectId}/rights/declaration: post: tags: [Rights] summary: Create or update rights declaration parameters: - $ref: "#/components/parameters/ProjectId" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpsertRightsDeclarationRequest" responses: "200": description: Rights declaration stored content: application/json: schema: $ref: "#/components/schemas/RightsDeclaration" components: parameters: ProjectId: name: projectId in: path required: true schema: type: string ChapterId: name: chapterId in: path required: true schema: type: string SceneId: name: sceneId in: path required: true schema: type: string SegmentId: name: segmentId in: path required: true schema: type: string CharacterId: name: characterId in: path required: true schema: type: string VoiceId: name: voiceId in: path required: true schema: type: string PronunciationEntryId: name: entryId in: path required: true schema: type: string JobId: name: jobId in: path required: true schema: type: string IssueId: name: issueId in: path required: true schema: type: string ExportId: name: exportId in: path required: true schema: type: string schemas: TtsSettings: type: object properties: provider: type: string enum: [mock, kokoro, piper, xtts_v2] setupMode: type: - string - "null" enum: [managed_onnx, custom_adapter, local_cli, coqui_local, null] executable: type: - string - "null" runtimeRoot: type: - string - "null" pythonPath: type: - string - "null" modelPath: type: - string - "null" voicesDataPath: type: - string - "null" voiceRegistryPath: type: - string - "null" piperModelPath: type: - string - "null" piperConfigPath: type: - string - "null" referenceVoicePath: type: - string - "null" referenceVoiceConsent: type: boolean language: type: string ready: type: boolean message: type: - string - "null" availableVoices: type: array items: type: string TtsSettingsUpdate: type: object required: [provider] properties: provider: type: string enum: [mock, kokoro, piper, xtts_v2] setupMode: type: - string - "null" enum: [managed_onnx, custom_adapter, local_cli, coqui_local, null] executable: type: - string - "null" runtimeRoot: type: - string - "null" pythonPath: type: - string - "null" modelPath: type: - string - "null" voicesDataPath: type: - string - "null" voiceRegistryPath: type: - string - "null" piperModelPath: type: - string - "null" piperConfigPath: type: - string - "null" referenceVoicePath: type: - string - "null" referenceVoiceConsent: type: boolean language: type: string TtsProviderInfo: type: object properties: provider: type: string enum: [mock, kokoro, piper, xtts_v2] displayName: type: string setupMode: type: - string - "null" ready: type: boolean message: type: - string - "null" availableVoices: type: array items: type: string capabilities: type: object additionalProperties: true requiresReferenceConsent: type: boolean referenceVoiceConsent: type: - boolean - "null" referenceVoicePath: type: - string - "null" LocalAiCatalogItem: type: object properties: modelKey: type: string displayName: type: string capability: type: string provider: type: string installType: type: string required: type: boolean sizeMb: type: - integer - "null" licenseSummary: type: - string - "null" description: type: - string - "null" status: type: string health: type: string installPath: type: - string - "null" lastVerifiedAt: type: - string - "null" format: date-time LocalAiInstallation: type: object properties: id: type: string modelKey: type: string displayName: type: string capability: type: string provider: type: string version: type: - string - "null" installPath: type: - string - "null" status: type: string installedAt: type: - string - "null" format: date-time lastVerifiedAt: type: - string - "null" format: date-time sizeBytes: type: - integer - "null" errorMessage: type: - string - "null" LocalAiInstallRequest: type: object properties: confirmNetworkDownload: type: boolean confirmThirdPartyLicense: type: boolean confirmSystemInstall: type: boolean repair: type: boolean LocalAiHealth: type: object properties: modelKey: type: string status: type: string ready: type: boolean message: type: string version: type: - string - "null" installPath: type: - string - "null" checkedAt: type: string format: date-time details: type: object additionalProperties: true LocalAiInstallJob: type: object properties: id: type: string jobId: type: string modelKey: type: string status: type: string progressPercent: type: integer currentStep: type: - string - "null" logsPath: type: - string - "null" errorMessage: type: - string - "null" KokoroSetupStatus: type: object properties: platform: type: string state: type: string enum: [not_started, incomplete, failed, ready, active] setupMode: type: string enum: [managed_onnx] runtimeRoot: type: string pythonPath: type: string executable: type: string modelPath: type: string voicesDataPath: type: string voiceRegistryPath: type: string ready: type: boolean message: type: - string - "null" nextAction: type: string availableVoices: type: array items: type: string steps: type: array items: $ref: "#/components/schemas/KokoroSetupStep" KokoroSetupStep: type: object properties: phase: type: string label: type: string status: type: string enum: [pending, done, failed] message: type: - string - "null" KokoroSetupInstallRequest: type: object required: [confirmNetworkDownload, confirmThirdPartyLicense] properties: confirmNetworkDownload: type: boolean confirmThirdPartyLicense: type: boolean repair: type: boolean Project: type: object properties: id: type: string title: type: string author: type: string description: type: string rightsStatus: type: string status: type: string settings: type: object additionalProperties: true createdAt: type: string format: date-time updatedAt: type: string format: date-time Chapter: type: object properties: id: type: string projectId: type: string title: type: string orderIndex: type: integer status: type: string confidence: type: number startOffset: type: integer endOffset: type: integer parserEvidence: type: object additionalProperties: true userLocked: type: boolean lockReason: type: - string - "null" Scene: type: object properties: id: type: string chapterId: type: string orderIndex: type: integer status: type: string confidence: type: number startOffset: type: integer endOffset: type: integer parserEvidence: type: object additionalProperties: true userLocked: type: boolean lockReason: type: - string - "null" Segment: type: object properties: id: type: string sceneId: type: string orderIndex: type: integer segmentType: type: string speakerCandidate: type: - string - "null" speakerConfidence: type: number textContent: type: string normalizedText: type: string status: type: string revision: type: integer startOffset: type: integer endOffset: type: integer parserEvidence: type: object additionalProperties: true userLocked: type: boolean lockReason: type: - string - "null" StructureParserWarning: type: object properties: id: type: string projectId: type: string sourceDocumentId: type: - string - "null" scopeType: type: string scopeId: type: string severity: type: string message: type: string evidence: type: object additionalProperties: true confidence: type: number resolved: type: boolean createdAt: type: string format: date-time currentRenderId: type: - string - "null" StructureQuality: type: object properties: chapterCount: type: integer sceneCount: type: integer segmentCount: type: integer dialogueSegmentCount: type: integer dialogueAttributionCoverage: type: number unresolvedDialogueCount: type: integer averageSegmentChars: type: number longSegmentCount: type: integer mixedSegmentWarningCount: type: integer castCandidateCount: type: integer possibleDuplicateCastCount: type: integer lowConfidenceCastCandidateCount: type: integer possibleSceneBreakCount: type: integer offsetValidationFailureCount: type: integer quoteUnclosedCount: type: integer warningsNeedingReviewCount: type: integer llmRefinementUsed: type: boolean llmAcceptedBatchCount: type: integer llmRejectedBatchCount: type: integer ChapterAssemblyRequest: type: object properties: renderMode: type: string enum: [clean, light, dramatized, speech_only, light_cinematic] default: speech_only SoundAsset: type: object properties: id: type: string projectId: type: string name: type: string assetType: type: string enum: [ambience, music, sfx] assetPath: type: string audioUrl: type: string nullable: true durationMs: type: integer nullable: true licenseNote: type: string provenance: type: string model: type: string nullable: true prompt: type: string nullable: true seed: type: integer nullable: true cacheKey: type: string nullable: true qaStatus: type: string SoundAssetCreate: type: object required: [name, assetPath] properties: name: type: string assetType: type: string enum: [ambience, music, sfx] default: ambience assetPath: type: string durationMs: type: integer nullable: true licenseNote: type: string provenance: type: string SoundAssetUpload: type: object required: [file] properties: file: type: string format: binary asset_type: type: string enum: [ambience, music, sfx] default: ambience name: type: string license_note: type: string provenance: type: string SoundCue: type: object properties: id: type: string sceneId: type: string assetId: type: string nullable: true cueType: type: string enum: [ambience, music, sfx] startMs: type: integer gainDb: type: number fadeInMs: type: integer fadeOutMs: type: integer ducking: type: boolean renderMode: type: string enum: [light, dramatized, all, light_cinematic] noSfx: type: boolean origin: type: string enum: [user_created, auto_generated] evidence: type: object additionalProperties: true muted: type: boolean userLocked: type: boolean SoundCueCreate: type: object required: [sceneId, assetId] properties: sceneId: type: string assetId: type: string cueType: type: string enum: [ambience, music, sfx] default: ambience startMs: type: integer default: 0 gainDb: type: number default: -24 fadeInMs: type: integer default: 500 fadeOutMs: type: integer default: 500 ducking: type: boolean default: true renderMode: type: string enum: [light, dramatized, all] default: light noSfx: type: boolean default: false SoundCueUpdate: type: object required: [muted] properties: muted: type: boolean SoundPlanRequest: type: object properties: renderMode: type: string enum: [speech_only, light_cinematic, dramatized] default: light_cinematic SoundPlanResult: type: object required: [chapterId, renderMode, manifestPath, plannedCues, skipped, materializedAssetIds, materializedCueIds] properties: chapterId: type: string renderMode: type: string manifestPath: type: string plannedCues: type: array items: type: object additionalProperties: true skipped: type: array items: type: object additionalProperties: true materializedAssetIds: type: array items: type: string materializedCueIds: type: array items: type: string ChapterRender: type: object required: [id, chapterId, status, speechPath, manifestPath, durationMs] properties: id: type: string chapterId: type: string status: type: string speechPath: type: string manifestPath: type: string durationMs: type: integer renderMode: type: string ambienceStemPath: type: string nullable: true mixedAudioPath: type: string nullable: true audioUrl: type: string nullable: true Character: type: object properties: id: type: string projectId: type: string displayName: type: string canonicalName: type: string nullable: true aliases: type: array items: type: string traits: type: array items: type: string firstSeenSourceId: type: string nullable: true firstSeenChapterId: type: string nullable: true firstSeenSegmentId: type: string nullable: true roleType: type: string confidence: type: number notes: type: string nullable: true mergeHistory: type: array items: type: object additionalProperties: true splitHistory: type: array items: type: object additionalProperties: true userLocked: type: boolean lockReason: type: string nullable: true mergedIntoCharacterId: type: string nullable: true voiceProfileId: type: string nullable: true VoiceProfile: type: object properties: id: type: string projectId: type: string name: type: string backend: type: string providerVoiceId: type: string stylePrompt: type: string settings: type: object additionalProperties: true sampleAudioPath: type: string isNarratorDefault: type: boolean PronunciationEntry: type: object properties: id: type: string projectId: type: string term: type: string phonetic: type: string replacementText: type: string notes: type: string Issue: type: object properties: id: type: string projectId: type: string chapterId: type: - string - "null" sceneId: type: - string - "null" segmentId: type: - string - "null" severity: type: string category: type: string title: type: string description: type: string status: type: string metadata: type: object additionalProperties: true ReadinessRunRequest: type: object properties: chapterId: type: string nullable: true ReadinessCheck: type: object properties: id: type: string scope: type: string status: type: string severity: type: string category: type: string title: type: string description: type: string issueId: type: string nullable: true resolutionStatus: type: string nullable: true metadata: type: object additionalProperties: true ReadinessReport: type: object properties: id: type: string projectId: type: string chapterId: type: string nullable: true status: type: string enum: [ready, needs_review, blocked] score: type: integer summary: type: object additionalProperties: type: integer checks: type: array items: $ref: "#/components/schemas/ReadinessCheck" createdAt: type: string format: date-time IssueCreate: type: object required: [category, title, description] properties: chapterId: type: string segmentId: type: string severity: type: string category: type: string title: type: string description: type: string Comment: type: object properties: id: type: string projectId: type: string chapterId: type: - string - "null" segmentId: type: - string - "null" body: type: string createdBy: type: string createdAt: type: string format: date-time CommentCreate: type: object required: [body] properties: body: type: string author: type: string ExportBlocker: type: object properties: code: type: string severity: type: string message: type: string scope: type: string chapterId: type: - string - "null" issueId: type: - string - "null" ExportEstimate: type: object properties: projectId: type: string format: type: string audioVariant: type: string chapterCount: type: integer estimatedSizeBytes: type: integer blockers: type: array items: $ref: "#/components/schemas/ExportBlocker" metadata: type: object additionalProperties: true m4bPlanned: type: boolean ExportQaOutput: type: object properties: filename: type: string method: type: string withinTolerance: type: boolean lufsIntegrated: type: number truePeakDb: type: number rmsDbfs: type: number durationMs: type: integer bytes: type: integer sha256: type: string error: type: string ExportQa: type: object properties: targetLufs: type: number lufsTolerance: type: number truePeakCeilingDb: type: number allWithinTolerance: type: boolean outputs: type: array items: $ref: "#/components/schemas/ExportQaOutput" latestReadinessReport: type: object additionalProperties: true openBlockingIssues: type: array items: type: object additionalProperties: true ExportPackage: type: object properties: id: type: string projectId: type: string format: type: string status: type: string outputPath: type: string manifestPath: type: string archivePath: type: - string - "null" downloadUrl: type: - string - "null" audioVariant: type: string chapterCount: type: integer estimatedSizeBytes: type: integer checksum: type: - string - "null" metadata: type: object additionalProperties: true manifestSummary: type: object additionalProperties: true qa: $ref: "#/components/schemas/ExportQa" blockers: type: array items: $ref: "#/components/schemas/ExportBlocker" RightsDeclaration: type: object properties: id: type: string projectId: type: string declarationType: type: string status: type: string notes: type: string evidencePath: type: string CreateProjectRequest: type: object required: [title, rightsStatus] properties: title: type: string author: type: string description: type: string rightsStatus: type: string settings: type: object additionalProperties: true UpdateProjectRequest: type: object properties: title: type: string author: type: string description: type: string status: type: string settings: type: object additionalProperties: true CreateCharacterRequest: type: object required: [displayName] properties: displayName: type: string canonicalName: type: string aliases: type: array items: type: string traits: type: array items: type: string firstSeenSourceId: type: string firstSeenChapterId: type: string firstSeenSegmentId: type: string roleType: type: string confidence: type: number notes: type: string UpdateCharacterRequest: type: object properties: displayName: type: string canonicalName: type: string nullable: true aliases: type: array items: type: string traits: type: array items: type: string roleType: type: string confidence: type: number notes: type: string nullable: true userLocked: type: boolean lockReason: type: string nullable: true voiceProfileId: type: string nullable: true MergeCharacterRequest: type: object required: [sourceCharacterId] properties: sourceCharacterId: type: string reason: type: string nullable: true SplitCharacterRequest: type: object required: [displayName] properties: displayName: type: string aliases: type: array items: type: string traits: type: array items: type: string reason: type: string nullable: true SpeakerAttribution: type: object properties: id: type: string projectId: type: string segmentId: type: string characterId: type: string nullable: true speakerName: type: string nullable: true method: type: string evidence: type: object additionalProperties: true confidence: type: number status: type: string userLocked: type: boolean voiceProfileId: type: string nullable: true createdAt: type: string format: date-time updatedAt: type: string format: date-time RunSpeakerAttributionRequest: type: object properties: useLocalLlm: type: boolean default: false model: type: string default: "qwen3:4b" UpdateSpeakerAttributionRequest: type: object properties: characterId: type: string nullable: true speakerName: type: string nullable: true status: type: string userLocked: type: boolean CreateVoiceProfileRequest: type: object required: [name, backend, providerVoiceId] properties: name: type: string backend: type: string providerVoiceId: type: string stylePrompt: type: string settings: type: object additionalProperties: true isNarratorDefault: type: boolean UpdateVoiceProfileRequest: type: object properties: name: type: string providerVoiceId: type: string stylePrompt: type: string settings: type: object additionalProperties: true isNarratorDefault: type: boolean VoicePreviewRequest: type: object required: [text] properties: text: type: string stylePrompt: type: string AssignVoiceRequest: type: object required: [voiceProfileId] properties: voiceProfileId: type: string CreatePronunciationEntryRequest: type: object required: [term] properties: term: type: string phonetic: type: string replacementText: type: string notes: type: string UpdatePronunciationEntryRequest: type: object properties: phonetic: type: string replacementText: type: string notes: type: string UpdateSegmentRequest: type: object properties: textContent: type: string speakerCharacterId: type: string direction: $ref: "#/components/schemas/DirectionProfile" DirectionProfile: type: object required: [scopeType, scopeId] properties: scopeType: type: string scopeId: type: string pace: type: number minimum: 0.5 maximum: 2 intensity: type: number minimum: 0 maximum: 1 tone: type: string emotion: type: string enum: [neutral, warm, tense, quiet, urgent, somber, bright, fearful, angry] pauseBeforeMs: type: integer minimum: 0 maximum: 5000 pauseAfterMs: type: integer minimum: 0 maximum: 5000 stylePrompt: type: string nullable: true emphasis: type: boolean whisper: type: boolean noSfx: type: boolean SegmentDirection: type: object properties: segmentId: type: string projectId: type: string direction: $ref: "#/components/schemas/DirectionProfile" source: type: string userLocked: type: boolean evidence: type: object additionalProperties: true directionFingerprint: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time DirectionInferenceRunRequest: type: object properties: useLocalLlm: type: boolean default: false model: type: string default: qwen3:4b UpdateSegmentDirectionRequest: type: object required: [direction] properties: direction: $ref: "#/components/schemas/DirectionProfile" userLocked: type: boolean ChapterUpdate: type: object properties: title: type: - string - "null" status: type: - string - "null" SceneUpdate: type: object properties: status: type: - string - "null" StructureLockUpdate: type: object properties: locked: type: boolean reason: type: - string - "null" SegmentSplitRequest: type: object properties: splitOffset: type: integer SegmentMergeRequest: type: object properties: nextSegmentId: type: string GenerateChaptersRequest: type: object properties: chapterIds: type: array items: type: string renderMode: type: string qualityMode: type: string includeAmbience: type: boolean regenerateOnlyFailed: type: boolean GenerateChapterRequest: type: object properties: renderMode: type: string qualityMode: type: string includeAmbience: type: boolean regenerateOnlyFailed: type: boolean GenerateSegmentRequest: type: object properties: voiceProfileId: type: string directionOverride: type: object additionalProperties: true force: type: boolean SegmentRender: type: object properties: id: type: string segmentId: type: string renderKey: type: string status: type: string audioPath: type: string metadataPath: type: string durationMs: type: integer parentRenderId: type: - string - "null" audioUrl: type: - string - "null" SegmentRenderComparison: type: object properties: segmentId: type: string currentRender: anyOf: - $ref: "#/components/schemas/SegmentRender" - type: "null" previousRender: anyOf: - $ref: "#/components/schemas/SegmentRender" - type: "null" changedFields: type: array items: type: string RenderQueueItem: type: object properties: id: type: string projectId: type: string chapterId: type: string segmentId: type: string jobId: type: string status: type: string voiceProfileId: type: - string - "null" provider: type: string renderKey: type: - string - "null" errorMessage: type: - string - "null" createdAt: type: string format: date-time startedAt: type: - string - "null" format: date-time finishedAt: type: - string - "null" format: date-time UpdateIssueRequest: type: object properties: status: type: string severity: type: string description: type: string SegmentPatchRequest: type: object description: >- voiceProfileId and direction are optional. When omitted, each is resolved server-side from the segment's production override, then its cast assignment, then the project narrator settings (voice) / saved segment or project default direction. Explicitly supplied values act as manual overrides for this patch. properties: voiceProfileId: type: string direction: $ref: "#/components/schemas/DirectionProfile" textContent: type: string issueId: type: string SegmentPatchResult: type: object properties: segment: $ref: "#/components/schemas/Segment" render: $ref: "#/components/schemas/SegmentRender" chapterRender: $ref: "#/components/schemas/ChapterRender" PatchAttempt: type: object properties: id: type: string issueId: type: - string - "null" segmentId: type: string oldRenderId: type: - string - "null" newRenderId: type: string chapterRenderId: type: string createdAt: type: string format: date-time SegmentReviewInspector: type: object properties: projectId: type: string chapterId: type: string chapterTitle: type: - string - "null" sceneId: type: string segment: $ref: "#/components/schemas/Segment" sourceText: type: string canonicalText: type: string structure: type: object additionalProperties: true cast: anyOf: - $ref: "#/components/schemas/SpeakerAttribution" - type: "null" direction: anyOf: - $ref: "#/components/schemas/SegmentDirection" - type: "null" renderHistory: type: array items: $ref: "#/components/schemas/SegmentRender" waveform: type: object additionalProperties: true qaIssues: type: array items: $ref: "#/components/schemas/Issue" comments: type: array items: $ref: "#/components/schemas/Comment" patchQueue: type: array items: $ref: "#/components/schemas/PatchAttempt" CreateCommentRequest: type: object required: [body] properties: body: type: string CreateExportRequest: type: object properties: format: type: string chapterIds: type: array items: type: string audioVariant: type: string enum: [active, clean, mixed] title: type: string author: type: string album: type: string publisher: type: string copyright: type: string language: type: string coverImagePath: type: string includeRetailSample: type: boolean UpsertRightsDeclarationRequest: type: object required: [declarationType, status] properties: declarationType: type: string status: type: string notes: type: string evidencePath: type: string JobAcceptedResponse: type: object properties: jobId: type: string status: type: string pollUrl: type: string JobStatus: type: object properties: id: type: string jobType: type: string status: type: string progress: type: object additionalProperties: true errorMessage: type: string ReparseRequest: type: object properties: parserVersion: type: string ParserWarning: type: object properties: severity: type: string sourceRange: type: string message: type: string suggestedAction: type: string SourceDocument: type: object properties: id: type: string projectId: type: string originalFilename: type: string mimeType: type: string checksum: type: string importedAt: type: string format: date-time rightsStatus: type: string parserVersion: type: string originalPath: type: string canonicalPath: type: string manifestPath: type: string status: type: string preview: type: string warnings: type: array items: $ref: "#/components/schemas/ParserWarning" SourcePage: type: object properties: id: type: string sourceDocumentId: type: string pageNumber: type: integer imagePath: type: - string - "null" imageUrl: type: - string - "null" embeddedTextPath: type: - string - "null" selectedTextPath: type: - string - "null" extractionMethod: type: string confidence: type: number preview: type: - string - "null" warnings: type: array items: $ref: "#/components/schemas/ParserWarning" CleaningRun: type: object properties: id: type: string sourceDocumentId: type: string status: type: string manifestPath: type: - string - "null" startedAt: type: string format: date-time completedAt: type: - string - "null" format: date-time errorMessage: type: - string - "null" TextCleanlinessIssue: type: object properties: id: type: string sourceDocumentId: type: string canonicalSpanStart: type: integer canonicalSpanEnd: type: integer issueType: type: string severity: type: string suggestedFix: type: - string - "null" confidence: type: number status: type: string resolvedByUser: type: boolean TextCleanlinessIssueUpdate: type: object properties: status: type: string resolvedByUser: type: boolean LlmRun: type: object properties: id: type: string projectId: type: - string - "null" sourceDocumentId: type: - string - "null" provider: type: string model: type: string task: type: string status: type: string promptPath: type: - string - "null" responsePath: type: - string - "null" schema: type: object additionalProperties: true result: type: - object - "null" additionalProperties: true errorMessage: type: - string - "null" retries: type: integer startedAt: type: string format: date-time completedAt: type: - string - "null" format: date-time LlmExtractionRequest: type: object properties: model: type: string task: type: string sourceDocumentId: type: - string - "null" schema: type: object additionalProperties: true prompt: type: - string - "null" EmbeddingRequest: type: object properties: model: type: string input: oneOf: - type: string - type: array items: type: string EmbeddingResult: type: object properties: model: type: string embeddings: type: array items: type: array items: type: number