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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"command": "<command>"
},
"name": "run_job"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| hours | No | expected wall time on an AWS c7i-class CPU or the named GPU | |
| image | No | public container image, default python:3.12-slim | |
| label | No | ||
| trust | No | ||
| vcpus | No | ||
| mem_gb | No | ||
| command | Yes | shell command run in the container | |
| regions | No | eu, us, asia or region codes | |
| spot_ok | No | job may be interrupted and re-run | |
| gpu_type | No | e.g. H100, A100, RTX 4090; omit for CPU jobs | |
| gpu_count | No | ||
| max_hours | No | hard time limit, 0.05 to 4 | |
| stateless | No | must be true; stateful jobs are refused | |
| data_in_gb | No | data pulled from AWS per run (egress cost) | |
| max_price_hr | No | USD per hour cap |