---
title: "Validate Custom Model"
method: POST
path: "/models/validate-custom-model"
---

# Validate Custom Model

`POST /models/validate-custom-model`

Validate a custom PyBaMM model JSON file and return variable information.

Validates that the JSON can be successfully loaded as a PyBaMM model and
returns the variable names from model.rhs and model.algebraic.

Parameters
----------
file : UploadFile
    The PyBaMM serialized model JSON file

Returns
-------
CustomModelValidationResult
    Validation result with success status, error message, and variable info

## Response `200`

Successful Response

- CustomModelValidationResult
  - `success` boolean, required
  - `error` string, nullable
  - `rhs_variables` string[], nullable
  - `algebraic_variables` string[], nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/ionworks/apis/fastapi.md) · [All operations](https://skmtc.dev/ionworks/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ionworks/fastapi/revisions/7337a3cbdaf2/schema)
