https://compute.x402layer.cc/pods/v1
Who can use it
Only the pod’s owner: signed in to the dashboard, or with a compute API key that has thepods:control:write scope. A pod’s own key (the one the agent holds) is always refused, so an agent cannot get a shell on itself through the platform. A key without the scope gets 403 with details.required_scope.
Run a command
- Commands run as the unprivileged
poduser in/opt/pod/workspace, with a clean environment (no agent secrets). timeout_secondsis 1 to 300, default 60. A command that runs out of time returnstimed_out: true.commandis up to 20,000 characters. Output is capped at 1 MB per stream;truncated: truetells you it was cut.
Read and write files
managed: true.
Open a port
Start a server on the pod (for example withexec), then publish it:
https://compute.x402layer.cc/pods/port/<id>/ that proxies HTTP to 127.0.0.1:8080 on the pod.
- Save the URL now. It is shown only once. Opening the same port again gives a new URL and retires the old one.
- Private ports (
"visibility": "private") also return a token, shown once. Callers must send it in thex-pod-port-tokenheader. - Ports 1024 to 65535 can be opened, except ones the platform uses on the pod (8642, 8787 and 18780 to 18799).
- Up to 5 open ports per pod. Each proxied request can carry up to 5 MB and must finish within 30 seconds.
Clone a pod
A clone is a new pod, billed exactly like creating one, that restores the source pod’s latest Agent Vault backup once it is online.- The source pod needs at least one completed backup. Turn on backups in its Backups tab or with
PATCH /pods/{id}/backups. Idempotency-Keyis required, as on create, so a retry never charges twice.- Copied: engine, tier, managed model, template, custom instructions and identity, heartbeat settings, capabilities.
- Not copied: channel tokens (pass
channelsto set them), a BYOK key (passaiif the source uses its own key), the vanity slug, wallet, keys, webhooks and ports. - The restore runs once the new pod is online, usually 5 to 10 minutes. Check it with
GET /pods/{id}/cloneon the new pod.
Good to know
- Right after a pod first shows
online, file and exec calls can return409(“the pod is offline”) for about a minute while it finishes starting. Retry after a short wait. - Rate limits per account: exec 120 per minute, files 240 per minute, opening and closing ports 30 per minute.
