The Foundry API is currently in an experimental release. The endpoints documented here may be subject to breaking changes in the future.
With the Foundry API, you can programmatically place spot instance bids to dynamically scale your compute. A full version of this API will ship in the coming months, but this Jupyter notebook (replicated below) will help you get started.
#First you'll need to login to grab your access token. You can do this by running the following code block.conn = http.client.HTTPSConnection(API_URL)data ={'email':'YOUR_EMAIL','password':'YOUR_PASSWORD'}payload = json.dumps(data)conn.request("POST", "/login", payload)res = conn.getresponse()data = json.loads(res.read().decode("utf-8"))access_token = data["access_token"]