{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rendley-com/json-schema/rendley-com-types-upload-input-schema.json",
  "title": "types.UploadInput",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rendley-com-openapi.json#/components/schemas/types.UploadInput",
  "properties": {
    "duration": {
      "type": "number"
    },
    "file_hash": {
      "description": "FileHash is the client-computed content hash (XXH3-64, 16 hex chars).\nOptional for API keys.",
      "maxLength": 64,
      "type": "string"
    },
    "file_size": {
      "type": "integer"
    },
    "media_id": {
      "description": "MediaId is the client-chosen media id (a UUID). Optional for API keys.",
      "maxLength": 128,
      "type": "string"
    },
    "metadata": {
      "type": "string"
    },
    "mime_type": {
      "maxLength": 100,
      "type": "string"
    },
    "original_file_name": {
      "maxLength": 255,
      "type": "string"
    },
    "project_id": {
      "type": "string"
    },
    "role": {
      "description": "Role is the sync-lifecycle tag: \"library\" (reconciled by the editor's\nhash sync), \"pending\" (awaiting auto-injection into the library;\ninvisible to the sync), \"staged\" (agent/AI workflow file; invisible to\nthe sync AND not auto-injected — adopted to library only when\nexplicitly referenced) or \"transient\" (never a library asset).\nDefaults to \"library\"; \"pending\" when Source is \"mcp\"; \"staged\" for\nAPI-key requests (so opening the project in the editor never reaps an\nAPI-uploaded file before it is referenced).",
      "enum": [
        "library",
        "pending",
        "staged",
        "transient"
      ],
      "type": "string"
    },
    "source": {
      "description": "Source is provenance: which flow created the upload.",
      "enum": [
        "editor",
        "mcp",
        "agent",
        "export",
        "ai",
        "duplicate"
      ],
      "type": "string"
    }
  },
  "type": "object"
}