Edit Pod
update_podModify an existing pod by passing only changed settings, preview the estimated cost, restart impact, and changes, then confirm to apply them.
Instructions
Change an existing pod like the console's Edit: pass only what changes. pod is the pod_name from the pods tool (its display name also works).
With confirm=false (default) it only returns the server's estimate (the changes, the hourly price before and after, and whether the pod restarts) and changes nothing; call again with confirm=true after the user agreed.
A running pod restarts with the new settings and a stopped pod uses them at its next start; renaming alone (name) doesn't restart it. Input assets and watched folders are kept.
Locked like the console: the pod type (GPU or CPU), premiums and the image can't change.
Hardware: gpu_model/gpu_vram_gb/gpu_count for GPU pods, cpu_line for CPU pods, rental_type demand or spot. Changing the GPU resets vCPU and RAM per GPU to the new GPU's recommended sizes, changing only gpu_count keeps the per-GPU ratio, and changing the CPU line resets cores and RAM to the console's default. vcpu and ram_gb are pod totals and must be sizes the console offers. An older pod may need ram_gb passed with any change.
template_id moves the pod to another template; its variables, ports and command then start from that template,
and the preview's changes list what was added before that doesn't carry over.
env sets or adds variables (secret_keys names the secret ones) and remove_env removes variables the user added. ports opens new ports, template_ports renames, renumbers or exposes/hides current ports ([{"port": 8188, "name": "ui", "new_port": 8189, "external": false}]) and remove_ports closes ports the user added. Template variables and ports can't be removed. command replaces the start command ("" = back to the template's).
Storage: volumes attaches existing network storage ([{"storage": pv_name, "mount_path": "/data"}]) or local storage on the pod's current machine; local_volumes creates new local storage like create_pod (at least 10 GiB, billed hourly until deleted); detach_storages lists pv_names to detach (the storage and its data stay). Spot pods can't have local storage, so detach it to switch to spot.
If the pod's machine can't fit the change, the call fails with node_migration_required and nothing changes. Only after the user agrees to a move, call again with allow_node_migration=true. A move permanently deletes unpreserved workspace files: when the pod has any, allow_data_loss=true is also needed, only after separate explicit consent (it is only sent together with allow_node_migration).
If the edit would leave watched folders on no attached storage, it fails with harvest_roots_orphaned and their paths; after the user agrees to remove them, pass them as drop_watched_folders.
enable_folder_saving=true adds the uploader to an older pod that has none (watched_folders shows editable false with reason no_sidecar), so its folders can be watched; it needs storage on the pod and restarts a running pod once.
max_price_per_hour refuses the edit when the new estimate is above it.
Every write requires operation_id. Reuse the ID returned by the preview, or generate a UUID before the first call. Keep it for confirmation and all retries; a new ID means a new operation. After a timeout, check operation_status and resource state before retrying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| pod | Yes | ||
| name | No | ||
| vcpu | No | ||
| ports | No | ||
| ram_gb | No | ||
| command | No | ||
| confirm | No | ||
| volumes | No | ||
| cpu_line | No | ||
| gpu_count | No | ||
| gpu_model | No | ||
| workspace | No | ||
| remove_env | No | ||
| gpu_vram_gb | No | ||
| rental_type | No | ||
| secret_keys | No | ||
| template_id | No | ||
| operation_id | No | ||
| remove_ports | No | ||
| local_volumes | No | ||
| template_ports | No | ||
| allow_data_loss | No | ||
| detach_storages | No | ||
| max_price_per_hour | No | ||
| allow_node_migration | No | ||
| drop_watched_folders | No | ||
| enable_folder_saving | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||