{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiopod-ai/json-schema/audiopod-ai-audiobook-project-with-chapters-response-schema.json",
  "title": "AudiobookProjectWithChaptersResponse",
  "description": "Single-project response that can carry its chapters inline.\n\n`chapters` is null when the caller omitted `include_chapters` — distinct\nfrom an empty list, which means the project genuinely has no chapters.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiopod-ai-audiobook-api-openapi.yml#/components/schemas/AudiobookProjectWithChaptersResponse",
  "properties": {
    "title": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "title": "Title",
      "description": "Audiobook title"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "null"
        }
      ],
      "title": "Description",
      "description": "Project description"
    },
    "author": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ],
      "title": "Author",
      "description": "Author name"
    },
    "isbn": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ],
      "title": "Isbn",
      "description": "ISBN if available"
    },
    "genre": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ],
      "title": "Genre",
      "description": "Book genre"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "user_id": {
      "type": "string",
      "format": "uuid",
      "title": "User Id"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "export_input_revision": {
      "type": "integer",
      "title": "Export Input Revision",
      "default": 0
    },
    "state_version": {
      "type": "integer",
      "title": "State Version",
      "description": "Monotonic version of this record. It increases whenever the record's status, audio, review state or text changes, and equals the id of the matching event on the project's event stream. Keep the higher one.",
      "default": 0
    },
    "total_chapters": {
      "type": "integer",
      "title": "Total Chapters"
    },
    "estimated_duration_minutes": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Estimated Duration Minutes"
    },
    "manuscript_filename": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Manuscript Filename"
    },
    "manuscript_format": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Manuscript Format"
    },
    "manuscript_word_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Manuscript Word Count"
    },
    "rights_attested_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rights Attested At"
    },
    "source_type": {
      "type": "string",
      "title": "Source Type",
      "default": "upload"
    },
    "selected_voice_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Selected Voice Id"
    },
    "language": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Language"
    },
    "narration_speed": {
      "type": "number",
      "title": "Narration Speed"
    },
    "narration_style": {
      "type": "string",
      "title": "Narration Style"
    },
    "narration_brief": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Narration Brief"
    },
    "export_format": {
      "type": "string",
      "title": "Export Format"
    },
    "target_platform": {
      "type": "string",
      "title": "Target Platform"
    },
    "auto_regenerate_on_edit": {
      "type": "boolean",
      "title": "Auto Regenerate On Edit",
      "default": false
    },
    "multi_voice": {
      "type": "boolean",
      "title": "Multi Voice",
      "default": false
    },
    "narration_review_policy": {
      "type": "string",
      "enum": [
        "manual",
        "auto_accept"
      ],
      "title": "Narration Review Policy",
      "default": "manual"
    },
    "book_metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Book Metadata"
    },
    "generation_metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Generation Metadata"
    },
    "parsing_completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Parsing Completed At"
    },
    "narration_started_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Narration Started At"
    },
    "narration_completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Narration Completed At"
    },
    "production_completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Production Completed At"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "error_message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error Message"
    },
    "deleted_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Deleted At"
    },
    "r2_purged_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "R2 Purged At"
    },
    "last_downloaded_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Downloaded At"
    },
    "download_count": {
      "type": "integer",
      "title": "Download Count",
      "default": 0
    },
    "selected_voice_display_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Selected Voice Display Name"
    },
    "lifecycle": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Lifecycle"
    },
    "edit_lock": {
      "anyOf": [
        {
          "$ref": "#/$defs/BookLockState"
        },
        {
          "type": "null"
        }
      ]
    },
    "voice_auto_selected": {
      "type": "boolean",
      "title": "Voice Auto Selected",
      "default": false
    },
    "pending_notices": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Pending Notices"
    },
    "cover_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cover Url"
    },
    "cover_thumb_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cover Thumb Url"
    },
    "cover_source": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "upload",
            "file",
            "isbn_lookup",
            "generated"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Cover Source"
    },
    "metadata_sources": {
      "additionalProperties": {
        "type": "string",
        "enum": [
          "file",
          "isbn_lookup"
        ]
      },
      "type": "object",
      "title": "Metadata Sources"
    },
    "chapters": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/AudiobookChapterResponse"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Chapters"
    }
  },
  "type": "object",
  "required": [
    "title",
    "id",
    "user_id",
    "status",
    "total_chapters",
    "estimated_duration_minutes",
    "manuscript_filename",
    "manuscript_format",
    "manuscript_word_count",
    "selected_voice_id",
    "narration_speed",
    "narration_style",
    "export_format",
    "target_platform",
    "parsing_completed_at",
    "narration_started_at",
    "narration_completed_at",
    "production_completed_at",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "AudiobookChapterResponse": {
      "properties": {
        "chapter_number": {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 1.0,
          "title": "Chapter Number"
        },
        "title": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ],
          "title": "Title"
        },
        "subtitle": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 300
            },
            {
              "type": "null"
            }
          ],
          "title": "Subtitle"
        },
        "content": {
          "type": "string",
          "minLength": 1,
          "title": "Content",
          "description": "Chapter text content"
        },
        "section_kind": {
          "type": "string",
          "title": "Section Kind",
          "default": "chapter"
        },
        "exclusion_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Exclusion Reason"
        },
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "project_id": {
          "type": "string",
          "format": "uuid",
          "title": "Project Id"
        },
        "word_count": {
          "type": "integer",
          "title": "Word Count"
        },
        "character_count": {
          "type": "integer",
          "title": "Character Count"
        },
        "estimated_duration_minutes": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Estimated Duration Minutes"
        },
        "audio_file_path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Audio File Path"
        },
        "duration_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Duration Seconds"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "state_version": {
          "type": "integer",
          "title": "State Version",
          "description": "Monotonic version of this record. It increases whenever the record's status, audio, review state or text changes, and equals the id of the matching event on the project's event stream. Keep the higher one.",
          "default": 0
        },
        "processing_started_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Processing Started At"
        },
        "processing_completed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Processing Completed At"
        },
        "error_message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Error Message"
        },
        "retry_count": {
          "type": "integer",
          "title": "Retry Count"
        },
        "audio_levels": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Audio Levels"
        },
        "acx_compliance": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Acx Compliance"
        },
        "skip_narration": {
          "type": "boolean",
          "title": "Skip Narration"
        },
        "voice_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Voice Id"
        },
        "narration_notes": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Narration Notes"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "title": "Updated At"
        },
        "r2_purged_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "R2 Purged At"
        }
      },
      "type": "object",
      "required": [
        "chapter_number",
        "content",
        "id",
        "project_id",
        "word_count",
        "character_count",
        "estimated_duration_minutes",
        "audio_file_path",
        "duration_seconds",
        "status",
        "processing_started_at",
        "processing_completed_at",
        "error_message",
        "retry_count",
        "audio_levels",
        "acx_compliance",
        "skip_narration",
        "voice_id",
        "narration_notes",
        "created_at",
        "updated_at"
      ],
      "title": "AudiobookChapterResponse"
    },
    "BookLockState": {
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "open",
            "finalizing",
            "exporting",
            "restructuring"
          ],
          "title": "State",
          "description": "'open': every edit is allowed. 'finalizing': the book is being finalized for production. 'exporting': a download package is being built. 'restructuring': the manuscript is being parsed into chapters and paragraphs.",
          "default": "open"
        },
        "run_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Run Id",
          "description": "The production run finalizing the book, when state is 'finalizing'."
        },
        "started_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Started At",
          "description": "When the locking work started, when known."
        },
        "blocks": {
          "items": {
            "type": "string",
            "enum": [
              "text",
              "voices",
              "narration",
              "structure",
              "downloads"
            ]
          },
          "type": "array",
          "title": "Blocks",
          "description": "Which kinds of change are refused while the lock lasts. A refused change answers 409 with code 'book_locked'."
        },
        "stop": {
          "$ref": "#/$defs/BookLockStop"
        }
      },
      "type": "object",
      "title": "BookLockState",
      "description": "What a book is locked for right now."
    },
    "BookLockStop": {
      "properties": {
        "available": {
          "type": "boolean",
          "title": "Available",
          "description": "True when the work can be stopped from the studio (POST .../production/runs/{run_id}/cancel).",
          "default": false
        },
        "effect": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Effect",
          "description": "What stopping does, in a plain sentence for the confirm dialog."
        }
      },
      "type": "object",
      "title": "BookLockStop"
    }
  }
}