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

# Create a model run

> Create and execute a model run. Provide the time range and the data point IDs to use as inputs. The model's node tree is evaluated against the provided data points.



## OpenAPI

````yaml POST /models/{model_id}/model_runs
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /models/{model_id}/model_runs:
    post:
      summary: Create a model run
      description: >-
        Create and execute a model run. Provide the time range and the data
        point IDs to use as inputs. The model's node tree is evaluated against
        the provided data points.
      operationId: create-model-run
      parameters:
        - name: model_id
          in: path
          description: Model friendly ID (e.g., mdl_abc123def456)
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model_run
              properties:
                model_run:
                  type: object
                  required:
                    - start_time
                    - end_time
                    - data_point_ids
                  properties:
                    start_time:
                      type: string
                      format: date-time
                      description: ISO 8601 date/datetime for the run period start
                    end_time:
                      type: string
                      format: date-time
                      description: ISO 8601 date/datetime for the run period end
                    data_point_ids:
                      type: array
                      items:
                        type: string
                      description: Array of data point friendly IDs to use as inputs
            examples:
              Result:
                value:
                  model_run:
                    start_time: '2025-01-01T00:00:00Z'
                    end_time: '2025-03-31T23:59:59Z'
                    data_point_ids:
                      - dp_abc123
                      - dp_def456
      responses:
        '201':
          description: '201'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: 1
                    start_time: '2025-01-01T00:00:00.000Z'
                    end_time: '2025-03-31T23:59:59.000Z'
                    state: complete
                    error_message: null
                    created_at: '2025-01-15T10:00:00.000Z'
                    updated_at: '2025-01-15T10:00:00.000Z'
                    calculations:
                      - id: 1
                        name: Net Carbon Removal
                        value: 100.5
                        unit: t
                        ghg: co2e
                        lca_role: net
                        category: removal
                    output_data_points:
                      - id: dp_abc123
                        slug: net-carbon-removal
                        data_point_type: Net Carbon Removal
                        value: 100.5
                        unit: t
                        status: complete
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  start_time:
                    type: string
                    format: date-time
                  end_time:
                    type: string
                    format: date-time
                  state:
                    type: string
                  error_message:
                    type: string
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  calculations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        value:
                          type: number
                        unit:
                          type: string
                        ghg:
                          type: string
                        lca_role:
                          type: string
                        category:
                          type: string
                  output_data_points:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        slug:
                          type: string
                        data_point_type:
                          type: string
                        value:
                          type: number
                        unit:
                          type: string
                        status:
                          type: string
        '422':
          description: '422'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: error
                    statusCode: 422
                    errors:
                      - message: Missing required data points
              schema:
                type: object
                properties:
                  status:
                    type: string
                  statusCode:
                    type: integer
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````