{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/samplecut-app/json-schema/samplecut-app-download-request-schema.json",
  "title": "DownloadRequest",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/samplecut-app-openapi.yml#/components/schemas/DownloadRequest",
  "type": "object",
  "required": [
    "url"
  ],
  "properties": {
    "url": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "description": "A YouTube, TikTok, Instagram, SoundCloud or X link (short, share and mobile links work too)."
    },
    "start_sec": {
      "type": "number",
      "minimum": 0,
      "description": "Section start in seconds. Send with end_sec or duration_sec."
    },
    "end_sec": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Section end in seconds. Send with start_sec."
    },
    "duration_sec": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Section length, from start_sec (or the start of the track)."
    },
    "format": {
      "type": "string",
      "enum": [
        "wav",
        "mp3"
      ],
      "default": "mp3",
      "description": "mp3 is 320 kbps; wav is lossless."
    },
    "response": {
      "type": "string",
      "enum": [
        "url",
        "file"
      ],
      "default": "url",
      "description": "A download link (201) or the file itself (200)."
    }
  }
}