---
title: "Export Parameterized Model Code"
method: GET
path: "/parameterized_models/{parameterized_model_id}/export"
tags: ["parameterized_models"]
---

# Export Parameterized Model Code

`GET /parameterized_models/{parameterized_model_id}/export`

## Request

- Base URL: `https://api.ionworks.com`
- URL: `https://api.ionworks.com/parameterized_models/{parameterized_model_id}/export`
- Auth: none declared

Export a parameterized model as code, as a zip.

One route for every export format, so later ones (e.g. Simscape) add a
``format`` value rather than a path.

Current and ambient temperature are inputs to the generated code, and so is
initial SOC when the model can take one.

Parameters
----------
parameterized_model_id : str
    ID of the parameterized model to export.
parameterized_models_repository : ParameterizedModelsRepository
    Repository scoped to the caller's Supabase client.
model_repository : ModelRepository
    Repository scoped to the caller's Supabase client.
export_format : {"matlab", "simulink"}
    Which code to generate, from the ``format`` query parameter.

Returns
-------
Response
    The zip archive as ``application/zip``, sent as an attachment.

## Path parameters

- `parameterized_model_id` string, uuid, required

## Query parameters

- `format` 'matlab' | 'simulink': 'matlab' for functions to solve with ode15s; 'simulink' for a MATLAB System block (models with an initial-SOC input only).

## Response `200`

Successful Response

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-20** `1a41e07d413c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ionworks/apis/ionworks-api/changes/parameterized_models/:parameterized_model_id/export/get.md)

---

[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)
