matmul-cloud
The command line tool and Python SDK for MatMul. Rent a GPU from the cheapest live offer across the neoclouds, run your container image on it, SSH in, and stop paying when you're done. One account, one prepaid balance.
The package is called matmul-cloud on PyPI. It installs the matmul command, and you import it
as matmul. It uses only the Python standard library, so it installs in seconds and won't
conflict with anything in your environment. Python 3.9 or newer.
Install
pip install matmul-cloud # or: pipx install matmul-cloud
matmul --version
Log in
Create an API key on the CLI & API page of the console: https://app.matmul.cloud/app/cli. The key is shown once, with a ready-made login command:
matmul login --api-key lmk_... --url https://api.matmul.cloud
That saves the key to ~/.config/matmul/config.json, readable only by you. In CI, set
MATMUL_API_KEY in the environment instead. MATMUL_API_URL overrides the API base URL.
Rent a GPU from the command line
matmul ssh-key add # registers ~/.ssh/id_ed25519.pub (or --file)
matmul offers --gpu H100 # live offers, cheapest first
matmul instance create --name dev --gpu H100 --max-price 3 --wait
matmul ssh dev -- nvidia-smi
matmul instance rm dev # releases the machine; billing stops
--max-price is a hard ceiling in dollars per hour: if the live price has moved above it,
nothing is launched and nothing is charged. Run matmul --help, or matmul <command> --help,
for every command and flag.
Use it from Python
import matmul
client = matmul.Client() # MATMUL_API_KEY, or the key saved by `matmul login`
offers = client.offers(gpu="H100", max_price_cents=300)
offer = offers[0]
key = client.ssh_keys()[0]
inst = client.create_instance(
offer.id, "sdk-demo", image=None, ssh_key_id=key.id, # image=None: a plain VM
max_hourly_price_cents=300,
)
try:
inst = client.wait_instance(inst.id)
print("ssh:", inst.ssh_command)
finally:
client.delete_instance(inst.id) # always stop billing
Failures raise matmul.MatMulError, with .status (the HTTP status) and .message.
Links
- Documentation: https://matmul.cloud/docs
- Step-by-step guide: Rent a cloud GPU in 5 minutes
- Use MatMul from Claude, Cursor or any MCP client:
matmul-mcp
Changelog
0.1.0
First release on PyPI.
- GPU instances:
offers,ssh-key add/ls/rm,instance create/ls/get/rm,ssh, and public HTTPS links for ports (expose,unexpose,ports). - Prepaid billing:
billing balance,billing ledger,billing add-credit. - Managed jobs (preview):
runwith--gpu,--max-priceand--wait, plusls,status,logsanddown. matmul --version.
Metadata
Release files for matmul-cloud 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| matmul_cloud-0.1.0.tar.gz | 30.8 kB | Without provenance | Details for matmul_cloud-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| matmul_cloud-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for matmul_cloud-0.1.0-py3-none-any.whl |
Total release size: 54.0 kB
Release files / matmul_cloud-0.1.0.tar.gz
| Download URL | matmul_cloud-0.1.0.tar.gz |
|---|---|
| Size | 30.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13534870b49dedbe265ddd2dd262cb2321f321220f7ecff18e41000a25159850
|
|
BLAKE2b-256 checksum How to use checksums |
546c34da67e1ea1723293de99e6e185f6cbc21360ec6e726789ed4ed8e9fc8fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / matmul_cloud-0.1.0-py3-none-any.whl
| Download URL | matmul_cloud-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40f0ec34758db3e8290de4a3fed056bcdcf387518d763612ab30e3512dcec70c
|
|
BLAKE2b-256 checksum How to use checksums |
96aeb69bc37e80515b5b8d5f6fb8218121c72b00503329b4376739e057346d1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for matmul-cloud 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.