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

# Create Endpoint



## OpenAPI

````yaml api-reference/gpus-v2-spec/create-endpoint.json POST /gpus/v2/endpoints
openapi: 3.0.0
info:
  title: Novita GPU API v2
  version: 2.0.0
servers:
  - url: https://api.novita.ai
security: []
paths:
  /gpus/v2/endpoints:
    post:
      summary: Create Endpoint
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
          description: 'Allowed value: application/json.'
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: 'Bearer authentication format, e.g.: `Bearer {{API_KEY}}`.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - name
                - product_id
                - image
                - worker_config
              properties:
                type:
                  type: string
                  enum:
                    - sync
                    - async
                  description: 'Endpoint type. Allowed values: `sync`, `async`.'
                  example: sync
                name:
                  type: string
                  description: 'Endpoint name. String, length: 1-255 characters.'
                  example: example-endpoint
                product_id:
                  type: string
                  description: 'Serverless product ID. String, length: 1-255 characters.'
                  example: product-id
                image:
                  type: string
                  description: 'Image address. String, length: 1-500 characters.'
                  example: registry.example.com/namespace/image:tag
                worker_config:
                  type: object
                  description: Worker configuration.
                  required:
                    - max_replicas
                  properties:
                    max_replicas:
                      type: integer
                      description: 'Maximum number of workers. Integer, range: [0, 1000].'
                      example: 2
                    min_replicas:
                      type: integer
                      description: 'Minimum number of workers. Integer, range: [0, 1000].'
                      example: 0
                    idle_timeout:
                      type: integer
                      description: 'Idle release timeout. Integer, range: [1, 1000].'
                      example: 300
                    max_concurrent_per_worker:
                      type: integer
                      description: >-
                        Maximum concurrent requests per worker. Integer, range:
                        [1, 1000].
                      example: 10
                    gpu_num:
                      type: integer
                      description: 'GPU count. Integer, range: [1, 8].'
                      example: 1
                    rootfs_size_gb:
                      type: integer
                      description: 'Root disk size. Integer, range: [10, 100]. Unit: GB.'
                      example: 20
                    min_cuda_version:
                      type: string
                      enum:
                        - '12.4'
                        - '12.6'
                        - '12.8'
                        - '12.9'
                        - '13.0'
                      description: >-
                        Minimum CUDA version. Allowed values: `12.4`, `12.6`,
                        `12.8`, `12.9`, `13.0`.
                      example: '12.4'
                    request_timeout:
                      type: integer
                      description: 'Request timeout. Integer, range: [1, 1800].'
                      example: 60
                app_name:
                  type: string
                  description: 'Application name. String, length: 0-255 characters.'
                  example: example-app
                registry_auth_id:
                  type: string
                  description: >-
                    Saved registry authentication ID. String, length: 0-255
                    characters.
                  example: registry-auth-id
                entrypoint:
                  type: string
                  description: Container entrypoint.
                  example: ''
                command:
                  type: string
                  description: Startup command.
                  example: ''
                policy:
                  type: object
                  description: Scheduling / request policy.
                  properties:
                    type:
                      type: string
                      enum:
                        - queue
                        - concurrency
                      description: 'Policy type. Allowed values: `queue`, `concurrency`.'
                      example: queue
                    value:
                      type: integer
                      description: >-
                        Policy value. Integer, range: [1, 1000]. `queue`
                        measures queue wait time; `concurrency` measures request
                        count.
                      example: 100
                volumes:
                  type: array
                  description: Mount list.
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Storage ID.
                        example: storage-id
                      type:
                        type: string
                        enum:
                          - local
                          - network
                        description: >-
                          Storage type. Allowed values: `local`, `network`.
                          Note: the `local` type is being deprecated.
                        example: network
                      size:
                        type: integer
                        description: >-
                          Storage size. Returned only when `type=local`. Note:
                          the `local` type is being deprecated.
                      mount_point:
                        type: string
                        description: 'Mount path. String, length: 0-4095 characters.'
                        example: /data
                envs:
                  type: array
                  description: Environment variable list.
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        description: 'Variable name. String, length: 0-511 characters.'
                        example: ENV_NAME
                      value:
                        type: string
                        description: 'Variable value. String, length: 0-4095 characters.'
                        example: ENV_VALUE
                ports:
                  type: array
                  items:
                    type: integer
                  description: 'Port list. Each value in range: [1, 65535].'
                  example:
                    - 8080
                health_check:
                  type: object
                  description: Health check configuration.
                  properties:
                    path:
                      type: string
                      description: Health check path.
                      example: /healthz
                    port:
                      type: integer
                      description: 'Health check port. Integer, range: [0, 65535].'
                      example: 8080
                region_id:
                  type: string
                  description: Region ID.
                  example: region-id
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the created Endpoint
                    example: endpoint-id

````