# Python SDK: Resource Models

> Typed dataclasses for core Meshive resources — WhoAmI, ApiKey, Credit, Workspace, Member, Pod, Storage, Metrics, Transaction, Catalog, Template, Serving, ServingModel, Task, and Asset.

Source: https://docs.meshive.ai/sdk-cli/sdk/models/

Responses are parsed into lightweight dataclasses. Frequently used scalar fields are typed; deeply nested structures aren't enumerated — the **full original payload is preserved on `.raw`**, so the SDK keeps working even when the backend adds fields. See [Operation & Host Models](/sdk-cli/sdk/models-operations/) for estimate/write responses, port locks, model sets, logs, activity, and host machine models.

## `WhoAmI`

| Field | Type | Notes |
| --- | --- | --- |
| `email` | `str` | |
| `username` | `str \| None` | |
| `user_role` | `str` | |
| `raw` | `dict` | Full payload. |

## `ApiKey`, `Credit`, `CreditHistoryEntry`

- `ApiKey`: `key_id`, `name`, `prefix` (`meshive_a1b2c3d4` — the secret is never returned), `scopes`, `status`, `created_at`, `last_used_at`, `expires_at`. From 1.11, `is_current` is `True` for the key the client is using (`None` from a server that doesn't say), and the property `expired` says a listed key is past `expires_at` and no longer works.
- `Credit`: `balance`, `auto_recharge`, `auto_recharge_threshold`, `auto_recharge_amount`, `has_default_payment_method`. `paid_balance` and `bonus_balance` are kept for compatibility — free credit was retired, so `paid_balance` equals `balance` and `bonus_balance` is always 0.
- `CreditHistoryEntry`: `entry_id`, `amount` (negative for refunds and chargebacks), `is_paid`, `payment_method` (for example `credit_card`, `auto_recharge`, `refund`, `chargeback`, `chargeback_reversal`, `referral_reward`), `created_at`. Stripe receipt and invoice links are not exposed to the SDK.

## `Workspace`

| Field | Type | Notes |
| --- | --- | --- |
| `namespace_name` | `str` | **ID** — pass to `list_pods` / `get_pod`. |
| `workspace_name` | `str` | Display label. |
| `description` | `str` | |
| `member_count` | `int` | |
| `status` | `str` | `running` when the workspace is ready for pods and tasks. A workspace you just created isn't until it gets there — see `wait_for_workspace`. |
| `price_per_hour` | `str` | |
| `resources` | `WorkspaceResources` | `.pod`, `.storage`, `.serverless` counts. Includes stopped pods and paused deployments. |
| `member_role` | `str \| None` | Your role here: `admin`, `billing` or `viewer`. A `viewer` key gets `403` on every change. |
| `created_at` / `updated_at` | `datetime \| None` | |
| `raw` | `dict` | Full payload. |

To count only what a workspace is actually running, read `ws.raw["activeResources"]` — same three keys, but pods you stopped and deployments you paused are left out. A typed field will follow in a later SDK release.

## `WorkspaceDetail`

| Field | Type | Notes |
| --- | --- | --- |
| `namespace_name` / `workspace_name` | `str` | ID / display label. |
| `price_per_hour` | `str` | What the workspace is being billed right now. |
| `weekly_avg_daily_cost` | `str` | Average daily cost over the last 7 days. |
| `gpus` / `vcpus` | `int` | Totals across the workspace's pods. |
| `ram` / `total_storage` | `int` / `float` | In MiB (divide by 1024 for GiB). |
| `resources` | `list[ResourceCondition]` | One per type (`pod`, `storage`, `serverless`) with `.active`, `.paused`, `.disabled`. |
| `costs` | `list[DailyCost]` | Recent daily costs (`.date`, `.pod`, `.storage`, `.serverless`, `.task`, `.asset`, `.total`). For the workspace's whole history, use `get_workspace_billing`. |
| `maintenance` | `list[WorkspaceMaintenance]` | (1.11) Hosts' maintenance windows that touch the workspace's pods and volumes, once per resource: `id`, `resource_name`, `user_alias`, `reason`, `description`, `start_time`, `end_time`, `is_start`, `status` (`upcoming`, `overdue`, `in_progress` or `expired`; finished windows are not listed), and `machine_id` and `is_emergency` (`None` from servers that don't send them). While one is in progress the resource may be unreachable and isn't billed. |
| `host_messages` | `list[WorkspaceMessage]` | (1.11) Messages between the workspace and its hosts: `id`, `machine_id`, `direction` (`in` from the host, `out` from the workspace), `title`, `content`, `is_read`, `created_at`, `related_pods`, `related_pvs`. Reply with `message_host`; mark read with `mark_workspace_messages_read`. |
| `raw` | `dict` | Full payload. |

## `Member`

`user` (email), `role` (`admin` / `billing` / `viewer`), `joined_at`, `raw`.

## `Pod`

| Field | Type | Notes |
| --- | --- | --- |
| `pod_name` | `str` | **ID** — pass to `get_pod`. |
| `namespace_name` | `str` | Owning workspace ID. |
| `user_alias` | `str` | Display label. |
| `status` | `str` | |
| `rental_type` | `str` | `spot` / `demand`. |
| `price_per_hour` | `str` | |
| `storage_rate_per_hour` | `str` | Storage rate, separate from compute. |
| `has_unpreserved_workspace` | `bool \| None` | Whether a node move may lose workspace files. `None` means unknown; do not assume preservation. |
| `is_maintenance` | `bool` | `True` while the resource's host machine has an open maintenance window — the resource isn't billed then. |
| `created_at` | `datetime \| None` | |
| `endpoints` | `list[PodEndpoint]` | The pod's URLs, as on the console's Connect tab: `name`, `port`, `port_type`, `external_url`, `internal_url`, `is_external`, `readiness` (`ready` / `preparing` / `interrupted`), and from 1.10 `locked`, `access` (`internal` / `locked` / `unlocked`), `access_key_count` (keys that work now), `allow_preflight` (whether [preflight requests](/documentation/endpoint-access-controls/#web-pages-on-other-sites-allow-preflight) reach the app without a key; `None` for an internal port) and `lock_decided_at` (`None` if nobody has chosen locked or unlocked for the port — the console's orange notice). See [Locked ports and access keys](/sdk-cli/sdk/storage-files/#locked-ports-and-access-keys). |
| `connect_credentials` | `list[ConnectCredential]` | The logins the console shows on Connect, such as the `ACCESS_PASSWORD` a ComfyUI pod generates: `key`, `value`, `is_secret`, `is_auto_generated`. `value` is left out of `repr`; don't log it. A read-only API key gets `***` for secret values; a key with write scope gets them. |
| `billing_active` | `bool \| None` | Whether compute is being billed now. `False` while the host machine has an open maintenance window. A stopped pod's storage is billed separately. |
| `stop_reason_code` / `stop_reason_detail` / `stop_reason_at` | | Why a stopped pod stopped. `None` or `user` is a normal stop; anything else means the system stopped it. |
| `same_node_unavailable_reason` | `str \| None` | Why a stopped or waiting pod can't start on its original machine now: `spec_mismatch` (refused — start it with `any_node` or `wait_any_node`), `hardware_changed`, `node_unavailable`, `requirement_unmet`, `capacity`. |
| `can_restart_on_same_node` / `can_restart_on_any_node` | `bool \| None` | Computed for stopped pods. |
| `waiting_mode` | `str \| None` | `same_node` or `any_node` while the pod is waiting. |
| `container_running_at` | `datetime \| None` | When the container started running. |
| `cpu_premium` / `uptime_premium` / `internet_premium` | `bool \| None` | Premium options the pod was placed with. |
| `is_downloader` | `bool \| None` | A system pod that downloads assets. It is free and can't be stopped or deleted. |
| `creation_failure_reason` | `str \| None` | Why creating the pod failed, when the platform cleaned it up for that reason. Such a pod ends as `terminated`, like a deleted one; this tells them apart. |
| `raw` | `dict` | Full payload — machine, template, request, linked storages, … |

Optional fields are `None` when the server did not send them — read that as unknown, not `False`.

## `Storage`

| Field | Type | Notes |
| --- | --- | --- |
| `pv_name` | `str` | **ID** — pass to `get_storage`. |
| `namespace_name` / `user_alias` | `str` | Owning workspace / display label. |
| `storage_type` | `str` | `nfs`, `hostPath`, … |
| `status` | `str` | |
| `total_size` / `available_size` | `float` | In MiB. |
| `usage_rate` | `float` | `0.0`–`1.0`. |
| `price_per_hour` | `str` | |
| `linked_pods` | `list[str]` | Names of the pods it is mounted in. |
| `is_maintenance` | `bool` | `True` while the resource's host machine has an open maintenance window — the resource isn't billed then. |
| `encrypted` | `bool` | |
| `usage_warning` / `usage_warning_threshold` | `bool` / `float` | (1.11) Whether the usage-warning email is on, and at what fraction full. |
| `maintenance_start` / `maintenance_end` / `upcoming_maintenance` | `datetime \| None` / `list[MaintenanceWindowInfo]` | (1.11) The open window on the volume's machine, and the windows to come (`start_time`, `end_time`, `started`, `reason`, `description`). |
| `location` | `str \| None` | (1.11) Where the volume's machine is. |
| `downloader_state` / `downloader_restarts` | `str \| None` / `list[StorageAccessRestart]` | (1.11) The state of the access pod that serves the volume's files (`running`, `creating`, `error`, `unavailable` or `missing`; `None` from servers that don't send it) and its recent restarts, newest first (`id`, `reason`, `message`, `occurred_at`). |
| `created_at` | `datetime \| None` | |
| `raw` | `dict` | Full payload — host machine, … |

## `PodMetrics` and `MachineMetrics`

Both expose `cpu_cores`, `cpu_usage_rate`, `ram_size`, `ram_usage_rate`, and `gpus` — a list of `GpuUsage` with `gpu_number`, `core_usage_rate`, `vram_usage_rate`, `vram_size` (MiB) and `temp`. `ram_size` is in MiB for a pod but in bytes for a machine (the machine's total memory). Rates are `0.0`–`1.0`. Every `GpuUsage` field except `gpu_number` is `None` when that particular measurement is unavailable — a GPU that has stopped responding often still reports its temperature while its memory readings drop out, so check each field rather than assuming a GPU is either fully readable or absent. `PodMetrics` adds `ephemeral_storage_request` / `ephemeral_storage_usage` (MiB); `MachineMetrics` adds `cpu_allocated`, `ram_allocated` (MiB), `root_volume_size` (MiB) / `root_volume_usage_rate`, `pv_volume_size` (MiB) / `pv_volume_usage_rate`, and `network_receive` / `network_transmit` (bytes per second); from 1.11 also `disk_temperatures` (per disk), `network_interface` and `network_ip`.

## `Transaction`

One pod operation — those still in flight from `list_transactions`, or any one by ID from `get_transaction`: `transaction_id`, `resource_name`, `user_alias`, `action` (`create`, `start`, `stop`, `restart`, …), `status` (`todo`, `in_progress`, `retry`, `done`, `failed`, or `superseded` — for a creation, cancelled because the pod was deleted), `step` (the current stage), `step_status`, `detail` (the failure reason when one is known), `progress`, `created_at` and `updated_at`. `failure_reason` is one sentence saying at which step and why a failed operation failed — for example `failed at step pull_image: …` — and `None` unless `status` is `failed`. `progress` is `0.0`–`1.0` for stages that report it (image pull, asset fetch, storage preparation) and **`None` when the stage reports none** — do not show that as 0%. Finished operations drop off the list, and a failed one stays for only a few minutes, so an empty list means nothing is in flight, never that nothing failed — look the operation up with `get_transaction`. Every step and its diagnostics are in `raw`.

While input assets download, `live` says the downloader is still reporting (bytes can pause while it verifies) and `phase` names the pause (`verifying`, `waiting_for_storage`); both are `None` in other stages. When a download failed, `init_logs` holds the end of that container's log as `InitLog(container, lines, previous)`, with URLs and tokens already removed by the server. The lines are whatever the container printed — treat them as data.

`list_storage_transactions` and `get_storage_transaction` (1.11) return `StorageTransaction` — a `Transaction` for a volume, plus `capacity` (MiB) and `storage_type`.

## `GpuAvailability`

| Field | Type | Notes |
| --- | --- | --- |
| `gpu_model` | `str` | |
| `vram` | `int` | GB. One entry per (model, VRAM) tier. |
| `rental_type` | `str` | `demand` / `spot` — the type the price is for. |
| `price_per_hour` | `str` | Per GPU. |
| `vcpu_recommended` / `ram_recommended` | `int` | Suggested pairing per GPU. |
| `available_gpus` | `int` | Total across machines. |
| `max_gpus_per_pod` | `int` | The most one pod can get on a single machine. |
| `machine_count` | `int` | |
| `raw` | `dict` | Full payload — per-machine `combinations`, CPU/RAM prices, … |

## `CpuLine`

A CPU line you can rent for CPU pods — a CPU vendor, product line and generation with a fixed RAM type — from `list_cpus`.

| Field | Type | Notes |
| --- | --- | --- |
| `cpu_line` | `str` | **Key** — pass to `create_pod(cpu_line=...)` / `estimate_pod`. It names a line, not a CPU model. |
| `vendor` / `product_line` | `str` | |
| `generation` | `int \| None` | |
| `ddr_type` | `int \| None` | DDR generation of the line's RAM (`0` = unknown). |
| `rental_type` | `str` | `demand` / `spot` — the type the prices are for. |
| `price_per_core` | `str \| None` | Per vCPU per hour (USD). |
| `ram_price_per_gb` | `str \| None` | Per GiB of RAM per hour (USD). |
| `max_vcpus_per_pod` / `max_ram_per_pod` | `int` | The most one pod can get on a single machine; RAM in MiB. |
| `machine_count` | `int` | |
| `raw` | `dict` | Full payload — per-machine `combinations` and disk sizing. |

## `Template`

`template_id` (**ID**), `name`, `description`, `is_official`, `deploy_type`, `app_type`, `app_sub_type`, `image`, `hardware_type`, `cuda_version`, `framework`, `framework_version`, `raw`.

From 1.11 the template's spec is typed too:

| Field | Type | Notes |
| --- | --- | --- |
| `envs` | `list[TemplateEnv]` | `key`, `value`, `secret`, `auto_generated`, `from_image`, `show_on_connect`, `masked`. A secret's value is never returned: `value` is `None` and the property `value_set` says one is stored. |
| `ports` | `list[TemplatePort]` | `port`, `name`, `external`, `connect`, `locked` (the author's default lock; `None` when the author didn't choose), `template_port_id`. |
| `volume_mounts` | `list[TemplateVolumeMount]` | `name`, `mount_path`. |
| `semantic_paths` | `list[TemplateSemanticPath]` | `role`, `path`, `expect`, `include`, `required`, `cardinality`, `placement` — the folders where input assets of each role go. |
| `command` / `command_argv` / `args` | `str` / `list[str]` / `list[str]` | The start command. |
| `volume_required` | `bool` | |
| `registry_login` | `RegistryLogin \| None` | The saved login a private image is pulled with (`registry_login_id`, `label`, `server`, `username`; never the password). |

`create_template` and `update_template` return a `TemplateSaved`: a `Template` plus `workspace`, `action`, `removed_envs`, `removed_ports` and `replayed`. `inspect_image` returns an `ImageConfig`: `env`, `entrypoint`, `cmd`, `exposed_ports`, `volumes`, `working_dir` — values from whoever built the image.

## `Serving`

`serving_id` (**ID**), `namespace_name`, `model_name`, `api_model_id`, `framework`, `status`, `paused`, `min_replicas` / `max_replicas` / `current_replicas` / `healthy_replicas`, `autoscale`, `price_cap_per_hour` (`None` = unlimited), `endpoint_url`, `price_per_hour`, `billing_active`, `raw`. `scale_raises_cost(min_replicas=, max_replicas=, autoscale=, price_cap_per_hour=)` returns whether such a `scale_serving` call can raise the hourly cost.

From 1.11:

| Field | Notes |
| --- | --- |
| `replicas` | `list[ServingReplica]`: `replica_index`, `status`, `setup_step` / `stage` / `step` / `step_status` (the property `current_stage` picks the label the console shows), `price_per_hour`, `billing_active`, `gpu_model`, `gpu_count`, `vram_gb`, model download progress (`download_percent`, `download_used_bytes`, `download_expected_bytes`), live `metrics` (`ServingReplicaMetrics`: `concurrency`, `reachable`, `gpu_util`, `kv_cache_usage`, `queue`, `tokens_per_s`, `ttft_ms`), and `pod_name` — set for a replica whose log `get_pod_logs` reads — or `log_replica_id` for one read with `get_serving_replica_logs`. `replica(index)` picks one. |
| `metrics` | `ServingMetrics`: `throughput`, `latency_p95_ms`, `concurrent`, `error_rate`, `queue_depth`, `in_flight`, `gpu_util`. |
| `failure` (and `ServingReplica.failure`) | `ServingFailure`: why the deployment or a replica failed — `oom_kind` (`vram` or `ram`), `reason`, `failed_step` and `failed_step_detail` (replicas only), `containers`, `events` and `init_logs` (the model download log). A read-only property over `.raw`, not a dataclass field, because it can hold the program's own output: `repr()` and serializers built on `dataclasses.fields()` don't carry it. `has_failure` is `True` when the serving or any replica has one. |
| `failed_replica` / `stopped_replicas` | `ServingStoppedReplica` (`replica_index`, `pod_name`, `stopped_at`): the replica whose last run can still be read: a failed deployment's last failed replica, and a paused serving's replicas. `get_pod_logs(pod_name, workspace)` reads it; the ended run is in its `previous`. |
| `registration_id`, `model_retiring`, `is_official` | The registered model, and whether it is being retired or is an official one. |
| `endpoint_type`, `modality`, `input_modalities` | What the serving takes and returns. |
| `output_bucket_id` / `output_bucket_label` | Where an image or video serving stores its outputs (`None` = Meshive storage). |
| `share_idle_capacity`, `sharing_state` (`None`, `pending` or `ready`), `shared_earned_this_month` (USD) | [Idle-capacity sharing](/sdk-cli/sdk/write-methods/#sharing-idle-capacity). `sharing_needs_consent(share_idle_capacity)` says whether a change turns it on. |
| `scale_up_blocked`, `scale_up_block_reason`, `scale_up_desired` | Whether scaling up is held back, why (`capacity` or `price_cap`) and to how many replicas it wanted to go. |
| `cap_migration` | `CapMigration(replaced, total)`: after the per-replica price cap was lowered, how many of the replicas over the new cap were replaced. |

## `ServingModel`, `ModelDetection`

`ServingModel` (from `list_models` and `list_official_models`) — `registration_id`, `name`, `huggingface_repo`, `api_model_id`, `framework`, `context_length`, …; from 1.11 also `modality`, `input_modalities`, `is_official`, `workspace`, `endpoint_type`, `recommended_context_length`, `display_vram_gb`, the image and video limits (`supported_sizes`, `supported_resolutions`, `native_num_frames`, `native_fps`), and the properties `takes_image` and `can_share_idle_capacity` (an official text model served with vLLM).

`ModelDetection` (from `detect_model`) gains `engine`, `weight_formats`, `has_config` and `fit` in 1.11 — `ModelFit(weight_gib, kv_bytes_per_token, context_length)`, the weights' size, the KV cache per token and the largest context. `asset_serve_facts` answers the same for an asset with an `AssetServeFacts` (`ready`, `architecture`, `file_size_bytes`, `weight_formats`, `has_config`, `status`, `engine`, `output`, `fit`).

## `Task`

`task_id` (**ID**, `task_…`), `name`, `namespace_name`, `status`, `pod_name`, `image`, `gpu_model`, `gpu_count`, `cpu_cores`, `ram_gb`, `price_per_hour`, `cost_so_far`, `total_cost`, `created_at`, `container_running_at`, `finished_at`, `failure_reason`, `exit_code`, `raw`. For `get_task` the payload also carries the script, requirements, environment (secret values masked) and the compute/disk cost breakdown.

Also `failed_asset_id` (the input asset a failed download stopped on), `input_assets` (`get_task` only — `TaskInputAsset(asset_id, name, target_dir, reference_mode, ingest_source)`, from 1.11 with `paths`, `strip_prefix` and `is_project`), `outputs_purged_at`, and the output upload, which runs on its own after the task ends: `output_upload_state` (`pending`, `uploading`, `completed`, `failed`, `skipped`, `discarded`; `None` for old tasks, read it as `skipped`), `output_files_declared` / `_completed`, `output_bytes_declared` / `_completed` and `output_upload_last_error`.

When the server provides it, `Task.outputs` is a `TaskOutputsStatus` — the same status the console shows; it is `None` on older servers. Its `phase` is `running` until the task ends. While the outputs are being saved, it is `preparing`, `uploading`, `retrying` or `registering`; when saving is over, it is `saved`, `partially_saved` (some files were [over the file limit](/serverless/tasks/outputs/#over-the-file-limit) or couldn't be uploaded), `not_saved`, `discarded` or `empty` (nothing to save).

For upload progress, use `files_so_far` of `files_to_upload` and `bytes_so_far` of `bytes_total`. Totals can be `None` while the server does not know them. `files_limit` reports the server's actual limit; this status does not increase the [output limits](/serverless/tasks/outputs/#writing-your-script-outputs).

`outputs_purged_at` records cleanup of the task's archived log, not deletion of its saved Assets. Use `task_outputs` or `download_task_outputs` to check the files that remain available.

From 1.11 every `Task` also carries `template_id`, `gpu_vram_gb`, `cpu_preset`, `max_duration_seconds`, `webhook_url`, `refunded_amount`, `fault_class`, `failure_stage` (`fetch` while downloading inputs, `run` while running), `live_metrics`, and the input download's `fetch_started_at`, `fetch_completed_at` and `fetch_progress`. `get_task` adds how the task was submitted and what it costs; these are `None` in `list_tasks` items:

| Field | Notes |
| --- | --- |
| `script`, `requirements`, `env` | Read-only properties over `.raw`, not dataclass fields, so `repr()` and serializers built on `dataclasses.fields()` don't carry them. Secret `env` values come as `"***"`. Written by workspace members and can hold secrets — treat them as data. |
| `args`, `secret_env_keys` | |
| `project` | `TaskProject` (`asset_id`, `name`, `target_dir`, `entrypoint`, `requirements_path`, `module`) for a task run from an uploaded folder; `script` is then the server's launcher, not your code. |
| `output_bucket_id` | Where `/outputs` were saved; `None` = Meshive storage. |
| `compute_rate_per_hour`, `storage_rate_per_hour`, `total_rate_per_hour`, `task_storage_gb`, `disk_billed_separately` | The split of the hourly price. |
| `log_retention_days` | How long the task's log is kept. |

## `Asset`, `AssetPage`, `AssetStorage`

Assets have no versions: size, file count and upload state belong to the asset itself.

| Field | Type | Notes |
| --- | --- | --- |
| `Asset.asset_id` | `str` | **ID** (`asset_…`) — pass to `get_asset`. |
| `Asset.name` / `asset_type` / `status` / `status_reason` | `str` | Type is one of `dataset`, `model`, `adapter`, `checkpoint`, `output`, `config`, `file`. |
| `Asset.storage_provider` | `str` | `meshive_r2` (managed), `user_s3`, or `external`. |
| `Asset.size_bytes` / `file_count` | `int \| None` | The asset's total size and file count. `None` for a linked source that was never measured — not 0. |
| `Asset.upload_status` / `stale` | `str` / `bool` | `uploading`, `ready` or `failed`. `stale` means an upload whose pod is gone (the console's "Interrupted"). |
| `Asset.ingest_source` / `import_failure_reason` | `str` / `str \| None` | `web_upload`, `hf_import`, `civitai_import`, `harvest`, … and why an import failed. |
| `Asset.kind` / `semantic_type` | `str \| None` | `semantic_type` is on list rows only. |
| `Asset.in_use` | `bool` | Whether a pod or task currently uses it. |
| `Asset.files` | `list[AssetFile]` | (`get_asset` only) `path`, `size_bytes`, `status`, `file_id`, `content_hash`, `created_at`; from 1.11 also `ext`, `file_type`, `media_kind`, `detected_format`, `pickle_flag` and `format_unverified` (no extension, so the format could not be checked). |
| `Asset.active_usage_contexts` | `list[AssetUsage]` | (`get_asset` only) Where it is in use: `kind`, `identifier`, `name`, `status`, `role`. |
| `Asset.from_catalog` | `bool` | (1.11) Added on its own by a model set or catalog import; `list_assets` hides these unless `include_catalog=True`. |
| `Asset.pickle_flag` / `has_unverified_format` | `str \| None` / `bool` | (1.11) `detected` or `suspected` when a file is a pickle, which **can run code when it is loaded**; whether a file without an extension couldn't be checked. |
| `Asset.weight_formats` / `has_root_config` / `child_type_summary` | | (1.11) What the asset holds: weight file formats, whether a config sits at its top level, and the file count per file type. `None` when not known. |
| `Asset.source` | `AssetSource \| None` | (1.11) Where it came from: `ingest_source`, the Hugging Face `hf_repo`, `hf_revision` and pinned `resolved_commit`, the CivitAI or download `url` (without its query string), the pod it was saved from (`pod_name`, `pod_label`, `pod_path`), or the asset it was copied out of (`from_asset_id`, also for files copied out of a linked bucket folder). |
| `Asset.reference` | `AssetReference \| None` | (1.11) For an asset that points at its source instead of holding copies: `mode` (`prefix` for a whole bucket folder, `external` for a Hugging Face or CivitAI source), `prefix`, `credential_label`, `credential_status`, `size_notice`. For a bucket folder, `credential_label` and `credential_status` name its bucket connection (as `bucket_label` and `bucket_status` do); for a Hugging Face or CivitAI source, the saved token (`ok`, `missing` or `not_required`). |
| `Asset.bucket_id` / `bucket_label` / `bucket_status` | `int \| None` / `str \| None` / `str \| None` | (1.11) For an asset in your own bucket (registered files or a linked folder), the bucket connection it reads through: its `credential_id` from `list_storage_credentials`, its label, and `ok`, or `removed` once that connection was removed (a removed connection's label carries a mark such as `(removed #31)`; `bucket_id` and `bucket_label` can then be `None`). All `None` for an asset in Meshive storage. Also on `list_assets` rows. |
| `Asset.active_upload` | `AssetActiveUpload \| None` | (1.11) An upload into the asset that is still running: `purpose`, `file_count`, `total_bytes`, `created_at`. |
| `AssetPage` | | `items`, `total`, `page`, `page_size`, `pages`; iterable. From 1.11, `catalog_hidden` (page 1) counts the catalog-added assets left out. |
| `AssetStorage` | | `managed_bytes`, `price_per_gb_month`, `estimated_monthly_cost`, `credit_state` (`normal` / `grace` / `blocked`), `credit_blocked`, `blocks_at`, `purge_deadline_at`, `paid_balance_available` (whether the workspace's billing account has credit — pods and tasks can't start without it). |

`Asset.version_count`, `latest_version` and `versions` (and the `AssetVersion` model) are deprecated: assets no longer have versions. They still work but raise a `DeprecationWarning`, and they will be removed in 2.0. The `version` of a task's `input_assets` item is ignored.

> **Tip — Reach for .raw:**
> The typed fields cover the common cases. For anything else — a pod's machine assignment, for example — read it from `.raw`, which is the exact JSON the API returned. Against an older server, fields it doesn't send keep their defaults.
