Docs / SDKs & tools

CLI

apipods is a single static binary for macOS, Linux and Windows. It wraps the REST API and adds a few conveniences, like building and deploying worker images. Current version: 1.15.2.

Install

$ brew install apipods/tap/apipods
Terminal
$ apipods version
apipods 1.15.2 (darwin/arm64)

Log in & configure

apipods login opens the console in your browser and stores a new READ_WRITE key in ~/.config/apipods/config.toml. On servers and in CI, pass a key instead or set APIPODS_API_KEY, which always takes precedence.

Terminal
$ apipods login
$ apipods login --api-key "$APIPODS_API_KEY"   # non-interactive
$ apipods config set region eu-nl-1          # default region for new resources
$ apipods config set org org_5w2k8m3q         # if you belong to several organizations
$ apipods config list

Default regions: eu-nl-1, eu-de-1, eu-se-1, us-va-1, us-tx-2, us-ca-1, ca-qc-1. Every command accepts --output json for scripting and --yes to skip confirmations.

Pods

Terminal
$ apipods gpus list --region eu-nl-1
$ apipods pods create --name train --gpu H100_SXM --count 1 \
    --image apipods/pytorch:2.9.0-py3.12-cuda12.8.1 \
    --container-disk 50 --volume 200 \
    --port 8888/http --port 22/tcp --env HF_TOKEN='{{ secrets.HF_TOKEN }}'
$ apipods pods list
$ apipods pods get pod_8f2k1x9q --wait
$ apipods pods ssh pod_8f2k1x9q
$ apipods pods update pod_8f2k1x9q --env WANDB_PROJECT=llama
$ apipods pods stop pod_8f2k1x9q
$ apipods pods start pod_8f2k1x9q
$ apipods pods restart pod_8f2k1x9q
$ apipods pods terminate pod_8f2k1x9q
FlagJSON fieldExample
--gpugpuTypeIdH100_SXM or NVIDIA_H100_80GB_SXM
--countgpuCount1
--imageimageapipods/pytorch:2.9.0-py3.12-cuda12.8.1
--regionregionIdeu-nl-1
--container-diskcontainerDiskInGb50
--volumevolumeInGb200
--volume-pathvolumeMountPath/workspace
--network-volumenetworkVolumeIdvol_c7d2h4ke
--portports8888/http
--envenvKEY=VALUE
--templatetemplateIdtpl_2w7q9k4x

Serverless

apipods endpoints deploy builds the Dockerfile in a folder with your local Docker, pushes the image to registry.apipods.com/<org>/<name> and creates or updates the endpoint described in apipods.toml.

Terminal
$ apipods endpoints deploy ./worker
$ apipods endpoints create --name sdxl-turbo --image ghcr.io/acme/sdxl-worker:1.4.0 \
    --gpu-pool L40S --gpu-pool L4 --max-workers 5
$ apipods endpoints list
$ apipods endpoints update ep_4n8wq2zt --max-workers 10
$ apipods jobs run ep_4n8wq2zt --input '{"prompt": "a lighthouse"}' --sync
$ apipods jobs status ep_4n8wq2zt job_3x9wq2mt
$ apipods jobs cancel ep_4n8wq2zt job_3x9wq2mt
$ apipods endpoints delete ep_4n8wq2zt

Logs

apipods logs takes a pod or endpoint ID and streams container output.

Terminal
$ apipods logs pod_8f2k1x9q --follow
$ apipods logs ep_4n8wq2zt --worker wrk_8q3m2x9k --since 1h
$ apipods logs pod_8f2k1x9q --since 1h > pod.log

Storage & account

Terminal
$ apipods volumes create --name checkpoints --size 1000 --region eu-nl-1 --tier performance
$ apipods volumes list
$ apipods volumes resize vol_c7d2h4ke --size 1500
$ apipods volumes delete vol_c7d2h4ke

$ apipods secrets set HF_TOKEN
$ apipods ssh-keys add ~/.ssh/id_ed25519.pub
$ apipods templates create --name pytorch-jupyter --type pod --visibility team --image apipods/pytorch:2.9.0-py3.12-cuda12.8.1
$ apipods api-keys create --name ci --scope read_write --expires 90d

$ apipods billing usage --period this-month
$ apipods billing spend-limit set --monthly 2000 --low-balance 100

Command reference

CommandSubcommands
loginAuthenticate and store a key
configset, get, list
podslist, get, create, update, start, stop, restart, terminate, ssh
endpointslist, get, create, update, deploy, delete
jobsrun, status, cancel, retry
logsStream logs for a pod or endpoint
gpuslist
volumeslist, get, create, resize, delete
templateslist, get, create, delete
secretslist, set, delete
ssh-keyslist, add, delete
api-keyslist, create, rotate, revoke
billingbalance, usage, invoices, spend-limit
versionPrint the CLI version