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

> Creates a new Model API with a single Model API version.



## OpenAPI

````yaml /api-specs/6.3/public-api.yaml post /api/modelServing/v1/modelApis
openapi: 3.0.3
info:
  title: Domino Public API
  description: Domino Public API Endpoints
  version: 6.2.2
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: GenAI
  - name: HardwareTier
  - name: Jobs
  - name: ModelAPI
  - name: ModelAPIVersion
  - name: ModelDeployment
  - name: Organizations
  - name: PPM
  - name: ProjectSharedDatasets
  - name: ProjectTemplates
  - name: Projects
  - name: ProjectsFiles
  - name: RegisteredModels
  - name: ServiceAccounts
  - name: Users
  - name: Workspaces
paths:
  /api/modelServing/v1/modelApis:
    post:
      tags:
        - ModelAPI
      description: Creates a new Model API with a single Model API version.
      operationId: createModelApi
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelApiCreationRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelApi'
          description: The created Model API.
components:
  schemas:
    ModelApiCreationRequest:
      properties:
        bundleId:
          description: The ID of the bundle governing the model API to create.
          nullable: true
          pattern: ^[0-9a-f]{24}$
          type: string
        description:
          description: The description of the Model API to create.
          nullable: false
          type: string
        environmentId:
          description: >-
            The id of the environment the Model API to create should be deployed
            to.
          nullable: false
          type: string
        environmentVariables:
          description: The environment variables of the Model API to create.
          items:
            $ref: '#/components/schemas/ModelApiEnvironmentVariable'
          type: array
        hardwareTierId:
          description: >-
            The id of the hardware tier the Model API to create should be
            deployed with.
          nullable: true
          type: string
        isAsync:
          description: Whether the Model API to create should be async.
          nullable: false
          type: boolean
        name:
          description: The name of the Model API to create.
          nullable: false
          type: string
        replicas:
          description: The number of replicas of the Model API should be created with.
          nullable: false
          type: integer
        resourceQuotaId:
          description: >-
            The id of the resource quota the Model API to create should be
            deployed with.
          nullable: true
          type: string
        strictNodeAntiAffinity:
          description: >-
            Whether the Model API to create should have strict node anti
            affinity.
          nullable: false
          type: boolean
        version:
          $ref: '#/components/schemas/ModelApiVersionCreationRequest'
      required:
        - name
        - description
        - environmentId
        - isAsync
        - strictNodeAntiAffinity
        - environmentVariables
        - version
    ModelApi:
      properties:
        access:
          $ref: '#/components/schemas/ModelApiAccessConfiguration'
        activeVersion:
          $ref: '#/components/schemas/ModelApiVersionSummary'
        bundleId:
          description: The ID of the bundle governing the model API to create.
          nullable: true
          pattern: ^[0-9a-f]{24}$
          type: string
        collaborators:
          description: The collaborators of the Model API.
          items:
            $ref: '#/components/schemas/ModelApiCollaboratorRole'
          nullable: false
          type: array
        description:
          description: The description of the Model API.
          nullable: false
          type: string
        environmentId:
          description: The id of the environment the Model API is deployed to.
          nullable: false
          type: string
        hardwareTierId:
          description: The id of the hardware tier the Model API is deployed with.
          nullable: true
          type: string
        healthCheck:
          $ref: '#/components/schemas/ModelApiHealthCheckConfiguration'
        id:
          description: The id of the Model API.
          nullable: false
          type: string
        isArchived:
          description: Whether the Model API is archived.
          nullable: false
          type: boolean
        isAsync:
          description: Whether the Model API is async.
          nullable: false
          type: boolean
        metadata:
          $ref: '#/components/schemas/ModelApiMetadata'
        name:
          description: The name of the Model API.
          nullable: false
          type: string
        overrideRequestTimeoutSecs:
          description: The request timeout configuration of the Model API.
          nullable: true
          type: integer
        replicas:
          description: The number of replicas of the Model API.
          nullable: false
          type: integer
        resourceQuotaId:
          description: The id of the resource quota the Model API is deployed with.
          nullable: true
          type: string
        routingMode:
          description: The routing mode of the Model API.
          nullable: false
          type: string
        strictNodeAntiAffinity:
          description: Whether the Model API has strict node anti affinity.
          nullable: false
          type: boolean
        volumes:
          description: The volumes of the Model API.
          items:
            $ref: '#/components/schemas/ModelApiVolume'
          nullable: false
          type: array
      required:
        - id
        - name
        - description
        - isArchived
        - environmentId
        - replicas
        - routingMode
        - isAsync
        - strictNodeAntiAffinity
        - access
        - healthCheck
        - collaborators
        - volumes
        - metadata
    ModelApiEnvironmentVariable:
      properties:
        key:
          description: The name of the environment variable.
          nullable: false
          type: string
        value:
          description: The value of the environment variable.
          nullable: false
          type: string
      required:
        - key
        - value
    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
    ModelApiAccessConfiguration:
      properties:
        accessTokens:
          description: The access tokens of the Model API.
          items:
            $ref: '#/components/schemas/ModelApiAccessToken'
          nullable: false
          type: array
        isPublic:
          description: Whether the Model API is public.
          nullable: false
          type: boolean
      required:
        - isPublic
        - accessTokens
    ModelApiVersionSummary:
      properties:
        dataPlaneId:
          description: The id of the data plane the Model API Version is deployed to.
          nullable: false
          type: string
        deployment:
          $ref: '#/components/schemas/ModelApiVersionDeployment'
        id:
          description: The id of the Model API Version.
          nullable: false
          type: string
        number:
          description: The version number of the Model API Version.
          nullable: false
          type: integer
      required:
        - id
        - dataPlaneId
    ModelApiCollaboratorRole:
      properties:
        collaborator:
          description: The reference of the collaborator.
          nullable: false
          type: string
        role:
          description: The role of the collaborator.
          nullable: false
          type: string
      required:
        - collaborator
        - role
    ModelApiHealthCheckConfiguration:
      properties:
        failureThreshold:
          description: The threshold of health check failures for the Model API.
          nullable: false
          type: integer
        initialDelaySeconds:
          description: The initial delay of the health check for the Model API.
          nullable: false
          type: integer
        periodSeconds:
          description: The health check period for the Model API.
          nullable: false
          type: integer
        timeoutSeconds:
          description: The health check timeout for the Model API.
          nullable: false
          type: integer
      required:
        - failureThreshold
        - initialDelaySeconds
        - periodSeconds
        - timeoutSeconds
    ModelApiMetadata:
      properties:
        created:
          description: The date when the Model API was created.
          nullable: false
          type: number
        createdBy:
          description: The id of the user that created the Model API.
          nullable: false
          type: string
        lastModified:
          description: The date when the Model API was last modified.
          nullable: false
          type: number
      required:
        - created
        - createdBy
        - lastModified
    ModelApiVolume:
      properties:
        mountPath:
          description: The mount path of the volume.
          nullable: false
          type: string
        name:
          description: The name of the volume.
          nullable: false
          type: string
        readOnly:
          description: Whether the volume is read only.
          nullable: false
          type: boolean
        volumeType:
          description: The type of volume.
          nullable: false
          type: string
      required:
        - name
        - mountPath
        - volumeType
        - readOnly
    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
    ModelApiAccessToken:
      properties:
        created:
          description: The creation date for the access token.
          nullable: false
          type: number
        createdBy:
          description: The id of the user that created the access token.
          nullable: false
          type: string
        id:
          description: The id of the access token.
          nullable: false
          type: string
        lastGenerated:
          description: The date the access token was last generated.
          nullable: false
          type: number
        lastGeneratedBy:
          description: The id of the user that last generated the access token.
          nullable: false
          type: string
        name:
          description: The name of the access token.
          nullable: false
          type: string
      required:
        - id
        - created
        - createdBy
        - lastGenerated
        - lastGeneratedBy
    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
  securitySchemes:
    DominoApiKey:
      in: header
      name: X-Domino-Api-Key
      type: apiKey
    BearerAuthentication:
      in: header
      name: Authorization
      type: apiKey

````