{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiostack/json-schema/audiostack-get-story-response-schema.json",
  "title": "Get Story Response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiostack-story-api-openapi.yml#/components/schemas/GetStoryResponse",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string",
              "format": "uuid",
              "title": "Request ID"
            },
            "version": {
              "type": "string",
              "enum": [
                "123"
              ],
              "default": "123",
              "deprecated": true
            },
            "creditsUsed": {
              "type": "number",
              "title": "Credits used",
              "default": 0,
              "deprecated": true
            },
            "creditsRemaining": {
              "type": "number",
              "title": "Credits remaining",
              "default": 0,
              "deprecated": true
            }
          }
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": [],
          "title": "Response warnings"
        }
      },
      "required": [
        "meta",
        "warnings"
      ]
    },
    {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Optional. When the job completed with an error, details the problem."
        },
        "data": {
          "type": "object",
          "properties": {
            "storyId": {
              "title": "Story ID",
              "type": "string",
              "format": "uuid",
              "description": "The unique identifier of the story creation request."
            },
            "storyResult": {
              "title": "Story Result",
              "description": "The final story result (same shape as the Story type). Present when the job produced a story; may be absent or partial on failure.",
              "$ref": "#/$defs/story"
            },
            "audioforms": {
              "title": "Audioforms",
              "type": "array",
              "description": "List of generated audioforms when the job completed successfully. Each item is an AudioformResult. Optional; absent or partial on failure.",
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/AudioformResult"
                  }
                ]
              }
            },
            "output": {
              "title": "Output",
              "description": "Audio output details when the job completed successfully. Present on success; absent on failure.",
              "type": "object",
              "properties": {
                "audioformUris": {
                  "title": "Audioform URIs",
                  "type": "array",
                  "description": "List of delivery URIs for the individual audioforms.",
                  "items": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "public": {
                  "title": "Public",
                  "type": "boolean",
                  "description": "Whether the generated audio files are publicly accessible."
                },
                "singleAudioFileUri": {
                  "title": "Single Audio File URI",
                  "type": "string",
                  "format": "uri",
                  "description": "URI for a single merged audio file combining all audioforms."
                },
                "extension": {
                  "type": "string",
                  "title": "Extension",
                  "enum": [
                    "mp3",
                    "wav",
                    "ogg",
                    "flac",
                    "m4a"
                  ]
                }
              },
              "required": [
                "audioformUris",
                "public",
                "extension"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "storyId"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "data"
      ]
    },
    {}
  ],
  "additionalProperties": false
}