# Python SDK: Operation & Host Models

> Typed dataclasses for write responses, estimates, port locks, access keys, storage connections, pod assets, asset files, connected buckets, serverless, account and pod history results, model sets, logs, activity logs, hosted machines, and fan curves.

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

Typed return dataclasses for estimates, write confirmations, locked ports, model sets, pod assets, asset files and connected buckets, serverless and account results, logs, API key activity, and hosted machines. The models marked 1.11 need SDK 1.11 or later. See [Resource Models](/sdk-cli/sdk/models/) for core account, workspace, pod, storage, catalog, serverless, and asset models.

## `WorkspaceEstimate`, `WorkspaceCreated`

`WorkspaceEstimate` — `name` (`None` when one will be generated), `price_per_hour` (str, USD; `"0"`, as a workspace costs nothing by itself), `note`. `WorkspaceCreated` — `workspace` (the new workspace's ID, the `namespace_name` that every other method takes), `name` (the display name, the generated one if you gave none), `transaction_id`, `estimate` (`WorkspaceEstimate`). Both keep the full response on `raw`.

## `WorkspaceUpdateEstimate`, `WorkspaceUpdated`, `WorkspaceDeleteCheck`

`WorkspaceUpdateEstimate` — `workspace` (the workspace's ID, which a rename doesn't change), `current_name` and `name` (the new name). `WorkspaceUpdated` — `workspace` and `name`, the name the server confirmed. `WorkspaceDeleteCheck` — `workspace`, `name`, `deletable` (`bool | None`: only `True` means the workspace can be deleted, so test it with `if check.deletable`) and `blockers` (`dict[str, int]`: each kind of thing still in the workspace and how many; empty when it can be deleted — see [Deleting a workspace](/sdk-cli/sdk/workspaces/#deleting-a-workspace)). All three keep the full response on `raw`.

## `PodEstimate`, `PodCreated`, `ResourceAction`

`PodEstimate` — `price_per_hour` (str, USD), `breakdown` (dict: `gpu`, `cpu_extra`, `ram_extra`, premiums, and `local_storage` for new `local_volumes`), `resources` (dict: `gpu_model`, `vram_gb`, `gpu_count`, `vcpu`, `ram_gb`, `disk_gb`, `rental_type`, for GPU pods the included `vcpu_included`/`ram_gb_included`, and for CPU pods `cpu_model`, the CPU line), `availability` (dict), `template` (dict), `volumes` (attached storage, plus each new local volume with `"new": True`, `name` and `size_gb`), `note`, and `model_set` — with a model set, a dict with its `slug`, `name`, `file_count`, `total_size_bytes`, `min_vram_gb` and `min_vram_estimated` (`None` without one).

`PodCreated` — `name`, `workspace`, `transaction_id` (pass it to `wait_for_new_pod` or `get_transaction`), `estimate` (`PodEstimate`), `pod_name` (`None` right after creation; find the pod by `user_alias`). From 1.10 both carry `port_locks` — each public port and the lock it is created with; pass `PodCreated.port_locks` to `wait_for_new_pod`.

`ResourceAction` — returned by every stop/start/restart/delete/scale/pause call: `resource` (`pod`/`storage`/`serving`/`task`/`workspace`), `id`, `action`, `workspace`, `accepted`, `result` (the server's transaction id or message), and for `start_pod` `placement` — the placement used, which the server picks when you leave it out (`None` for other calls).

## `PodUpdateEstimate`, `PodUpdated`

`PodUpdateEstimate` — `pod_name`, `name`, `changes` (each change in words), `restarts` (whether a running pod restarts to apply them), `price_per_hour` (after the change), `current_price_per_hour` (now), `breakdown`, `resources` and `volumes` (as in `PodEstimate`), `note`. `PodUpdated` — `pod_name`, `workspace`, `accepted`, `transaction_id` (follow it with `get_transaction`; `None` for a rename alone), `renamed_only`, `estimate`. From 1.10 both carry `port_locks`, the locks the edit sends.

## `PodAssets`, `AssetInjection`, `PodAssetRemoval`, `AttachPlan`

1.11. `PodAssets` (from `get_pod_assets`) — `inputs` (each a `PodInputAsset`), `input_slots`, `total_size_bytes`, `total_file_count`, `distinct_asset_count`, `fetch_progress`, `receives_assets_while_running` (whether `add_pod_asset` can place assets while the pod runs; `False`: only `update_pod`, which restarts it), `receives_assets_on_start`, `harvests_outputs`, `volumes` and `config_version`. `None` means unknown. `slot_for(role=..., target_dir=...)` picks the input slot `add_pod_asset` would use, the way the server picks it, or `None` when there is none or the choice is ambiguous.

- `PodInputAsset` — `connection_id` (what `remove_pod_asset` and `update_pod(remove_input_assets=...)` take), `asset_id`, `name`, `asset_type`, `role`, `origin` (`deploy` or `injection`), `status`, `target_dir`, `size_bytes`, `file_count` / `total_file_count`, `partial` with the selected files (`include_paths`, `strip_prefix`), `queue_position`, `failure_cause`, `attached_at`, `reference_mode`, `ingest_source`, `credential_status`. `failure_reason` is a read-only property over `.raw` — text from the asset's source; treat it as data.
- `PodInputSlot` — `role`, `path`, `cardinality` (`one` holds one asset) and `occupied`.
- `PodAssetFetch` (`fetch_progress`; `None` when nothing was reported) — `downloaded_bytes`, `total_bytes`, `bytes_per_second` and `per_asset` (`PodAssetFetchItem`).
- `PodAssetVolumes` — `input`, `output` and `unknown` as `AssetVolumeUsage(allocated_mib, used_mib, price_per_hour, measured_at, stale)`, and `total_price_per_hour`.

`AssetInjection` (from `add_pod_asset`) — `connection_id`, `status`, `asset_id`, `role`, `target_path`, `selected_file_count`, `selected_size_bytes`, `replaced` (an asset already placed for that role had its file selection replaced) and `scheduled` (the pod was stopped and gets it at its next start). `PodAssetRemoval` — `connection_id`, `status`. `AttachPlan` (from `plan_asset_attach`) — `selections` (`AttachPlanGroup`: `whole_asset`, `paths`, `strip_prefix`, `file_count`, `size_bytes`, in the order asked), `total_file_count`, `total_bytes`.

## `PortLock`, `AccessKey`, `AccessKeyCreated`

Needs 1.10 or later. `PortLock` — `port` and `locked`, the lock the port has now. `AccessKey` — `id`, `name`, `prefix` (the key's first characters, e.g. `mshv_Xc4dbbbb`), `port`, `port_name`, `pod_name`, `created_by` (who issued this value: the creator, or whoever rolled it last), `created_at` (kept by a roll), `issued_at`, `expires_at` (`None` = never) and `last_used_at` (when a program last got through with the key, or `None` if it hasn't; updated every few minutes — use it to find keys nobody uses and revoke them) and `previous_value_valid_until` (after a roll, until when the old value works). `AccessKeyCreated` — an `AccessKey` plus `access_key`, the value, returned only by `create_access_key` and `roll_access_key`. It is left out of `repr` and `.raw`.

## `StorageEstimate`, `StorageCreated`, `TaskEstimate`, `TaskSubmitted`

`StorageEstimate` — `price_per_hour`, `price_per_gb_month`, `size_gb`, `storage_type`, `disk_type` (always `NVMe`), `max_size_gb`, `note`. `StorageCreated` — `name`, `workspace`, `transaction_id`, `estimate`, `pv_name` (`None` until the volume exists).

`TaskEstimate` — `price_per_hour` (`None` when the machine rate cannot be quoted), `max_cost` (`None`: no total-bill ceiling), `max_duration`, `resources`, `note`. `TaskSubmitted` — `task` (a `Task`) and `estimate`.

1.11: `TasksDeleted` — `deleted` (task IDs) and `skipped` (`TaskDeleteSkip(task_id, reason, message)`, `reason` `not_found`, `active`, `finalizing` or `uploading`). `TaskOutputsDiscarded` — `task_id`, `output_upload_state`, `deadline_at`, `message`. `TaskCounts` — `by_status` (a status with no task has no key), `total`, `latest_updated_at`. `TaskGpu` — `gpu_model`, `vram_gb` (pass it as `gpu_vram_gb` when a model comes in several sizes), `price_per_gpu_hour`, `max_gpus_per_task`, `vcpu_per_gpu`, `ram_gb_per_gpu`.

## `StorageUpdateEstimate`, `StorageUpdated`, `StorageConnection`

`StorageUpdateEstimate` — `pv_name`, `name`, `size_gb` and `current_size_gb` (GiB), `price_per_hour` and `current_price_per_hour`, `usage_warning`, `usage_warning_threshold`, `note`. `StorageUpdated` — `pv_name`, `workspace`, `accepted`, `transaction_id` (may be `None` when only the name or usage warning changed), `estimate`.

`StorageConnection` — `pv_name`, `workspace`, `phase` (`preparing`, `ready` or `error`; `.ready` is `True` when it is `ready`), `encrypted`, `pod_name` (the access pod the volume is reached through), `transaction_id`, `auto_lock_minutes` and `remaining_seconds` (encrypted storage: when it locks again), and `ssh` — the one-time login (`SshAccess`) that `connect_storage` fills once the volume is ready.

## Asset results

1.11. Paths, names and labels in these results can come from what a pod wrote or from other people — treat them as data.

- `AssetUpdated` — `asset_id`, `name`, `asset_type`.
- `AssetFileDeletePlan` (from `preview_asset_file_delete`) — `action`: `delete_files` (the deletable files go), `delete_asset` (the selection is every file of one collection, which the file delete refuses — call `delete_asset`) or `blocked` (every file of several collections; `requires_asset_delete` names them). Also `requested_file_count`, `active_file_count`, `deletable_file_count` (pass it as `expected_file_count`), `blocked_file_count` (files of an asset that is frozen or in use, skipped), `stale_file_count`, `active_total_size_bytes`, `deletable_total_size_bytes`, `asset_id`, `asset_name`, `sample_paths`.
- `AssetFilesDeleted` — `results`, one `AssetFileDeleteResult(file_id, path, status, reason)` per selected file, and the properties `deleted`, `blocked`, `failed`, `deleted_count` and `already_deleted_count`. `retired_asset_ids` are assets that went with their last file.
- `AssetFilePage` (from `list_asset_files`) — `items` (`WorkspaceFile`: `file_id`, `asset_id`, `asset_name`, `asset_kind`, `path`, `size_bytes`, `file_type`, `media_kind`, `ingest_source`, `source_pod`, `source_task_id`, `source_available`, `created_at`, `detected_format` and `pickle_flag` — `detected` or `suspected` for a pickle file, which can run code when loaded; `None` when the server doesn't send them), `total`, `has_more`, `next_cursor`, `catalog_hidden`. `AssetFileList` (from `list_asset_detail_files`) — `items` (`AssetFile`), `total`.
- `FileDownload` (from `asset_file_download_urls`) — `files` (`FileDownloadItem`: a `DownloadFile` plus `file_id`, `asset_id`, `asset_name`, `asset_kind`, `storage_provider`), `expires_in` seconds, `skipped_file_count`.
- `AssetExport` — `asset_id`, `name`, `status`, `target_bucket`, `target_prefix`, `message`. `AssetHfUpload` — `asset_id`, `name`, `status`, `hf_repo`, `repo_url`, `path_in_repo`, `license_notice`, `message`. Both run in the background; nothing reports when they finish.
- `FileUploadBatch` (from `start_asset_file_upload`) — `upload_batch_id`, `upload_token`, `asset_id`, `expires_at`, `presign_expires_in` and `files` (`BatchUploadTarget`: `file_id`, `relative_path`, `size_bytes`, `mode` `single` or `multipart`, `url`, `part_size_bytes`, `part_count`). The token and links are left out of `repr()` and `.raw`; treat them as credentials. `FilesAdded` — `asset_id`, `added_file_count`, `added_size_bytes`, `total_file_count`, `total_size_bytes`, `files` (`AddedFile(file_id, path)`), `upload_batch_id`.
- `OpenAssetCatalog` (from `list_open_assets`) — `categories`, `entries` (`OpenAssetEntry`: `slug`, `name`, `category`, `family`, `description`, `source`, `size_bytes`, `file_count`, `default_role`, `license`, `license_url`, `hf_gated`, `existing_asset_id`) and `model_sets` (`ModelSet`). `OpenAssetImport` — `results` (`OpenAssetImportRow`: `slug`, `status`, `error`, `error_title`, `default_role`, `asset_id`, `name`, `asset_type`) and the properties `imported` and `failed`.
- `ComfyLayout` (from `get_comfy_layout`) — `enabled`, `reason`, `groups` (`ComfyLayoutGroup(path, role, file_count, size_bytes)`).

## Buckets and saved credentials

1.11. None of these carry a bucket's keys, a token or a password.

- `StorageCredential` — `credential_id`, `label`, `provider`, `bucket`, `region`, `default_prefix`, `verified_at` (the property `verified`), `created_at`, `deleted_at`.
- `AssetStorageSetting` — `credential_id`, `provider`, `label`, `bucket`; the property `managed` is `True` for Meshive storage. `replayed` is set on a replayed call.
- `BucketListing` (from `browse_bucket` and `browse_reference_objects`) — `credential_id`, `bucket`, `prefix`, `delimiter`, `folders`, `objects` (`BucketObject`: `key`, `size_bytes`, `last_modified`, `ext`, and `relative_path` inside a reference asset), `next_continuation_token`, `is_truncated`, and for a reference asset `asset_id` and `sub_prefix`.
- `BucketAssetRegistered` — `asset_id`, `name`, `status`, `storage_provider`, `file_count`, `total_bytes`, `reference_mode` and `prefix` (set by `register_bucket_prefix`), `size_measured` and `size_notice`. With `size_measured=False` (too many objects to count) the counts are 0 and mean unknown.
- `SubsetPreview` — `asset_id`, `prefix`, `matched_count`, `total_bytes`, `fetchable` (`False` when nothing matches or the selection is over the server's limits; `limit_notice` says which), `truncated` (the listing stopped early — narrow the patterns), `scanned_count`, `sample_paths`, `max_objects`, `max_total_bytes`. `AssetSubsetCopy` — `asset_id` (the new asset), `name`, `status`, `source_asset_id`, `file_count`, `total_bytes`, `ingest_source`.
- `CredentialUsage` — `asset_id`, `name`, `active_pod_count`. `RegistryLoginUsage` — `registry_login_id`, `templates` (`RegistryLoginTemplate(template_id, name)`), `active_pod_count`, `active_task_count`.
- `StorageCredentialDeleteCheck` — `credential_id`, `label`, `bucket`, `asset_count`, `file_count`, `total_tracked_bytes`, `is_workspace_default`, `running_pods`, `running_tasks`.

## Serverless results

1.11.

- `ModelAvailability` (from `get_model_availability`) — `status` (`available`, `unavailable` or `error` — the check failed, which is not the same as nothing being free), `deployable`, `cheapest_gpu`, `vram_gb`, `price_per_hour`, `price_low` / `price_high` (USD per replica-hour across the available candidates), `suggested_cap_per_hour` (a `price_cap_per_hour` to start from), `required_vram_gb`, `required_host_ram_gb` and `gpu_candidates` (`GpuCandidate`: `gpu_label`, `vram_gb`, `price_per_hour`, `available`, `compatible`, `incompatible_reason`). `within_cap(cap)` returns the available candidates at or under a per-replica cap, cheapest first.
- `SharedModelList` (from `list_shared_models`) — `items` and `base_url`. `SharedModel` — `registration_id`, `name`, `api_model_id`, `modality`, `context_length`, `price_per_1m_input_tokens`, `price_per_1m_output_tokens`, `availability` (`available`, `degraded` — busy, may answer slowly or with `429` — or `unavailable`), `host_tier_min` / `host_tier_max`; the property `model` (`shared/<api_model_id>`) is the `model` name to send.
- `InferenceRequest` — `request_id`, `workspace`, `requested_by`, `inference_key_id`, `registration_id`, `modality`, `status`, `priority`, `processing_mode`, `rental_preference`, `output_bucket`, `output_object_key`, `storage_provider`, `error_code`, `queued_at`, `started_at`, `completed_at`, `expires_at`, `download_urls` (`get_inference_request` only). `error_message` is a read-only property over `.raw` (it comes from the model or the engine); `cancelable` is `True` for a queued request.
- `WebhookEndpoint` — `webhook_id`, `workspace`, `url` (kept whole, left out of `repr()` — a Slack or Discord URL is a secret), `label`, `enabled` (an endpoint that kept failing is turned off, with `disabled_reason`), `event_types`, `consecutive_failures`, `created_at`, `updated_at`; the properties `platform` (`slack`, `discord` or `generic`) and `signed` (a generic endpoint's events carry a signature made with the workspace's signing secret — see [Verifying the signature](/serverless/webhooks/#verifying-the-signature)).
- `WebhookDelivery` — `delivery_id`, `event_id`, `event_type`, `request_id`, `webhook_id` (`None` once the endpoint was deleted), `url`, `platform`, `delivered`, `attempt_count`, `status_code`, `created_at`, `delivered_at`. `last_error` (what the receiving server answered) and `request_body` (the JSON that was sent) are read-only properties over `.raw` — treat them as data. `WebhookEventType` — `type`, `description`, `sample_payload`. `WebhookTestResult` — `delivered`, `status_code`, `platform`, `signed`, `sample_payload`, and `error` as a property over `.raw`.
- `InferenceKey` — `key_id`, `name`, `workspace`, `status` (it doesn't reflect expiry — compare `expires_at` with now), `rate_limit_rpm`, `rate_limit_tpd`, `created_at`, `expires_at` (`None` = never), `created_by`, `is_mine`, `creator_is_member` (whether the creator is still a member; `None` from a server that doesn't say). `InferenceKeyCreated` — an `InferenceKey` plus `inference_key`, the value, returned only by `create_inference_key` and `roll_inference_key` and left out of `repr()` and `.raw`.

## Pod history

1.11. `PodHistoryPage` (from `get_pod_history`) — `items`, `total`, `limit`, `offset`. `PodHistoryEvent` — `id`, `event_type`, `pod_name`, `timestamp`, `user_alias`. A `system_event` is a container exit the system detected: `state`, `reason` (`OOMKilled`, `Error`, `CrashLoopBackOff`, `ImagePullBackOff`, …), `exit_code`, `duration_seconds` (how long that run lasted), `oom_kind` (`ram` or `vram`), and `cause` and `summary`, a fixed classification. A `user_action` is an action taken on the pod: `action` (`create`, `stop`, `start`, `restart`, `reallocate` — moved to another machine), `action_status` (`done` or `failed`) and, for a failed one, `action_log`. `message` is a property over `.raw`: what the container printed, so treat it as data.

`PodTimeline` (from `get_pod_timeline`) — `pod_name`, `segments` (`PodTimelineSegment(state, reason, started_at, finished_at, duration_seconds)`, oldest first), `total_running_seconds`, `total_waiting_seconds`, `total_terminated_seconds`. `PodAlert` (from `list_pod_alerts`) — `id`, `pod_name`, `user_alias`, `workspace`, `container_name`, `state`, `reason`, `exit_code`, `signal`, `started_at`, `finished_at`, `created_at`, `is_read`, `oom_kind`, `cause`, `summary`, and `message` as in `PodHistoryEvent`.

## Workspace, account and notice results

1.11. Amounts in `WorkspaceBilling`, `SharedEarnings` and `Referral` are `Decimal` (USD), `None` when the server didn't send them — except `WorkspaceBilling.history`, whose `DailyCost` rows are floats, as in `WorkspaceDetail.costs`.

- `Invite` — `invite_id`, `user` (email), `role`, `invited_at`, `is_read`, `accepted`. `MemberRemovalCheck` — `user`, `role`, `removable`, `reason` when it isn't (one of `meshive.MEMBER_REMOVAL_REASONS`: `self`, `only_admin` — make another member admin first, `billing_owner` — the billing owner transfers billing ownership first, or `not_member`), `inference_key_count`, `port_access_key_count`.
- `WorkspaceBilling` — `workspace`, `name`, `billing_user` (the billing owner's email), `price_per_hour`, `weekly_avg_daily_cost`, `history` (`DailyCost` per day for the workspace's whole life, oldest first), `serverless_shared_this_month` (this month's spend on other workspaces' shared models) and `shared_credited_this_month` (what sharing this workspace's servings credited this month).
- `SharedEarnings` — `accruals` (`SharedAccrual`: `accrual_id`, `period`, `gross`, `amount`, `status`, `credited_at`, `created_at`, newest first) and `models` (`SharedEarningModel`: `registration_id`, `model_name`, `gross`, `input_tokens`, `output_tokens`, `request_count`).
- `Referral` — `referral_code`, `referral_link`, `total_referred`, `total_earned` (net of rewards taken back after a refund), `reward_percent` and `reward_cap` (the reward rule per referred person). `EmailPreferences` — `product_updates`, `opted_in_at`, `opted_out_at`. `AccountUpdated` — `email`, `username`, `user_role`.
- `MessageToHostSent` — `workspace`, `pod_name`, `message_ids`. `WorkspaceMessagesRead` — `workspace`, `marked`.
- `PlatformNotice` — `notice_id`, `title`, `summary`, `status` (`scheduled`, `in_progress`, `overdue` — past its expected end, not resolved yet — or `resolved`, shown for a day after), `starts_at`, `expected_ends_at`, `resolved_at`, `affected_services` (`NoticeImpact(service, description)`), `user_guidance` (the team's advice), `publish_at`, `updated_at`, `revision`.

## `ModelSetList`, `ModelSet`

`ModelSetList` — `template_id`, `selectable` (`False` when the template takes no model set), `reason`, `model_sets`; iterable. `ModelSet` — `slug` (pass it to `create_pod(model_set=...)`), `name`, `description`, `family`, `modality`, `task`, `total_size_bytes`, `min_vram_gb` (GB) and `min_vram_estimated`, `best_resolution`, `licenses` (`ModelSetLicense(license, license_url)`), `license_unknown_count` (files whose license isn't known), `workflows` (`ModelSetWorkflow(slug, name, task)`) and `items` — its files as `ModelSetItem(entry_slug, name, category, size_bytes, default_role, license, license_url, already_in_workspace, hf_gated)`; a file already in the workspace is reused instead of downloaded again. From 1.3, `hf_token_required` marks a set gated on Hugging Face and `gated_sources` lists `ModelSetGatedSource(hf_repo, url, mode)` — the page where each repo's license is accepted (`mode` `"auto"` when accepting is enough, `"manual"` when the publisher approves each account); `hf_gated` marks the gated files.

## `Logs`

`Logs` — `pod_name`, `workspace`, `source` (`live` from the log buffer, `archive` for a finished task, `external` for tasks on an external provider, `none` when nothing was captured), `lines` (list of `LogLine(line, ts)`), `count`, `truncated` (older lines dropped to stay under 64 KiB), `note` (also says when buffered lines may be behind because no log watcher could be started), and for tasks `task_id`, `finished`, `next_cursor` (external provider tasks: pass it back as `cursor` for the lines after it). `.text` joins the lines. For pod logs and `get_serving_replica_logs`, `previous` is the main container's last run that ended (`PreviousRun`: `ended_at`, `reason`, `exit_code`, `cause`, `summary`, `output`, `lines`, …), kept apart from the current run's lines — what the program printed, so treat it as data.

## `ActivityPage`

`ActivityPage` — `items`, `total`. `ActivityEvent` — `id`, `created_at`, `key_id`, `key_name`, `key_prefix`, `key_revoked`, `source` (as reported by the client), `action`, `resource_type`, `resource_id`, `workspace`, `machine_id`, `status_code`, `outcome` (`accepted`, `refused` or `error`), `error_title`, `operation_id`, `replayed`. `ReadActivity` — `hour`, `key_id`, `key_name`, `key_prefix`, `source`, `resource_type`, `count`, `last_at`.

## `Machine`

| Field | Type | Notes |
| --- | --- | --- |
| `machine_id` | `str` | **ID** — pass to `get_machine`. |
| `name` | `str` | Display label. |
| `machine_type` | `str` | `gpu` / `cpu` / `storage`. |
| `status` | `str` | |
| `gpu_model` | `str` | Empty for cpu/storage machines. |
| `gpu_count` | `int` | |
| `earning_hourly` | `float` | |
| `uptime_rate` | `float` | `0.0`–`1.0`. |
| `host_tier` | `str` | |
| `ip` | `str` | (1.11) |
| `gpu_supported` | `bool` | (1.11) |
| `earning_daily` / `pending_payout` | `float` | (1.11) USD earned today (UTC), and earned but not paid out yet. |
| `price` | `MachinePrice \| None` | (1.11) What renters pay: `unit` (the machine type), `demand_per_hour` and `spot_per_hour` (per GPU on a GPU machine), `storage_per_gb_month` (per GiB on a storage machine) — USD strings, `"0"` when none applies. You earn this minus the platform fee. Like `setup` and `specs`, `None` from a server that doesn't send it. |
| `setup` | `MachineSetupState \| None` | (1.11) Where the machine is in its life cycle: `state`, `stage` (an install step, `LISTING`, `UNLISTING`, …), `stage_state` (`READY`, `PROCESSING`, `FAILED` or `COMPLETED`; `retry_machine_setup` retries a `FAILED` stage), `setup_step` of `total_setup_steps`, `log` (the agent's message — text the machine reported), `node_ready`, `machine_ready`, `system_components_ready`, `updated_at`, `grace_ends_at`, `pending_reverify_reason`. |
| `specs` | `MachineSpecs \| None` | (1.11) The hardware as the agent reported it: CPU (`cpu`, `cpu_cores`, `cpu_threads`), RAM (`ram_mib`, `ram_type` — the DDR generation, `ram_speed`), `motherboard`, `gpu`, `gpu_count`, `nvlink_capable`, `gpu_slots` (`MachineGpuSlot`: PCIe slot, lanes and version, NVLink), `disks` (`MachineDisk`: name, path, type, size in MiB, benchmark speeds, temperature, power-on hours, life left, test result), `rentable_disk_mib` / `rentable_disk_available_mib`, internet speeds in bits per second (`internet_link_mbps` in Mbit/s) and `allocatable_cpu` / `allocatable_ram_mib`. |
| `raw` | `dict` | Full payload — pod uses, … |

## `MachineDetail`

`MachineDetail` extends `Machine` with `clients` (`pods` and `storages` other users run on the machine), `unread_messages`, `platform_fee`, `promotional_fee_until`, `schedules`, `boot_report`, `network_warnings` and `disk_warnings`. Each disk warning is a dict with `kind` (`stall` — the disk stopped responding and the machine was unlisted, `slow` — slow writes while lightly loaded, or `full` — the system disk `/` is almost full), `device`, `since`, `value` (seconds without progress, ms per write, or percent used) and `threshold` (the alert level); see [Disk health alerts](/host/machine-states/#disk-health-alerts). `disk_warnings` is in releases after 1.10, and is empty when the server doesn't send it. In a `list_machines()` result, `Machine.unread_messages` is the number of renter messages you haven't read.

From 1.11, `MachineDetail` also has:

- `network_status` (`NetworkStatus`) — the netplan setup the agent found (`netplan_kind`, `netplan_state`), whether automatic fixes are on (`autofix_enabled`) or were stopped (`autofix_killed`), `default_route_interfaces`, `interfaces` (`NetworkInterface`: `name`, `mac`, `driver`, `carrier` (link), `speed_mbps`, `duplex`, the supported, advertised and partner maximum speeds, `missing_modes`, `default_route`, `link_flaps_1h`), `warnings` (the same items as `network_warnings`), `events` — recent automatic fixes as `NetworkEvent(at, action, result, interface)`, whose `detail` is a read-only property over `.raw` — and `reported_at`.
- `disk_health` (`DiskHealth`, `None` when disk monitoring isn't on) — `checked_at`, `root_usage_percent` (how full the system disk is), the alert thresholds `slow_threshold_ms` and `full_threshold_percent`, `disks` (`DiskHealthDisk(device, state, idle_write_ms)`) and `issues` (`DiskHealthIssue`: `kind`, `device`, `since`, `value`, `threshold`, `gone`, `resolved_at`; the property `active`), recovering stalls included. `disk_warnings` still lists active issues only.

## Host results

`MaintenanceWindow` — `id`, `machine_id`, `reason`, `description`, `start_time`, `end_time`, `ended_at`, `extend_count`, `is_emergency`, `is_start`, `is_done`, `status`. `MaintenanceAction` — `maintenance_id`, `machine_id`, `action` (`schedule`, `edit`, `extend`, `end`, `cancel`), `accepted`, `window`. `MaintenanceEstimate` — `notice_hours`, `affected_workspaces`, `uptime_effect`, `billing`.

`ListingCheck` — `listed`, `listable`, `title`, `reason`. `ListingResult` — `listed`, `accepted`. `RetryResult` — `check` (`setup` or `ports`), `accepted`, `message`. `MachineDeleteCheck` — `mode` (`grace_period` or `immediate`), `already_deleting`, `pod_count`, `serving_replica_count`, `pv_count`, `workspace_count`, `pending_maintenance_count`, `grace_hours`. `MachineDeleted` — `mode`, `grace_ends_at`, `pod_count`, `pv_count`, `cancelled_maintenance_count`, `accepted`.

`HostMessage` — `id`, `machine_id`, `workspace`, `direction`, `title`, `content`, `is_read`, `created_at`, `related_pods`, `related_pvs` (every pod and volume the workspace has had on the machine, so they can be long on a busy machine). `MessageSent` — `to`, `message_ids`. `MessagesRead` — `marked`. `DowntimeEvent` — `timestamp`, `event`, `detail`. `StressTestResult` — `stage`, `status`, `started_at`, `expected_duration_seconds`, `log`, `metrics`.

`MachineCredentials` — `kind` plus one of `ssh` (`host`, `port`, `username`, `password`, `command`, `is_verified`), `ipmi` (`username`, `password`, `status`) or `grafana` (`url`, `username`, `password`). `InstallCommand` — `agent_type`, `command`, `expires_at`. `PayoutAccount` — `has_account`, `is_fully_onboarded`, `account_status`, `pending_amount`, `minimum_payout`, `currency`. `Payout` — `amount`, `is_paid`, `settle_date`, `paid_date`, `payment_method`.

## `Earnings`

`current_hourly`, `daily`, `accumulated_until_payout`, and `history` — a list of `DailyEarning` (`date`, `cpu`, `gpu`, `storage`, `total`), newest first.

## `FanCurve`, `FanStatus`

1.11. Points are `(temperature_c, fan_percent)` tuples. `FanCurve` (from `get_fan_curve`) — `machine_id`, `mode` (`default`, `custom` or `driver`), `effective_points` (the curve the machine follows; `[]` in driver mode), `custom_points` (the last custom curve saved, kept while another mode is on; `None` if there never was one), `default_points` (Meshive's default curve), `revision` (goes up with every save; 0 = never saved), `updated_at` and `limits` (`FanCurveLimits`: `min_points`, `max_points`, `min_temperature`, `max_temperature`, `max_full_speed_temperature` — the rules a custom curve must keep). `FanCurveEstimate` adds `agent_reachable`, `current_mode` and `current_effective_points`. `FanCurveUpdate` adds `applied` and `apply_error`: when the machine can't take the curve now, it is still saved and the machine picks it up within about 5 minutes or when it reconnects.

`FanStatus` (from `get_fan_status`) — `state` (the fan controller's state on the machine: `ok`, `no_gpu`, `nvml_unavailable`, `agent_outdated` or `error`), `mode`, `revision` and `gpus` (`FanStatusGpu`: `index`, `name`, `temperature_c`, `fan_count`, `min_fan`, `max_fan`, `controlled`, `applied_percent`, `fans` as `FanStatusFan(index, speed, target, policy)`). `error` (on both) is a read-only property over `.raw` — text the machine reported.

> **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.
