Create Pod
create_podProvisions a Meshive cloud pod with a cost estimate and confirmation step, configuring GPU/CPU resources, storage, assets, ports, and environment variables.
Instructions
Create a pod. This spends the user's credit every hour while the pod runs.
With confirm=false (default) it only returns the estimate and creates nothing; call again with confirm=true
after the user explicitly agreed to the price. The pod starts asynchronously — poll the pods tool for status.
With model_set or hf_token_id the confirmed call returns only after the set's files were added, which can
take minutes.
The preview's locked_ports and open_ports list the ports the pod exposes over HTTPS, by the lock each
gets; tell the user about any open port before they agree. open_by_template are open because the template
sets them so: ask the user whether to lock them ("locked": true on their template_ports items).
Each argument's format is in its own description. workspace and template_id come from the workspaces and templates tools.
GPU pod: pass gpu_model (from the gpus tool) and optionally gpu_count/gpu_vram_gb; vCPU/RAM default to the GPU's recommended sizes.
CPU pod: omit gpu_model; cpu_line picks the CPU line (from the cpus tool; default the cheapest line that fits) and vCPU/RAM default to 8 cores / 32 GiB like the console (or the nearest sizes that line offers).
vcpu and ram_gb are totals for the pod and must be sizes the console offers. The system disk is sized by the server (shown as resources.disk_gb in the estimate).
volumes attaches existing network storage. local_volumes creates new local storage on the pod's machine, billed hourly by size until it is deleted, also while the pod is stopped and after the pod is deleted unless delete_pod lists it.
max_price_per_hour caps the compute hourly rate; existing storage you attach and Asset Hub retention are billed separately.
input_assets places Asset Hub assets in the pod. New files in the template's output folders and in watched_folders are uploaded as assets; watched_template_folders changes the template's folders and harvest_destination where the files go.
model_set adds one model set to the pod, and hf_token_id is the token a set gated on Hugging Face needs; the set's files are added before the pod is created, often several minutes.
Ports exposed over HTTPS are created locked: only workspace members signed in to the console and requests with one of the port's access keys get through, and anything else gets 401. lock_public_ports=false (or "locked": false on a port) creates them open to anyone who knows the URL: only when the user explicitly asks for that. One exception: a template port whose template sets it open is created open; the preview lists it as open_by_template and says how to lock 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"template_id": "<template_id>"
},
"name": "create_pod"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Environment variables; template variables the template leaves blank need a value, except a Hugging Face token (HF_TOKEN): it's only needed for gated or private repos or Hub uploads and is left out when blank, so don't ask for one to run a public model. `secret_keys` names the secret ones. | |
| name | Yes | ||
| vcpu | No | vCPUs for the whole pod, one of the sizes the console offers. | |
| ports | No | Opens new ports: a list like [8888, {"port": 6006, "name": "tb", "external": false}]. A port is exposed over HTTPS unless "external" is false, and an exposed port is locked unless its item says "locked": false (open to anyone who knows the URL; only when the user explicitly asks). Don't repeat ports or port names the template already has. | |
| ram_gb | No | RAM for the whole pod in GiB, one of the sizes the console offers. | |
| region | No | Accepted for compatibility and ignored. | |
| command | No | Overrides the start command (at most 32,000 characters). | |
| confirm | No | ||
| volumes | No | Attaches EXISTING network (nfs) storage from the storages tool: [{"storage": pv_name, "mount_path": "/data"}]. A display name works on estimates/previews; confirm with the returned ids. Existing local storage can't be attached to a new pod. | |
| cpu_line | No | CPU pods only: a `cpu_line` value from the cpus tool. Default: the cheapest line that fits. | |
| gpu_count | No | ||
| gpu_model | No | GPU model from the gpus tool. Omit it for a CPU pod. | |
| model_set | No | Adds one model set to the pod: a `slug` from the model_sets tool for this template (only templates whose list is `selectable`; one set per pod). Its files are added as input assets before the pod is created, so creating takes longer, often several minutes. The estimate shows the set as `model_set` with its file count, size and minimum GPU memory. If a file can't be added, no pod is created (model_set_unavailable) and the files already added are reused next time. | |
| workspace | No | Workspace id from the workspaces tool (a label also works). | |
| cpu_premium | No | ||
| gpu_vram_gb | No | ||
| hf_token_id | No | For Quick Deploy templates whose model set is gated on Hugging Face (the model_sets tool shows `hf_token_required` and `gated_sources`): the id of a workspace token from the source_credentials tool whose Hugging Face account accepted the model's license. The set's files download with that token, so the user must first accept the license on the page in `gated_sources` with the same Hugging Face account. Like `model_set`, a confirmed create with it returns only after the files were linked, which can take minutes. | |
| rental_type | No | demand | |
| secret_keys | No | Names of the `env` variables that are secret. | |
| template_id | Yes | Template id from the templates tool. | |
| input_assets | No | Places Asset Hub assets in the pod: ["asset_id" or {"asset": id, "target_dir": "/workspace/models", "role": role, "paths": ["sub/folder/"], "strip_prefix": ""}] (default place /inputs/<asset name> or the template's path for that role); "paths" picks some files or folders, copied from the asset's file list exactly as written there, and "strip_prefix": "" keeps their folder structure (left out, the folder they share is stripped). Only these keys are accepted. They add an input volume billed by size. | |
| operation_id | No | ||
| local_volumes | No | Creates NEW local storage on the pod's machine together with the pod: [{"name": "scratch", "mount_path": "/scratch", "size_gb": 50}] with optional "encrypted", "usage_warning" and "usage_warning_threshold" (0-1). Each needs at least 10 GiB and spot pods can't have one. It is billed hourly by size until it is deleted, also while the pod is stopped and after the pod is deleted unless delete_pod lists it; the estimate includes it as `breakdown.local_storage`. | |
| template_ports | No | Changes the ports the template opens, like the console's deploy screen: [{"port": 8188, "name": "ui", "new_port": 8189, "external": false}], where `port` is the template's port and "name" (rename), "new_port" (renumber), "external" (true = exposed over HTTPS, false = internal only) and "locked" (for an exposed port: true = locked, also when the template sets that port open; false = open to anyone who knows the URL, only when the user explicitly asks) are optional. Template ports can't be removed; use `ports` to open new ones. | |
| uptime_premium | No | ||
| watched_folders | No | Uploads new files in these folders as assets: ["/workspace/results" or {"path": p, "include": ["*.png"], "include_existing": false, "enabled": true}] (the template's own output folders are watched already). It works on templates without an output folder too (for example NIM or vLLM), as long as the pod has storage the folders sit in (`volumes` or `local_volumes`). | |
| internet_premium | No | ||
| lock_public_ports | No | Leave it true (the default): the ports the pod exposes over HTTPS are created locked, so only workspace members signed in to the console and requests that carry one of the port's access keys get through. The one exception is a template port that its template sets open: it stays open unless its `template_ports` item says "locked": true (the preview lists such ports as `open_by_template`). false creates every exposed port open to anyone who knows the URL: pass it only when the user explicitly asked for open ports. "locked" on a port's item in `ports` or `template_ports` decides for that port alone. | |
| max_price_per_hour | No | Checked against the estimate (compute plus new local_volumes) before creating, and caps the final COMPUTE hourly rate at placement; an over-cap placement fails asynchronously. Existing storage you attach and Asset Hub retention are billed separately and excluded from this cap. | |
| harvest_destination | No | {"mode": "user_s3", "credential_id": n} sends the uploaded files to the user's bucket instead of managed storage. | |
| watched_template_folders | No | Changes the template's output folders from the start, like the console's create screen: {"/outputs": {"enabled": false}} turns one off, {"/outputs": {"include": ["*.png"]}} uploads only matching files, and {"/workspace/output": {"path": "/workspace/results"}} moves an output folder (its $MESHIVE_OUTPUT_DIR and storage follow; output folders only). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||