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

# Post apimodelservingv1modelapis versions

> Creates a Model API Version for a Model API.



## OpenAPI

````yaml /api-specs/cloud/public-api.yaml post /api/modelServing/v1/modelApis/{modelApiId}/versions
openapi: 3.0.3
info:
  title: Domino Public API
  description: Domino Public API Endpoints
  version: cloud
servers: []
security:
  - DominoApiKey: []
  - BearerAuthentication: []
tags:
  - name: AIGateway
  - name: AppInstances
  - name: AppVersions
  - name: Apps
  - name: AsyncPredictions
  - name: AuditTrail
  - name: BillingTag
  - name: BillingTagSettings
  - name: Cost
  - name: CustomMetrics
  - name: DataSource
  - name: DatasetRw
  - name: DeploymentTargets
  - name: Environments
  - name: Extensions
  - name: GenAI
  - name: HardwareTier
  - name: Jobs
  - name: ModelAPI
  - name: ModelAPIVersion
  - name: ModelDeployment
  - name: Organizations
  - name: PPM
  - name: PersonalAccessToken
  - name: ProjectSharedDatasets
  - name: ProjectTemplates
  - name: Projects
  - name: ProjectsCommits
  - name: ProjectsFiles
  - name: RegisteredModels
  - name: ServiceAccounts
  - name: Users
  - name: Workspaces
paths:
  /api/modelServing/v1/modelApis/{modelApiId}/versions:
    post:
      tags:
        - ModelAPIVersion
      description: Creates a Model API Version for a Model API.
      operationId: createModelApiVersion
      parameters:
        - description: The id of the Model API to create the version for.
          in: path
          name: modelApiId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelApiVersionCreationRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelApiVersion'
          description: The created Model API Version.
components:
  schemas:
    ModelApiVersionCreationRequest:
      properties:
        commitId:
          description: The id of the commit id of the Model API Version to create.
          nullable: false
          type: string
        description:
          description: The description for the Model API Version to create.
          nullable: false
          type: string
        environmentId:
          description: The id of the environment to deploy the Model API Version with.
          nullable: false
          type: string
        logHttpRequestResponse:
          description: >-
            Whether the Model API Version to create should log HTTP requests and
            responses.
          nullable: false
          type: boolean
        monitoringEnabled:
          description: >-
            Whether the Model API Version to create should have monitoring
            enabled.
          nullable: false
          type: boolean
        predictionDatasetResourceId:
          description: >-
            The id of the prediction dataset to be used by the Model API Version
            to create.
          nullable: true
          type: string
        projectId:
          description: >-
            The id of the project the Model API Version to create should belong
            to.
          nullable: false
          type: string
        provenanceCheckpointId:
          description: >-
            The id of the provenance checkpoint of the Model API Version to
            create.
          nullable: false
          type: string
        recordInvocation:
          description: Whether the Model API Version to create should record invocations.
          nullable: false
          type: boolean
        shouldDeploy:
          description: Whether the Model API Version to create should be deployed.
          nullable: false
          type: boolean
        source:
          $ref: '#/components/schemas/ModelApiSource'
      required:
        - projectId
        - source
        - logHttpRequestResponse
        - monitoringEnabled
    ModelApiVersion:
      properties:
        bundleId:
          description: The ID of the bundle governing the model API to create.
          nullable: true
          pattern: ^[0-9a-f]{24}$
          type: string
        commitId:
          description: The id of the commit of the Model API Version.
          nullable: false
          type: string
        dataPlaneId:
          description: The id of the data plane the Model API Version is deployed to.
          nullable: false
          type: string
        deployment:
          $ref: '#/components/schemas/ModelApiVersionDeployment'
        description:
          description: The description of the Model API Version.
          nullable: false
          type: string
        environmentRevisionId:
          description: >-
            The id of the environment revision the Model API Version is deployed
            on.
          nullable: false
          type: string
        id:
          description: The id of the Model API Version.
          nullable: false
          type: string
        labels:
          description: The labels of the Model API Version.
          items:
            type: string
          type: array
        logHttpRequestResponse:
          description: >-
            Whether the Model API Version should log the HTTP requests and
            responses.
          nullable: false
          type: boolean
        metadata:
          $ref: '#/components/schemas/ModelApiVersionMetadata'
        modelApiId:
          description: The id of the Model API the version belongs to.
          nullable: false
          type: string
        monitoringEnabled:
          description: Whether monitoring is enabled for the Mode API Version.
          nullable: false
          type: boolean
        number:
          description: The version number of the Model API Version.
          nullable: false
          type: integer
        predictionDatasetResourceId:
          description: The id of the prediction dataset used by the Model API Version.
          nullable: true
          type: string
        projectId:
          description: The id of the project the Model API Version belongs to.
          nullable: false
          type: string
        provenanceCheckpointId:
          description: The id of the provenance checkpoint of the Model API Version.
          nullable: true
          type: string
        recordInvocation:
          description: Whether the Model API Version should record invocations.
          nullable: false
          type: boolean
        source:
          $ref: '#/components/schemas/ModelApiSource'
      required:
        - id
        - modelApiId
        - projectId
        - source
        - commitId
        - dataPlaneId
        - environmentRevisionId
        - logHttpRequestResponse
        - monitoringEnabled
        - recordInvocation
        - labels
        - metadata
    ModelApiSource:
      properties:
        excludeFiles:
          description: The files excluded from the Model API.
          items:
            type: string
          type: array
        file:
          description: The name of the source file of the model served by the Model API.
          nullable: false
          type: string
        function:
          description: The function used to call the model served by the Model API.
          nullable: false
          type: string
        registeredModelName:
          description: The name of the registered model served by the Model API.
          nullable: false
          type: string
        registeredModelVersion:
          description: The version of the registered model served by the Model API.
          nullable: false
          type: integer
        type:
          description: The type of source of the Model API.
          enum:
            - File
            - Registry
          nullable: false
          type: string
      required:
        - type
    ModelApiVersionDeployment:
      properties:
        isPending:
          description: Whether the Model API Version deployment is pending.
          nullable: false
          type: boolean
        status:
          description: The status of the Model API Version deployment.
          nullable: false
          type: string
      required:
        - status
        - isPending
    ModelApiVersionMetadata:
      properties:
        created:
          description: The date when the Model API was created Version.
          nullable: false
          type: number
        createdBy:
          description: The id of the user that created the Model API Version.
          nullable: false
          type: string
        summary:
          description: The summary of the Model API Version.
          nullable: true
          type: string
      required:
        - created
        - createdBy
  securitySchemes:
    DominoApiKey:
      in: header
      name: X-Domino-Api-Key
      type: apiKey
    BearerAuthentication:
      in: header
      name: Authorization
      type: apiKey

````