Upload a custom PyBaMM model JSON file

Upload a custom PyBaMM model from a serialized JSON file.

The model JSON is stored compressed (zstd) directly in the custom_model_data column. Custom models are identified by having non-null custom_model_data.

Non-JSON-compliant values (Infinity, -Infinity, NaN) are sanitized to strings before storing to ensure the JSON can be parsed by JavaScript.

Parameters

name : str Name for the custom model description : str, optional Optional description for the model file : UploadFile The PyBaMM serialized model JSON file

Returns

Model The created model record

post/models/upload-custom

Response

Successful Response

namestring required

The name of the model.

descriptionstring nullable

An optional description for the model.

pybamm_versionstring nullable

PyBaMM version used for this model. If not provided, will be read from pybamm.version.

chemistry'lithium_ion' | 'lithium_sulfur' | 'ecm' | 'generic'

Model chemistry kind: 'lithium_ion' (default — assumes pybamm lithium-ion conventions), 'lithium_sulfur', 'ecm', or 'generic' (no chemistry-specific enrichment).

simulation_settingsobject nullable

Optional persistent simulation kwargs (var_pts / submesh_types / spatial_methods / geometry / solver) in the flat canonical form, re-applied at simulation time. None uses the model defaults.

idstring required

The unique identifier for the model.

user_idstring required

The ID of the user who created the model.

organization_idstring required

The ID of the organization this model belongs to.

created_by_emailstring nullable

Email of the user who created the model.

created_atstring date-time required

Timestamp of when the model was created.

updated_atstring date-time required

Timestamp of when the model was last updated.

is_custom_modelboolean required

Check if this is a custom model (has compressed model data).

Changes

No recorded changes to this endpoint across all 1 revision of this API.