{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audivo-dev/json-schema/audivo-dev-create-upload-request-schema.json",
  "title": "CreateUploadRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audivo-dev-uploads-api-openapi.yml#/components/schemas/CreateUploadRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "sha256",
    "bytes",
    "content_type",
    "declared_duration_seconds"
  ],
  "properties": {
    "sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "The file's SHA-256, lowercase hex. The PUT is signed against it."
    },
    "bytes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5368709120,
      "description": "The file's exact length; the PUT must carry the same `Content-Length`."
    },
    "content_type": {
      "$ref": "#/$defs/UploadContentType"
    },
    "declared_duration_seconds": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 36000,
      "description": "What the quote is priced from. A job whose audio runs past the ceiling this reserves fails as `processing_failed`, with a message naming the declared-duration ceiling, and releases the reservation."
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300,
      "description": "How the entry is labelled; the private show is always \"Uploads\"."
    }
  },
  "$defs": {
    "UploadContentType": {
      "type": "string",
      "enum": [
        "audio/mpeg",
        "audio/mp3",
        "audio/mp4",
        "audio/m4a",
        "audio/x-m4a",
        "audio/aac",
        "audio/x-aac",
        "audio/ogg",
        "audio/opus",
        "audio/flac",
        "audio/x-flac",
        "audio/wav",
        "audio/x-wav",
        "audio/webm"
      ]
    }
  }
}