---
title: "Preview Experiment Backend"
method: POST
path: "/optimize/preview-experiment-backend"
tags: ["optimization"]
---

# Preview Experiment Backend

`POST /optimize/preview-experiment-backend`

Check whether a UCP protocol can be run on the PyBaMM backend.

The frontend uses this to gate the simulation backend selector — when
the protocol is not PyBaMM-compatible, users are forced onto the UCP
backend.

## Request body

- ExperimentBackendPreviewRequest — Request body for previewing simulation backend compatibility.
  - `experiment` string, required — UCP protocol YAML string

## Response `200`

Successful Response

- ExperimentBackendPreviewResponse — Compatibility report for a UCP protocol against the PyBaMM backend. The PyBaMM backend converts UCP protocols to ``pybamm.Experiment`` objects. Some UCP features (loops, conditionals, EIS, expression-driven values) are not representable in a PyBaMM experiment, in which case the user must run on the UCP backend instead.
  - `pybamm_compatible` boolean, required
  - `error` 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)
