{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shortgenius-com/json-schema/shortgenius-com-audio-schema.json",
  "title": "Audio",
  "description": "Details about the created or retrieved audio media.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shortgenius-com-openapi.yaml#/components/schemas/Audio",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique ID of the audio."
    },
    "created_at": {
      "type": "string",
      "description": "Date and time (ISO 8601) when the audio media was created."
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "Date and time (ISO 8601) when the audio media was last updated."
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "URL of the audio. Only available after the audio is generated."
    },
    "user_id": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the user who generated the audio."
    },
    "transcript": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "words": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "start": {
                "type": "number"
              },
              "end": {
                "type": "number"
              },
              "confidence": {
                "type": "number"
              }
            },
            "required": [
              "text",
              "start",
              "end"
            ]
          }
        }
      },
      "required": [
        "words"
      ],
      "description": "Transcript of the audio with timestamps. Only available after the audio is generated."
    },
    "category": {
      "type": "string",
      "enum": [
        "AIGeneratedAudio",
        "AIGeneratedAudioForVideo",
        "AIGeneratedMusic"
      ],
      "description": "Category of the audio."
    },
    "state": {
      "type": "string",
      "enum": [
        "pending",
        "generating",
        "completed",
        "error"
      ],
      "description": "State of the audio generation."
    },
    "text": {
      "type": [
        "string",
        "null"
      ],
      "description": "Source text of the audio."
    },
    "locale": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "af-ZA",
        "id-ID",
        "ms-MY",
        "ca-ES",
        "cs-CZ",
        "da-DK",
        "de-DE",
        "en-US",
        "es-ES",
        "es-419",
        "fr-CA",
        "fr-FR",
        "hr-HR",
        "it-IT",
        "hu-HU",
        "nl-NL",
        "no-NO",
        "pl-PL",
        "pt-BR",
        "pt-PT",
        "ro-RO",
        "sk-SK",
        "fi-FI",
        "sv-SE",
        "vi-VN",
        "tr-TR",
        "el-GR",
        "ru-RU",
        "sr-SP",
        "uk-UA",
        "hy-AM",
        "he-IL",
        "ur-PK",
        "ar-SA",
        "hi-IN",
        "th-TH",
        "ko-KR",
        "ja-JP",
        "zh-CN",
        "zh-TW",
        null
      ],
      "description": "Locale of the audio to guide the AI. Auto-detected if not provided."
    },
    "voice": {
      "$ref": "#/$defs/Voice",
      "description": "Voice used to generate the audio."
    },
    "duration": {
      "type": [
        "number",
        "null"
      ],
      "description": "Duration of the generated audio. Only available after the audio is generated."
    },
    "lufs": {
      "type": [
        "number",
        "null"
      ],
      "description": "Loudness normalization value in LUFS. Only available after the audio is generated."
    }
  },
  "required": [
    "id",
    "created_at",
    "url",
    "user_id",
    "category",
    "state"
  ],
  "$defs": {
    "Voice": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique ID of the voice."
        },
        "name": {
          "type": "string",
          "description": "Name of the voice."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description of the voice."
        },
        "avatar_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Avatar url of the voice."
        },
        "flag_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Flag url of the voice."
        },
        "tags": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "language": {
              "type": [
                "string",
                "null"
              ]
            },
            "accent": {
              "type": [
                "string",
                "null"
              ]
            },
            "age": {
              "type": [
                "string",
                "null"
              ]
            },
            "category": {
              "type": [
                "string",
                "null"
              ]
            },
            "gender": {
              "type": [
                "string",
                "null"
              ]
            },
            "tone": {
              "type": [
                "string",
                "null"
              ]
            },
            "useCase": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "description": "Tags of the voice. Describe the characteristics of the voice."
        },
        "preview_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "URL of the preview audio of the voice."
        },
        "locale": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "af-ZA",
            "id-ID",
            "ms-MY",
            "ca-ES",
            "cs-CZ",
            "da-DK",
            "de-DE",
            "en-US",
            "es-ES",
            "es-419",
            "fr-CA",
            "fr-FR",
            "hr-HR",
            "it-IT",
            "hu-HU",
            "nl-NL",
            "no-NO",
            "pl-PL",
            "pt-BR",
            "pt-PT",
            "ro-RO",
            "sk-SK",
            "fi-FI",
            "sv-SE",
            "vi-VN",
            "tr-TR",
            "el-GR",
            "ru-RU",
            "sr-SP",
            "uk-UA",
            "hy-AM",
            "he-IL",
            "ur-PK",
            "ar-SA",
            "hi-IN",
            "th-TH",
            "ko-KR",
            "ja-JP",
            "zh-CN",
            "zh-TW",
            null
          ],
          "description": "Locale of the voice."
        },
        "source": {
          "type": "string",
          "enum": [
            "Cartesia",
            "CartesiaClonedVoice",
            "ElevenLabs",
            "ElevenLabsShared",
            "FishAudio",
            "FishAudioClonedVoice",
            "OpenAI"
          ],
          "description": "Source of the voice."
        }
      },
      "required": [
        "id",
        "name",
        "description",
        "tags",
        "preview_url",
        "locale",
        "source"
      ],
      "description": "A text-to-speech voice"
    }
  }
}