{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiostack/json-schema/audiostack-create-story-from-body-request-schema.json",
  "title": "Submit a new story",
  "description": "A request to create a new story for longform audio content creation. The story object defines the narrative, voices, sounds, and delivery preferences for the audio content to be generated.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiostack-story-api-openapi.yml#/components/schemas/CreateStoryFromBodyRequest",
  "type": "object",
  "properties": {
    "story": {
      "title": "Story",
      "description": "A story is a collection of chapters that are played sequentially.\nEach chapter is converted to an `audioform` for audio production.\n\nA story is made up of:\n\n- A title\n- A list of voices - your preselected cast of characters\n- A list of sounds - your preselected music and sound effects for your creation\n- A list of chapters - your story is divided into one or more chapters.\n",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the content you are creating.\n"
        },
        "textSettings": {
          "additionalProperties": false,
          "properties": {
            "language": {
              "oneOf": [
                {
                  "type": "null",
                  "title": "Autodetect script language",
                  "description": "Set to `null` to enable automatic detection of language.\nAutodetction is more reliable with longer scripts.\nYou may get an error if the langauge cannot be confidently detected.\nIn that case, manually specify the language.\n"
                },
                {
                  "$ref": "#/$defs/items"
                }
              ],
              "default": null,
              "description": "Set the language of the script.\nWhen omitted or set to null, automated language detection will be used.\n"
            },
            "useVoiceIntelligenceLayer": {
              "default": false,
              "title": "Use Voice Intelligence Layer",
              "type": "boolean",
              "description": "Define whether to use the voice intelligence layer in the story.\n"
            }
          },
          "title": "Story text settings"
        },
        "voices": {
          "items": {
            "anyOf": [
              {
                "title": "Voice",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "alias": {
                    "title": "Alias",
                    "type": "string"
                  },
                  "speakerIdentifier": {
                    "title": "Speaker",
                    "type": "string",
                    "description": "The speakerIdentifier is used to select the voice to read specific text in the `narratives`.\n"
                  },
                  "speed": {
                    "$ref": "#/$defs/speed",
                    "description": "Set a value to guide the speed for the voice or leave as `null` to use the default speed. \n"
                  },
                  "voicePreset": {
                    "$ref": "#/$defs/voicePreset",
                    "default": "standard",
                    "description": "The voicePreset is used to select the voice to use for the story. The default preset is `standard`. \nYou can use the `expressive` preset to get more emotion in the voice but it may be less stable.\n"
                  }
                },
                "required": [
                  "alias",
                  "speakerIdentifier"
                ]
              }
            ]
          },
          "minItems": 1,
          "title": "Voices",
          "type": "array"
        },
        "sounds": {
          "additionalProperties": false,
          "properties": {
            "soundDesigns": {
              "items": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "soundDesignIdentifier": {
                        "title": "Sound Design Identifier",
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "asset"
                        ]
                      },
                      "alias": {
                        "title": "Alias",
                        "type": "string"
                      }
                    },
                    "title": "Sound Design from AudioStack Library",
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "soundDesignIdentifier": {
                        "title": "Sound Design Identifier",
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "file"
                        ]
                      },
                      "fileId": {
                        "title": "File ID",
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "title": "Sound Design from Uploaded File",
                    "type": "object"
                  }
                ]
              },
              "type": "array",
              "minItems": 1
            },
            "soundEffects": {
              "items": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "soundEffectIdentifier": {
                        "title": "Sound Effect Identifier",
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "asset"
                        ]
                      },
                      "alias": {
                        "title": "Alias",
                        "type": "string"
                      }
                    },
                    "title": "Sound Effect from AudioStack Library",
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "soundEffectIdentifier": {
                        "title": "Sound Effect Identifier",
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "file"
                        ]
                      },
                      "fileId": {
                        "title": "File ID",
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "title": "Sound Effect from Uploaded File",
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "recommender"
                        ]
                      },
                      "effectType": {
                        "type": "string",
                        "title": "Supported values for sound effect type",
                        "description": "Types of sound effects available from the AudioStack sound effect library.\n\noneShot: A short, event-driven sound effect.\n",
                        "enum": [
                          "oneShot"
                        ]
                      }
                    },
                    "title": "Sound Effect Recommender",
                    "description": "Selects and places sound effects from the AudioStack library into your story.\n",
                    "type": "object"
                  }
                ]
              },
              "type": "array",
              "minItems": 1
            }
          },
          "title": "Sound"
        },
        "production": {
          "description": "Story production settings. Differs from Brief: omit `mixingPreset` to default to `dynamic` at build time.\n",
          "properties": {
            "mixingPreset": {
              "description": "Controls how voice, music, SFX, and media assets are blended together. Omit to default to `dynamic`. Set to `recommended` to omit mixing on the v5 audioform and let the build-time recommender run. Explicit v4 values are mapped to v5 and never overridden.\n",
              "$ref": "#/$defs/mixingPreset"
            }
          },
          "title": "Story production settings",
          "type": "object"
        },
        "delivery": {
          "$ref": "#/$defs/delivery"
        },
        "chapters": {
          "items": {
            "type": "object",
            "title": "Chapter",
            "description": "A chapter is a collection of narrative blocks that are played sequentially.\nEach narrative block is converted to an `audioform` for audio production.\n",
            "additionalProperties": false,
            "properties": {
              "title": {
                "type": "string",
                "description": "The title of the chapter.\n"
              },
              "narratives": {
                "items": {
                  "type": "object",
                  "title": "Narrative",
                  "description": "Narrative blocks are a helpful way aligning the foreground\nand background speech/music/effects to create the desired\ncreative atmosphere.\n\nA narrative block is made up of:\n- A foreground layer - the prominent layer in the narrative.\n- Two background layers - to support a rich layering of atmosphere\nand music.\n\nLayers consist of sequentially arranged pieces of text-to-speech,\nsound designs and sound effects. \n\nThe duration of narrative is determined by its foreground layer.\nThe foreground layer is the sum of the duration of the items in the layer.\nThe background layers start at the same time as the start of the\nforeground layer and run for the duration of the foreground layer.\n",
                  "additionalProperties": false,
                  "properties": {
                    "foreground": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "title": "Text-to-speech",
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "text": {
                                "type": "string",
                                "description": "The text to be spoken.\n"
                              },
                              "speakerIdentifier": {
                                "type": "string",
                                "description": "The speaker identifier of the voice to use to read the text.\n"
                              }
                            }
                          },
                          {
                            "title": "Sound design",
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "soundDesignIdentifier": {
                                "type": "string",
                                "description": "The sound design identifier of the sound design to use.\n"
                              },
                              "duration": {
                                "type": "number",
                                "description": "The duration of the sound design in seconds.\n"
                              },
                              "useSmartFit": {
                                "type": "boolean",
                                "description": "Whether to use smart fit for the sound design. Only applicable\nif the sound design is from the AudioStack library.\n"
                              }
                            }
                          },
                          {
                            "title": "Sound effect",
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "soundEffectIdentifier": {
                                "type": "string",
                                "description": "The sound effect identifier of the sound effect to use.\n"
                              }
                            }
                          }
                        ]
                      },
                      "minItems": 1,
                      "title": "Foreground layer",
                      "description": "The foreground layer is the prominent layer in the narrative.\nThe items in this layer are arranged sequentially and the\nduration of the foreground layer is the sum of the duration\nof the items in this layer.\n"
                    },
                    "background1": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/$defs/0"
                          },
                          {
                            "$ref": "#/$defs/1"
                          },
                          {
                            "$ref": "#/$defs/2"
                          }
                        ]
                      },
                      "minItems": 1,
                      "title": "Background layer",
                      "description": "Each background layer starts at the same time as the start of\nthe Foreground layer and runs for the duration of the Foreground layer\n"
                    },
                    "background2": {
                      "$ref": "#/$defs/background1"
                    }
                  },
                  "required": [
                    "foreground"
                  ]
                },
                "minItems": 1,
                "title": "Narrative blocks",
                "type": "array"
              }
            },
            "required": [
              "title",
              "narrative"
            ]
          },
          "minItems": 1,
          "title": "Chapters",
          "type": "array"
        }
      },
      "required": [
        "chapters",
        "title"
      ]
    }
  },
  "required": [
    "story"
  ],
  "additionalProperties": false
}