> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ionworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Save To Project

> Create a Parameterized Model from ECM fit results.

Uses the system ECM model and stores the fitted interpolant parameters.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /ecm/save-to-project
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /ecm/save-to-project:
    post:
      tags:
        - ecm-project
      summary: Save To Project
      description: |-
        Create a Parameterized Model from ECM fit results.

        Uses the system ECM model and stores the fitted interpolant parameters.
      operationId: save_to_project_ecm_save_to_project_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveToProjectRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaveToProjectResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SaveToProjectRequest:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: Name for the model.
        description:
          type: string
          title: Description
          description: Optional description.
          default: ''
        cell_spec_id:
          type: string
          title: Cell Spec Id
          description: Cell specification ID.
        num_rcs:
          type: integer
          maximum: 5
          minimum: 0
          title: Num Rcs
          description: Number of RC pairs.
        fit_results:
          $ref: '#/components/schemas/FitResultsData'
      type: object
      required:
        - name
        - cell_spec_id
        - num_rcs
        - fit_results
      title: SaveToProjectRequest
      description: Request body for saving ECM fit results as a Parameterized Model.
    SaveToProjectResponse:
      properties:
        model_id:
          type: string
          title: Model Id
        parameterized_model_id:
          type: string
          title: Parameterized Model Id
      type: object
      required:
        - model_id
        - parameterized_model_id
      title: SaveToProjectResponse
      description: Response from save-to-project.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FitResultsData:
      properties:
        soc:
          items:
            type: number
          type: array
          title: Soc
        ocv:
          items:
            type: number
          type: array
          title: Ocv
        r0:
          items:
            type: number
          type: array
          title: R0
        rc_pairs:
          items:
            $ref: '#/components/schemas/RcPairFitData'
          type: array
          title: Rc Pairs
        capacity_Ah:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          title: Capacity Ah
          description: >-
            Cell capacity used to integrate SOC, one entry per measurement
            segment. An estimated or fitted capacity is a single cell-wide value
            repeated across segments (a separate capacity is not estimated per
            trace); entries differ only when a per-measurement ``capacity`` is
            supplied. Required for validation — it is the SOC reference the
            curves were fitted against and is never re-estimated from the
            held-out trace. Save/validate use one capacity per model/trace, so
            the per-segment values must agree.
      type: object
      required:
        - soc
        - ocv
        - r0
      title: FitResultsData
      description: Fit results needed for saving (and re-simulating for validation).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    RcPairFitData:
      properties:
        r:
          items:
            type: number
          type: array
          title: R
        c:
          items:
            type: number
          type: array
          title: C
        tau:
          items:
            type: number
          type: array
          title: Tau
      type: object
      required:
        - r
        - c
        - tau
      title: RcPairFitData
      description: RC pair fit result arrays.

````