{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiostack/json-schema/audiostack-post-voices-query-request-schema.json",
  "title": "PostVoicesQueryRequest",
  "description": "Request body for voice query endpoint.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiostack-assets-voices-api-openapi.yml#/components/schemas/PostVoicesQueryRequest",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "default": "",
      "title": "Search query",
      "description": "Free text search query passed to the search engine. This is used to search for voices with some fuzzy matching.\n"
    },
    "filters": {
      "type": "array",
      "title": "Filters",
      "description": "Filters to apply. Each item is an object with one operator key (e.g. \"in\")\nand a value object with one filter field and its values.\n",
      "items": {
        "type": "object",
        "title": "Voices filter",
        "description": "Filter object.",
        "properties": {
          "in": {
            "oneOf": [
              {
                "type": "object",
                "title": "Accent filter",
                "required": [
                  "accent"
                ],
                "additionalProperties": false,
                "properties": {
                  "accent": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/accent"
                    },
                    "title": "Specify accent filter condition",
                    "description": "Specify the accent filter condition. You can specify multiple accepted values by adding them to the array.\n"
                  }
                }
              },
              {
                "type": "object",
                "title": "Age bracket filter",
                "required": [
                  "ageBracket"
                ],
                "additionalProperties": false,
                "properties": {
                  "ageBracket": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/ageBracket"
                    },
                    "title": "Specify age bracket filter condition",
                    "description": "Specify the age bracket filter condition. You can specify multiple accepted values by adding them to the array.\n"
                  }
                }
              },
              {
                "type": "object",
                "title": "Alias filter",
                "required": [
                  "alias"
                ],
                "additionalProperties": false,
                "properties": {
                  "alias": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Specify alias filter condition",
                    "description": "Specify the alias filter condition. You can specify multiple accepted values by adding them to the array.\n"
                  }
                }
              },
              {
                "type": "object",
                "title": "Gender filter",
                "required": [
                  "gender"
                ],
                "additionalProperties": false,
                "properties": {
                  "gender": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/gender"
                    },
                    "title": "Specify gender filter condition",
                    "description": "Specify the gender filter condition. You can specify multiple accepted values by adding them to the array.\n"
                  }
                }
              },
              {
                "type": "object",
                "title": "Language filter",
                "required": [
                  "language"
                ],
                "additionalProperties": false,
                "properties": {
                  "language": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/items"
                    },
                    "title": "Specify language filter condition",
                    "description": "Specify the language filter condition. You can specify multiple accepted values by adding them to the array.\n"
                  }
                }
              },
              {
                "type": "object",
                "title": "Provider filter",
                "required": [
                  "provider"
                ],
                "additionalProperties": false,
                "properties": {
                  "provider": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/provider"
                    },
                    "title": "Specify provider filter condition",
                    "description": "Specify the provider filter condition. You can specify multiple accepted values by adding them to the array.\n"
                  }
                }
              },
              {
                "type": "object",
                "title": "Type filter",
                "required": [
                  "type"
                ],
                "additionalProperties": false,
                "properties": {
                  "type": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/type"
                    },
                    "title": "Specify type filter condition",
                    "description": "Specify the type filter condition. You can specify multiple accepted values by adding them to the array.\n"
                  }
                }
              }
            ]
          }
        }
      }
    },
    "forceApplyFilters": {
      "title": "Force apply filters",
      "type": "boolean",
      "default": true,
      "description": "When true, applies filters strictly even with few results. In instances where the filters\nare overly restrictive, you may get fewer results than desired.\n"
    },
    "minimumNumberOfResults": {
      "type": "integer",
      "default": 3,
      "title": "Minimum number of results",
      "description": "In instances where you want to ensure a minimum number of results, you can set this parameter.\nYou must also set forceApplyFilters to false. Filter conditions will be relaxed to attempt to\nreturn the minimum number of results.\n"
    },
    "sort": {
      "title": "Sort field",
      "$ref": "#/$defs/VoicesSortValues"
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "default": 1,
      "title": "Page number",
      "description": "Page number to return (1-indexed)."
    },
    "pageLimit": {
      "type": "integer",
      "minimum": 1,
      "default": 1000,
      "title": "Page limit",
      "description": "Number of items per page."
    }
  },
  "$defs": {
    "VoicesSortValues": {
      "type": "string",
      "enum": [
        "alias"
      ],
      "description": "Field to sort results by. If omitted, results are sorted by AudioStack's internal priority."
    }
  }
}