{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beatra-ai/json-schema/beatra-ai-speech-validation-report-schema.json",
  "title": "SpeechValidationReport",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beatra-ai-audio-api-openapi.yml#/components/schemas/SpeechValidationReport",
  "properties": {
    "valid": {
      "type": "boolean",
      "title": "Valid",
      "description": "True when the request passes every preflight check"
    },
    "warnings": {
      "items": {
        "$ref": "#/$defs/TaskWarning"
      },
      "type": "array",
      "title": "Warnings",
      "description": "Non-blocking markup advisories; the same warnings a create call would return"
    },
    "weighted_characters": {
      "type": "integer",
      "title": "Weighted Characters",
      "description": "Weighted character count, the same quantity the create call bills on"
    },
    "price_credits": {
      "type": "string",
      "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
      "title": "Price Credits",
      "description": "Estimated credits for the create call"
    },
    "execution": {
      "$ref": "#/$defs/SpeechValidationExecution"
    },
    "script_markup": {
      "anyOf": [
        {
          "$ref": "#/$defs/SpeechScriptMarkup"
        },
        {
          "type": "null"
        }
      ],
      "description": "Markup vocabulary supported by the resolved model"
    },
    "limitations": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Limitations",
      "description": "Capability limits declared by the resolved model"
    }
  },
  "type": "object",
  "required": [
    "valid",
    "weighted_characters",
    "price_credits",
    "execution"
  ],
  "$defs": {
    "SpeechMarkupAlias": {
      "properties": {
        "syntax": {
          "type": "string",
          "title": "Syntax"
        },
        "note": {
          "type": "string",
          "title": "Note"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "syntax",
        "note"
      ],
      "title": "SpeechMarkupAlias"
    },
    "SpeechMarkupPause": {
      "properties": {
        "syntax": {
          "type": "string",
          "title": "Syntax"
        },
        "range": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Range"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Note"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "syntax",
        "range"
      ],
      "title": "SpeechMarkupPause"
    },
    "SpeechMarkupPronunciation": {
      "properties": {
        "syntax": {
          "type": "string",
          "title": "Syntax"
        },
        "readings": {
          "type": "string",
          "title": "Readings"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "syntax",
        "readings"
      ],
      "title": "SpeechMarkupPronunciation"
    },
    "SpeechMarkupTag": {
      "properties": {
        "token": {
          "type": "string",
          "title": "Token"
        },
        "meaning": {
          "type": "string",
          "title": "Meaning"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "token",
        "meaning"
      ],
      "title": "SpeechMarkupTag"
    },
    "SpeechScriptMarkup": {
      "properties": {
        "pause": {
          "$ref": "#/$defs/SpeechMarkupPause"
        },
        "tags": {
          "items": {
            "$ref": "#/$defs/SpeechMarkupTag"
          },
          "type": "array",
          "title": "Tags"
        },
        "pronunciation": {
          "$ref": "#/$defs/SpeechMarkupPronunciation"
        },
        "escape": {
          "type": "string",
          "title": "Escape"
        },
        "alias": {
          "anyOf": [
            {
              "$ref": "#/$defs/SpeechMarkupAlias"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "pause",
        "tags",
        "pronunciation",
        "escape"
      ],
      "title": "SpeechScriptMarkup"
    },
    "SpeechValidationExecution": {
      "properties": {
        "mode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mode",
          "description": "Execution path the create call would take (sync or async)"
        }
      },
      "type": "object",
      "title": "SpeechValidationExecution"
    },
    "TaskWarning": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code",
          "description": "e.g. option_clamped / auto_routed"
        },
        "message": {
          "type": "string",
          "title": "Message"
        },
        "field": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Field"
        }
      },
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "title": "TaskWarning"
    }
  }
}