{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/proteiniq-io/json-schema/proteiniq-io-file-schema.json",
  "title": "File",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/proteiniq-io-api-openapi.json#/components/schemas/File",
  "type": "object",
  "required": [
    "id",
    "object",
    "project_id",
    "filename",
    "original_name",
    "format",
    "mime_type",
    "size",
    "origin",
    "storage_owner",
    "created_at",
    "input_reference"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "const": "file"
    },
    "project_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "filename": {
      "type": "string"
    },
    "original_name": {
      "type": "string"
    },
    "format": {
      "type": "string"
    },
    "mime_type": {
      "type": "string"
    },
    "size": {
      "type": "integer"
    },
    "origin": {
      "type": "string",
      "enum": [
        "UPLOAD",
        "JOB_OUTPUT",
        "JOB_INPUT",
        "IMPORT"
      ]
    },
    "storage_owner": {
      "type": "string",
      "enum": [
        "FILE_LIBRARY",
        "JOB_ARTIFACT"
      ]
    },
    "preview_kind": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "text",
        "structure",
        "image",
        "binary",
        null
      ]
    },
    "job_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "job_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "job_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "tool": {
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "collection_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "collections": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "content_url": {
      "type": "string"
    },
    "download_url": {
      "type": "string"
    },
    "input_reference": {
      "type": "object",
      "required": [
        "type",
        "file_id"
      ],
      "properties": {
        "type": {
          "const": "file"
        },
        "file_id": {
          "type": "string"
        }
      }
    }
  }
}