{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ditto-audio/json-schema/ditto-audio-create-render-dto-schema.json",
  "title": "CreateRenderDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ditto-audio-reader-api-openapi.yml#/components/schemas/CreateRenderDto",
  "type": "object",
  "properties": {
    "voice": {
      "type": "string",
      "description": "A voice id from `GET /v1/audio/voices`."
    },
    "speed": {
      "type": "number",
      "description": "Accepted and ignored: narration is made at 1.0, and a player applies the listener's speed."
    },
    "chapters": {
      "description": "The chapters to narrate and their segment counts. Required: the server does not parse your source document, so it cannot invent this.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/RenderChapterDto"
      }
    }
  },
  "required": [
    "voice",
    "chapters"
  ],
  "$defs": {
    "RenderChapterDto": {
      "type": "object",
      "properties": {
        "chapterIndex": {
          "type": "number",
          "description": "The chapter's EPUB spine index: its position among all the spine's itemrefs, from 0."
        },
        "paragraphCount": {
          "type": "number",
          "description": "How many segments of this chapter to narrate, counted the way Ditto's book reader cuts the chapter (runs of about 150-350 characters). A range the reader cannot find in the uploaded EPUB is refused by every renderer."
        }
      },
      "required": [
        "chapterIndex",
        "paragraphCount"
      ]
    }
  }
}