{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/craftstory-com/json-schema/craftstory-com-audio-clip-schema.json",
  "title": "AudioClip",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/craftstory-com-audio-api-openapi.yml#/components/schemas/AudioClip",
  "required": [
    "kind",
    "voice",
    "voice_11labs",
    "voice_user"
  ],
  "type": "object",
  "properties": {
    "id": {
      "title": "Id",
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "status": {
      "title": "Status",
      "type": "string",
      "enum": [
        "created",
        "in_progress",
        "done",
        "failed_tts",
        "failed_moderation",
        "failed_duration",
        "failed",
        "not_pass_moderation"
      ]
    },
    "kind": {
      "title": "Kind",
      "type": "string",
      "enum": [
        "text",
        "file",
        "silent"
      ]
    },
    "duration": {
      "title": "Duration",
      "type": [
        "integer",
        "null"
      ],
      "maximum": 2147483647,
      "minimum": 0
    },
    "language": {
      "title": "Language",
      "type": [
        "integer",
        "null"
      ]
    },
    "moderation_labels": {
      "title": "Moderation labels",
      "type": [
        "object",
        "null"
      ]
    },
    "created": {
      "title": "Created",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "updated": {
      "title": "Updated",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "file": {
      "title": "File",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "format": "uri"
    },
    "text": {
      "title": "Text",
      "type": [
        "string",
        "null"
      ]
    },
    "voice": {
      "$ref": "#/$defs/AudioClipVoice"
    },
    "voice_11labs": {
      "$ref": "#/$defs/AudioClipVoice11Labs"
    },
    "voice_user": {
      "$ref": "#/$defs/AudioClipUserVoice"
    },
    "is_voice_default": {
      "title": "Is voice default",
      "type": "boolean"
    },
    "is_user_selected_voice": {
      "title": "Is user selected voice",
      "type": "boolean"
    }
  },
  "$defs": {
    "AudioClipUserVoice": {
      "type": "object",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "name": {
          "title": "Name",
          "type": "string",
          "maxLength": 256
        },
        "voice_id": {
          "title": "Voice id",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 128
        },
        "language": {
          "$ref": "#/$defs/Voice11LabsVoiceListRetrieveLanguage"
        },
        "labels": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Voice11LabsVoiceListRetrieve11Label"
          },
          "readOnly": true
        },
        "gender": {
          "title": "Gender",
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "male",
            "female",
            null
          ]
        },
        "age": {
          "title": "Age",
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "child",
            "young_adult",
            "middle_adult",
            "old",
            null
          ]
        },
        "status": {
          "title": "Status",
          "type": "string",
          "enum": [
            "created",
            "in_progress",
            "done",
            "failed"
          ]
        }
      }
    },
    "AudioClipVoice": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "name": {
          "title": "Name",
          "type": "string",
          "maxLength": 256,
          "minLength": 1
        },
        "kind": {
          "title": "Kind",
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "avatar",
            "eleven_labs",
            null
          ]
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "uniqueItems": true
        },
        "gender": {
          "title": "Gender",
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "male",
            "female",
            null
          ]
        },
        "age": {
          "title": "Age",
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "child",
            "young_adult",
            "middle_adult",
            "old",
            null
          ]
        },
        "language": {
          "title": "Language",
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "AudioClipVoice11Labs": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "name": {
          "title": "Name",
          "type": "string",
          "maxLength": 256,
          "minLength": 1
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "uniqueItems": true
        },
        "gender": {
          "title": "Gender",
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "male",
            "female",
            null
          ]
        },
        "age": {
          "title": "Age",
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "child",
            "young_adult",
            "middle_adult",
            "old",
            null
          ]
        },
        "language": {
          "title": "Language",
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "Voice11LabsVoiceListRetrieve11Label": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "name": {
          "title": "Name",
          "type": "string",
          "maxLength": 64,
          "minLength": 1
        }
      }
    },
    "Voice11LabsVoiceListRetrieveLanguage": {
      "required": [
        "code",
        "elevenlabs_code"
      ],
      "type": "object",
      "properties": {
        "id": {
          "title": "ID",
          "type": "integer",
          "readOnly": true
        },
        "code": {
          "title": "Code",
          "type": "string",
          "maxLength": 8,
          "minLength": 1
        },
        "elevenlabs_code": {
          "title": "Elevenlabs code",
          "type": "string",
          "maxLength": 8,
          "minLength": 1
        }
      }
    }
  }
}