{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiopod-ai/json-schema/audiopod-ai-audiobook-project-response-schema.json",
  "title": "AudiobookProjectResponse",
  "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/AudiobookProjectResponse",
  "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"
    }
  },
  "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": {
    "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"
    }
  }
}