---
title: "Serialize Ionworks Model"
method: POST
path: "/discovery/ionworks_models/serialize"
tags: ["discovery"]
---

# Serialize Ionworks Model

`POST /discovery/ionworks_models/serialize`

## Request

- Base URL: `https://api.ionworks.com`
- URL: `https://api.ionworks.com/discovery/ionworks_models/serialize`
- Auth: none declared

Build an ionworks model and return its pybamm ``Serialise`` JSON.

Lets callers without the licensed ``ionworkspipeline`` package use
ionworks models (``ECM``, ``LumpedSPMR``, ``GITTModel``, ...): the JSON
loads with plain ``pybamm`` via ``Serialise.load_custom_model``. Standard
pybamm models are already usable directly, so requesting one returns 400.

Returned verbatim because the JSON may contain ``Infinity``/``NaN``
literals; Python's ``json`` (and the SDK) parse these fine.

## Request body

- SerializeIonworksModelBody: Body for ``POST /discovery/ionworks_models/serialize``.
  - `name` string, required: Ionworks model class name to build and serialize, e.g. 'ECM', 'LumpedSPMR', 'MSMRFullCellModel', 'GITTModel'. Must be one of the names returned under 'ionworks_models' by GET /discovery/pybamm_models.
  - `options` object: Options dict to pass to the model constructor.

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ionworks/apis/ionworks-api.md) - [All operations](https://skmtc.dev/ionworks/apis/ionworks-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ionworks/apis/ionworks-api/revisions/abebbbc5f60a?raw)
