{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/octen-ai/json-schema/octen-ai-video-search-request-schema.json",
  "title": "VideoSearchRequest",
  "description": "Request body for the Video Search API.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/octen-ai-video-search-api-openapi.yml#/components/schemas/VideoSearchRequest",
  "type": "object",
  "required": [
    "inputs"
  ],
  "properties": {
    "inputs": {
      "type": "array",
      "maxItems": 1,
      "description": "Input array carrying a text query (at most 1).",
      "items": {
        "$ref": "#/$defs/VideoSearchInput"
      }
    },
    "count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10,
      "default": 5,
      "description": "Number of results to return."
    },
    "time_range": {
      "type": "string",
      "enum": [
        "day",
        "week",
        "month",
        "year",
        "d",
        "w",
        "m",
        "y"
      ],
      "description": "Relative time window counting back from the current time, filtered by publish time. Mutually exclusive with `start_time`/`end_time` — if both are provided, `start_time`/`end_time` take precedence."
    },
    "start_time": {
      "type": "string",
      "format": "date-time",
      "description": "Start time for filtering results by publish time. ISO 8601 format."
    },
    "end_time": {
      "type": "string",
      "format": "date-time",
      "description": "End time for filtering results by publish time. ISO 8601 format."
    },
    "safesearch": {
      "type": "string",
      "enum": [
        "off",
        "strict"
      ],
      "default": "strict",
      "description": "Controls filtering of explicit/adult content. `off` disables filtering; `strict` drops all adult content."
    }
  },
  "$defs": {
    "VideoSearchInput": {
      "type": "object",
      "required": [
        "type"
      ],
      "description": "A single text input. At most one input per request.",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "text"
          ],
          "description": "The input type."
        },
        "data": {
          "type": "string",
          "description": "The query content, max 500 characters."
        }
      }
    }
  }
}