From signup to first recommendation in 5 steps
About ten minutes, all with curl. Replace $KEY with your API key and $PRINCIPAL with your principal id from signup.
- Get an API key. Sign up on the home page. The key is shown once. Set it in your shell:
export CPS_API_KEY=cps_your_key_here export CPS_PRINCIPAL=p_your_principal export CPS=https://cps.sedra-0b3.workers.dev
- Register each site. One call per datacenter or region. Use your real measured numbers. For a CAISO site the node is the CAISO price node (for example TH_NP15_GEN-APND for NP15); for a NYISO site use price_source nyiso_dam and the zone name as the node (for example N.Y.C.).
curl -s -X POST $CPS/sites -H "Authorization: Bearer $CPS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"West DC","region":"us-west","price_source":"caiso_oasis_dam", "node":"TH_NP15_GEN-APND","kw_per_gpu":0.7,"pue":1.3,"gpu_capacity":64}' - Check price data. CPS polls day-ahead prices daily. Confirm your sites have fresh prices:
curl -s $CPS/api/sites-prices -H "Authorization: Bearer $CPS_API_KEY"
- Submit a job. GPU count, estimated hours, and how flexible the start time is:
curl -s -X POST $CPS/jobs -H "Authorization: Bearer $CPS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"principal":"'"$CPS_PRINCIPAL"'","name":"llama-finetune", "gpu_count":8,"est_hours":12}'The flexibility window defaults to 48 hours. Pass flex_start and flex_end to set your own. - Get the recommendation and approve it.
curl -s $CPS/jobs/JOB_ID/recommendation -H "Authorization: Bearer $CPS_API_KEY" curl -s -X POST $CPS/decisions/DECISION_ID/approve -H "Authorization: Bearer $CPS_API_KEY"
The recommendation shows the cheapest site and start window, every option priced in dollars, and a sealed receipt hash. Then dispatch the job yourself, pointed at the recommended site.
Putting it in the cluster
CPS is advisory by design. Three integration depths, in order of commitment:
- Manual sidecar (today). A shell wrapper submits the job to CPS, prints the recommendation, asks for approval, and prints the dispatch target. You submit to Slurm or Kubernetes yourself. Nothing in your cluster changes.
- Slurm submit plugin. A wrapper around sbatch reads the CPS recommendation and sets the partition and begin time. Fail open to the default partition when CPS is unreachable.
- Kubernetes scheduler extender. A webhook annotates jobs with the recommended site and not-before time; node labels per region do the placement.
The full Slurm and Kubernetes wiring guide ships with pilot onboarding. CPS never dispatches, preempts, or touches hardware.
Watch it in the dashboard
The dashboard shows every decision, its projected cost, and the sealed receipt, using the same API key.