Install
pip install klio-computeInstall needs Python 3.10 to 3.13 on your machine. Your code runs on Python 3.12 in Klio Compute. The newest release is on PyPI and is also named in latest.txt.
Sign in
klio loginThis opens the sign-in page in your browser and creates an account if you don't have one.
On a machine without a browser, such as a server, a container or an agent's shell, print a link and a short code to use from any device instead. Over SSH and in CI this happens by itself.
klio login --browserlessIn CI, set KLIO_TOKEN to a key from Keys in the console instead of signing in. Your sign-in is stored in ~/.klio/config.ini. klio doctor checks your connection and credentials.
Run your first function
Save this as app.py, then run python app.py:
from klio_compute import function, Image
@function(image=Image(python_version="python3.12"), cpu=1, memory="1Gi")
def hello():
return "Hello from Klio Compute"
if __name__ == "__main__":
print(hello.remote()).remote() runs the function in a container in Klio Compute and returns its result. The container stops when the call is done, and you pay for the seconds it ran.
Keep it running
klio deploy app.py:helloThis deploys hello as an app you can see, call and stop in the console. Next: run it on a GPU, put it behind an address or deploy an open model.
Free credit
A new workspace gets $5 of free credit, which expires after 30 days. Until a card is on file you can use $1 of it; then add a card in the console to keep going. See pricing.