Skip to main content
Upload a custom PyBaMM model JSON file

Body

multipart/form-data
name
string
required

Name for the custom model

file
string
required

PyBaMM serialized model JSON file

description
string | null

Optional description

chemistry
string
default:lithium_ion

Model chemistry kind (lithium_ion, lithium_sulfur, ecm, generic). Defaults to lithium_ion.

Response

Successful Response

Model representing a model as returned by the API (without config).

name
string
required

The name of the model.

id
string
required

The unique identifier for the model.

user_id
string
required

The ID of the user who created the model.

organization_id
string
required

The ID of the organization this model belongs to.

created_at
string<date-time>
required

Timestamp of when the model was created.

updated_at
string<date-time>
required

Timestamp of when the model was last updated.

is_custom_model
boolean
required
read-only

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

description
string | null

An optional description for the model.

pybamm_version
string | null

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

chemistry
enum<string>
default:lithium_ion

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

Available options:
lithium_ion,
lithium_sulfur,
ecm,
generic
created_by_email
string | null

Email of the user who created the model.