Stop, restart & terminate
Stop a pod to release its GPU and keep its volume, restart it to reboot the container in place, or terminate it to delete it for good.
At a glance
| Action | Endpoint | GPU | Container disk | Volume disk | Resulting status |
|---|---|---|---|---|---|
| Stop | POST /pods/{podId}/stop | Released | Wiped | Kept | EXITED |
| Start | POST /pods/{podId}/start | Re-acquired on same host | Fresh | Kept | RUNNING |
| Restart | POST /pods/{podId}/restart | Kept | Kept | Kept | RUNNING |
| Terminate | DELETE /pods/{podId} | Released | Deleted | Deleted | TERMINATED |
Stop
POST
/pods/{podId}/stopThe container receives SIGTERM and has 10 seconds to exit before SIGKILL. GPU billing stops when the pod reaches EXITED; the volume disk is then billed at $0.40 per GB per month.
curl -X POST https://api.apipods.com/v1/pods/pod_8f2k1x9q/stop \
-H "Authorization: Bearer $APIPODS_API_KEY"Start
POST
/pods/{podId}/startStarting an exited pod brings it back on the same host with the same volume disk.
curl -X POST https://api.apipods.com/v1/pods/pod_8f2k1x9q/start \
-H "Authorization: Bearer $APIPODS_API_KEY"Warning: If all GPUs on the host are in use,
start returns 503 no_capacity. Retry later, or terminate the pod and create a new one. Pods that keep their data on a network volume can be recreated on any host in the region.Restart
POST
/pods/{podId}/restartRestarts the container process in place. The GPU stays reserved, so a restart never fails for lack of capacity, and billing continues. Use it after changing files the start command reads, or to recover from a hung process.
curl -X POST https://api.apipods.com/v1/pods/pod_8f2k1x9q/restart \
-H "Authorization: Bearer $APIPODS_API_KEY"Terminate
DELETE
/pods/{podId}Deletes the pod, its container disk and its volume disk. Attached network volumes are detached and kept. This cannot be undone.
curl -X DELETE https://api.apipods.com/v1/pods/pod_8f2k1x9q \
-H "Authorization: Bearer $APIPODS_API_KEY"Automatic stops
- Process exit. When the main process exits, the pod goes to
EXITEDwithlastExitCodeset. It is not restarted. - Zero balance or spend limit. Running pods are stopped. Volumes are retained for 14 days; we email you before anything is deleted. See Billing model.
- Self-stop. Stop a pod from inside when a job finishes, using a
READ_WRITEkey stored as a secret:apipods pods stop $APIPODS_POD_ID.