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

# Create a new endpoint

> Create a new a endpoint



## OpenAPI

````yaml /api-specs/6.3/public-api.yaml post /api/aigateway/v1/endpoints
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/aigateway/v1/endpoints:
    post:
      tags:
        - AIGateway
      summary: Create a new endpoint
      description: Create a new a endpoint
      operationId: createGatewayEndpoint
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewEndpointV1'
        description: Details of the new endpoint to create
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointEnvelopeV1'
          description: Success
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    NewEndpointV1:
      properties:
        endpointName:
          description: Valid name of the endpoint
          example: completions
          type: string
        endpointPermissions:
          $ref: '#/components/schemas/EndpointPermissionsDtoV1'
        endpointType:
          description: Type of the endpoint
          example: llm/v1/completions
          type: string
        modelConfig:
          $ref: '#/components/schemas/ModelConfigV1'
        modelName:
          description: Name of the model
          example: gpt-4
          type: string
        modelProvider:
          description: Provider of the model
          example: openai
          type: string
      required:
        - endpointName
        - endpointType
        - endpointPermissions
        - modelProvider
        - modelName
        - modelConfig
      type: object
    EndpointEnvelopeV1:
      properties:
        creationDate:
          description: ISO 8601 formatted time of when the Endpoint was created
          example: '2022-04-23T18:25:43.511Z'
          format: date-time
          type: string
        endpointId:
          description: ID of the endpoint
          example: 62604702b7e5d347dbe7a909
          type: string
        endpointName:
          description: Valid name of the endpoint
          example: completions
          type: string
        endpointType:
          description: Type of the endpoint
          example: llm/v1/completions
          type: string
        modelConfig:
          $ref: '#/components/schemas/ModelConfigV1'
        modelName:
          description: Name of the model
          example: gpt-4
          type: string
        modelProvider:
          description: Provider of the model
          example: openai
          type: string
      required:
        - endpointId
        - endpointName
        - endpointType
        - modelProvider
        - modelName
        - modelConfig
        - creationDate
      type: object
    EndpointPermissionsDtoV1:
      properties:
        isEveryoneAllowed:
          description: If the endpoint is accessible by everyone
          type: boolean
        userIds:
          description: User IDs that can access this endpoint
          items:
            type: string
          type: array
      required:
        - isEveryoneAllowed
        - userIds
      type: object
    ModelConfigV1:
      additionalProperties:
        type: string
      description: Configuration for the model
      type: object
    FailureEnvelopeV1:
      properties:
        errors:
          description: Errors that caused a request to fail
          items:
            type: string
          type: array
        requestId:
          description: Id used to correlate a request with server actions.
          example: bbd78579-93c4-45ee-a983-0d5c8da6d5b1
          type: string
      required:
        - requestId
        - errors
      type: object
  responses:
    '400':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Bad Request
    '401':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: >-
        The current user cannot perform this operation because they are not
        logged in
    '403':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: The current user is not authorized to perform this operation
    '404':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Not Found
    '500':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Internal Server Error
  securitySchemes:
    DominoApiKey:
      in: header
      name: X-Domino-Api-Key
      type: apiKey
    BearerAuthentication:
      in: header
      name: Authorization
      type: apiKey

````