CloudSwap

v0.1.0
ai.cloudswap/cloudswap Checked 7 hours ago Published 1 day ago

Finds 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.

ParameterTypeDescription
mem_gb *number
vcpus *integer
choicestringwho may run it: lowest (default), big_cloud, datacenter, or supplier:<name> (one named supplier)
data_in_gbnumberdata pulled from AWS per run (egress cost)
gpu_countinteger
gpu_typestringe.g. H100, A100, RTX 4090; omit for CPU jobs
hoursnumberexpected wall time on an AWS c7i-class CPU or the named GPU
max_price_hrnumberUSD per hour cap
regionsarrayeu, us, asia or region codes
spot_okbooleanjob may be interrupted and re-run
statelessbooleanmust be true; stateful jobs are refused
truststring

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.

ParameterTypeDescription
command *stringshell command run in the container
choicestringwho may run it: lowest (default), big_cloud, datacenter, or supplier:<name> (one named supplier)
data_in_gbnumberdata pulled from AWS per run (egress cost)
envobject
gpu_countinteger
gpu_typestringe.g. H100, A100, RTX 4090; omit for CPU jobs
hoursnumberexpected wall time on an AWS c7i-class CPU or the named GPU
imagestringpublic container image, default python:3.12-slim
labelstring
max_hoursnumberhard time limit, 0.05 to 4
max_price_hrnumberUSD per hour cap
mem_gbnumber
public_receiptbooleanpublish a public receipt page for this job (job shape, provider, price, AWS comparison; never the command, env or logs)
regionsarrayeu, us, asia or region codes
spot_okbooleanjob may be interrupted and re-run
statelessbooleanmust be true; stateful jobs are refused
truststring
vcpusinteger

get_job

State, price, wall time and log tail of one of your jobs.

ParameterTypeDescription
id *string