CloudSwap
v0.1.0Finds the cheapest cloud for a stateless CPU or GPU job across AWS, Vast.ai, RunPod and more.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
quote_job
Price a stateless container or batch/GPU job on every provider and return the cheapest fitting place, with cost per run and the next best offers. Dry run: places nothing.
| Parameter | Type | Description |
|---|---|---|
mem_gb * | number | |
vcpus * | integer | |
choice | string | who may run it: lowest (default), big_cloud, datacenter, or supplier:<name> (one named supplier) |
data_in_gb | number | data pulled from AWS per run (egress cost) |
gpu_count | integer | |
gpu_type | string | e.g. H100, A100, RTX 4090; omit for CPU jobs |
hours | number | expected wall time on an AWS c7i-class CPU or the named GPU |
max_price_hr | number | USD per hour cap |
regions | array | eu, us, asia or region codes |
spot_ok | boolean | job may be interrupted and re-run |
stateless | boolean | must be true; stateful jobs are refused |
trust | string |
list_providers
List the providers this router prices.
run_job
Run a stateless container job on the cheapest fitting machine (Vast.ai, RunPod or Shadeform), paid from your CloudSwap prepaid credits. A hold of the maximum price is taken first; you pay the real price after the run. Needs your CloudSwap API key as a Bearer token. Returns a job id: call get_job to follow it.
| Parameter | Type | Description |
|---|---|---|
command * | string | shell command run in the container |
choice | string | who may run it: lowest (default), big_cloud, datacenter, or supplier:<name> (one named supplier) |
data_in_gb | number | data pulled from AWS per run (egress cost) |
env | object | |
gpu_count | integer | |
gpu_type | string | e.g. H100, A100, RTX 4090; omit for CPU jobs |
hours | number | expected wall time on an AWS c7i-class CPU or the named GPU |
image | string | public container image, default python:3.12-slim |
label | string | |
max_hours | number | hard time limit, 0.05 to 4 |
max_price_hr | number | USD per hour cap |
mem_gb | number | |
public_receipt | boolean | publish a public receipt page for this job (job shape, provider, price, AWS comparison; never the command, env or logs) |
regions | array | eu, us, asia or region codes |
spot_ok | boolean | job may be interrupted and re-run |
stateless | boolean | must be true; stateful jobs are refused |
trust | string | |
vcpus | integer |
get_job
State, price, wall time and log tail of one of your jobs.
| Parameter | Type | Description |
|---|---|---|
id * | string |