Skip to main content
Register a model so you can parameterize and simulate it. A model is the structural definition (SPM, DFN, or your own equations); a parameterized model binds a model to a cell spec and parameter values — that’s the runnable thing.
Install and authenticate first: pip install ionworks-api and set IONWORKS_API_KEY. See the Python API client page.
What’s happening
  • Built-in vs custom. client.model.create takes 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 for client.model.upload_custom only for a model class that isn’t built in — your own pybamm.BaseModel subclass with new equations/submodels — which is stored as a custom model (is_custom_model=True).
  • Custom uploads need a chemistry tag up front — it drives simulation fix-ups and can’t be reliably inferred (a Li-S model without it fails at simulation time).
  • A Model holds no parameter values and can’t be simulated alone. Create a ParameterizedModel (against a cell_spec_id) to make it runnable — see Run a simulation in a study.

Learn more