{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pipeshub/json-schema/pipeshub-embedding-download-progress-payload-schema.json",
  "title": "EmbeddingDownloadProgressPayload",
  "description": "Status snapshot for a single model's load/download, proxied from the\nembedding server's `DownloadStatus.to_dict()`.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pipeshub-ai-models-providers-api-openapi.yml#/components/schemas/EmbeddingDownloadProgressPayload",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "model",
    "status",
    "progress",
    "downloaded_bytes",
    "total_bytes",
    "error"
  ],
  "properties": {
    "model": {
      "type": "string",
      "description": "Model repo id this snapshot refers to."
    },
    "status": {
      "$ref": "#/$defs/EmbeddingDownloadStatus"
    },
    "progress": {
      "type": "number",
      "format": "float",
      "description": "Percent complete (0-100), rounded to 1 decimal place. Capped at\n99 while downloading — 100 is only reported once the load is\nfully `ready`. Stays 0 when the Hub size lookup failed and no\nbytes have been measured on disk yet.\n"
    },
    "downloaded_bytes": {
      "type": "integer",
      "description": "Bytes currently on disk for this repo's HuggingFace cache blobs,\nincluding in-progress `.incomplete` files.\n"
    },
    "total_bytes": {
      "type": "integer",
      "description": "Best-effort expected total size in bytes from the Hub metadata\nAPI. `0` when the lookup failed (offline, private/gated repo) or\nno download has been tracked for this model.\n"
    },
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Failure detail when `status` is `failed`; `null` otherwise."
    },
    "started_at": {
      "type": "number",
      "format": "float",
      "description": "Unix timestamp (seconds) when this load/download attempt\nstarted. Omitted from the synthesized `ready`/`not_found`\nsnapshot that `GET .../download-progress` returns when no\n`DownloadStatus` has ever been tracked for the model.\n"
    },
    "updated_at": {
      "type": "number",
      "format": "float",
      "description": "Unix timestamp (seconds) of the last status update. Same\nomission rule as `started_at`.\n"
    }
  },
  "$defs": {
    "EmbeddingDownloadStatus": {
      "type": "string",
      "description": "Lifecycle state of a model load/download on the embedding server.\nTransitions: `checking` -> `downloading` -> `loading` -> `ready`, or\n-> `failed` from any state. `not_found` is only returned by\n`GET .../download-progress` when no download has ever been tracked\nfor the model and it is not currently loaded.\n",
      "enum": [
        "checking",
        "downloading",
        "loading",
        "ready",
        "failed",
        "not_found"
      ]
    }
  }
}