> ## 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.

# Create Simulation Batch With Template

> Optimized batch simulation creation with template-based experiments.

This endpoint is for creating multiple simulations using template-based
experiments with DOE support. For protocol-based batch simulations, use
POST /simulations/batch.

Returns
-------
List[SimulationCreationResponse]
    List of simulation creation responses with IDs, job info, and status

Raises
------
HTTPException
    If usage limit reached or job submission fails



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /simulations/with-template/batch
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /simulations/with-template/batch:
    post:
      tags:
        - Simulations
      summary: Create Simulation Batch With Template
      description: |-
        Optimized batch simulation creation with template-based experiments.

        This endpoint is for creating multiple simulations using template-based
        experiments with DOE support. For protocol-based batch simulations, use
        POST /simulations/batch.

        Returns
        -------
        List[SimulationCreationResponse]
            List of simulation creation responses with IDs, job info, and status

        Raises
        ------
        HTTPException
            If usage limit reached or job submission fails
      operationId: >-
        create_simulation_batch_with_template_simulations_with_template_batch_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSimulationBatchBody'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/SimulationCreationResponse'
                type: array
                title: >-
                  Response Create Simulation Batch With Template Simulations
                  With Template Batch Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateSimulationBatchBody:
      properties:
        parameterized_model:
          anyOf:
            - additionalProperties: true
              type: object
            - type: string
          title: Parameterized Model
        experiment_template_id:
          type: string
          title: Experiment Template Id
        conditions:
          anyOf:
            - items:
                $ref: '#/components/schemas/BatchCondition'
              type: array
            - type: 'null'
          title: Conditions
        experiment_parameter_sets:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Experiment Parameter Sets
        experiment_conditions:
          anyOf:
            - items:
                additionalProperties:
                  type: string
                type: object
              type: array
            - type: 'null'
          title: Experiment Conditions
        design_parameters_doe:
          anyOf:
            - $ref: '#/components/schemas/DOERequest'
            - type: 'null'
        study_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Study Id
        max_backward_jumps:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Backward Jumps
        extra_variables:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Extra Variables
        variable_callback_rules:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Variable Callback Rules
        termination_condition_rules:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Termination Condition Rules
        treat_pause_as_rest:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Treat Pause As Rest
        force_rerun:
          type: boolean
          title: Force Rerun
          default: false
      type: object
      required:
        - parameterized_model
        - experiment_template_id
      title: CreateSimulationBatchBody
      description: >-
        Request body for creating multiple simulations with single
        model/template.
    SimulationCreationResponse:
      properties:
        simulation_id:
          type: string
          title: Simulation Id
        job_id:
          type: string
          title: Job Id
      type: object
      required:
        - simulation_id
        - job_id
      title: SimulationCreationResponse
      description: Response for simulation creation requests.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BatchCondition:
      properties:
        experiment_parameters:
          additionalProperties:
            anyOf:
              - type: string
              - type: number
          type: object
          title: Experiment Parameters
        design_parameters:
          additionalProperties:
            anyOf:
              - type: string
              - type: number
          type: object
          title: Design Parameters
      type: object
      title: BatchCondition
      description: |-
        A single paired condition for batch simulation creation.

        Used when each simulation needs its own specific experiment and design
        parameter combination, as opposed to the DOE cross-product approach.
    DOERequest:
      properties:
        sampling:
          type: string
          title: Sampling
          default: grid
        rows:
          items:
            anyOf:
              - $ref: '#/components/schemas/DiscreteParam'
              - $ref: '#/components/schemas/RangeParam'
              - $ref: '#/components/schemas/NormalParam'
          type: array
          title: Rows
        count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Count
      type: object
      title: DOERequest
      description: |-
        Design of Experiments request with rows.

        Parameters
        ----------
        sampling
            Sampling strategy. Supported: ``grid`` (cartesian product).
        rows
            List of parameter rows; each carries its own type and config fields.
        count
            Number of samples for non-grid methods (required). Ignored for
            ``grid`` sampling.
    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
    DiscreteParam:
      properties:
        type:
          type: string
          const: discrete
          title: Type
          default: discrete
        name:
          type: string
          title: Name
        values:
          items:
            type: number
          type: array
          title: Values
      type: object
      required:
        - name
      title: DiscreteParam
      description: |-
        Discrete parameter configuration.

        Parameters
        ----------
        name
            Parameter name.
        values
            List of allowed numeric values.
    RangeParam:
      properties:
        type:
          type: string
          const: range
          title: Type
          default: range
        name:
          type: string
          title: Name
        min:
          type: number
          title: Min
        max:
          type: number
          title: Max
        count:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Count
      type: object
      required:
        - name
        - min
        - max
      title: RangeParam
      description: |-
        Range parameter configuration.

        Parameters
        ----------
        name
            Parameter name.
        min
            Minimum value (inclusive).
        max
            Maximum value (inclusive).
        count
            Optional grid sample count for this parameter. Required for
            ``grid`` sampling; ignored for non-grid methods.
    NormalParam:
      properties:
        type:
          type: string
          const: normal
          title: Type
          default: normal
        name:
          type: string
          title: Name
        mean:
          type: number
          title: Mean
        std:
          type: number
          title: Std
        count:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Count
      type: object
      required:
        - name
        - mean
        - std
      title: NormalParam
      description: |-
        Normal parameter configuration.

        Parameters
        ----------
        name
            Parameter name.
        mean
            Mean of the distribution.
        std
            Standard deviation of the distribution.
        count
            Optional grid sample count for this parameter. Required for
            ``grid`` sampling; ignored for non-grid methods.

````