Install and authenticate first:
pip install ionworks-api and set IONWORKS_API_KEY. See the Python API client page.- Built-in vs custom.
client.model.createtakes a built-in PyBaMM model — pass the object (pybamm.lithium_ion.SPM(options=...)) or a{"type": "SPM"}config dict — and stores it as a standard model with its options (is_custom_model=False). Reach forclient.model.upload_customonly for a model class that isn’t built in — your ownpybamm.BaseModelsubclass with new equations/submodels — which is stored as a custom model (is_custom_model=True). - Custom uploads need a
chemistrytag up front — it drives simulation fix-ups and can’t be reliably inferred (a Li-S model without it fails at simulation time). - A
Modelholds no parameter values and can’t be simulated alone. Create aParameterizedModel(against acell_spec_id) to make it runnable — see Run a simulation in a study.