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

# Create reservation

> Create a reservation.



## OpenAPI

````yaml /openapi/reservation-openapi.yaml post /api/v2/reservations
openapi: 3.0.3
info:
  title: Unikorn Reservation API
  description: |-
    Reservation service provides topology-aware bare metal GPU reservation and
    placement, sitting atop UNI Region service resources.
  version: 0.5.0
servers:
  - url: https://reservation.nks.europe-west4.nscale.com
    description: Production
  - url: https://reservation.nks-stg.europe-west2.nscale.com
    description: Staging
  - url: https://reservation.nks-dev.glo1.nscale.com
    description: Development
security: []
paths:
  /api/v2/reservations:
    description: |-
      Manages project scoped reservations of one or more contiguous accelerator
      reservation units in a region.
    post:
      tags:
        - Reservations
      summary: Create reservation
      description: Create a reservation.
      operationId: createReservation
      requestBody:
        $ref: '#/components/requestBodies/reservationV2CreateRequest'
      responses:
        '202':
          $ref: '#/components/responses/reservationV2Response'
        '400':
          $ref: '#/components/responses/badRequestResponse'
        '401':
          $ref: '#/components/responses/unauthorizedResponse'
        '403':
          $ref: '#/components/responses/forbiddenResponse'
        '404':
          $ref: '#/components/responses/notFoundResponse'
        '500':
          $ref: '#/components/responses/internalServerErrorResponse'
        '507':
          $ref: '#/components/responses/insufficientCapacityResponse'
      security:
        - oauth2Authentication: []
components:
  requestBodies:
    reservationV2CreateRequest:
      description: A request to create a reservation.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/reservationV2Create'
          example:
            metadata:
              name: gb300-nvl72
              description: Reserved accelerator units for training
              tags:
                - name: workload
                  value: training
            spec:
              organizationId: 161b9d5a-701d-4fea-848d-0e345edf16e9
              projectId: f113be96-4dd2-4c14-9c0e-e96c500f21e0
              regionId: c7568e2d-f9ab-453d-9a3a-51375f78426b
              accelerator: GB300
              unit: NVL72
              count: 2
  responses:
    reservationV2Response:
      description: A reservation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/reservationV2Read'
          example:
            metadata:
              id: a64f9269-36e0-4312-b8d1-52d93d569b7b
              name: gb300-nvl72
              organizationId: 9a8c6370-4065-4d4a-9da0-7678df40cd9d
              projectId: e36c058a-8eba-4f5b-91f4-f6ffb983795c
              creationTime: '2026-04-28T10:45:45Z'
              createdBy: john.doe@example.com
              provisioningStatus: pending
              healthStatus: healthy
              tags:
                - name: workload
                  value: training
            spec:
              regionId: c7568e2d-f9ab-453d-9a3a-51375f78426b
              accelerator: GB300
              unit: NVL72
              count: 2
            status:
              machineFlavorId: g.72.gb300.pinned
              claimedUnitCount: 2
              topologyHash: >-
                sha256:4fd768f7a87c07aa81e7af8a765cdeaa0f7fe671052f3acbeec918522d026d2e
              topologyObservedAt: '2026-05-14T10:00:00Z'
    badRequestResponse:
      description: |-
        Request body failed schema validation, or the request does not contain
        all the required fields.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error: invalid_request
            error_description: request body invalid
            trace_id: 57bc14d9bd461f0b5a72db830149b67a
    unauthorizedResponse:
      description: Authentication failed or the access token has expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error: access_denied
            error_description: authentication failed
            trace_id: 57bc14d9bd461f0b5a72db830149b67a
    forbiddenResponse:
      description: >-
        Request was denied by authorization, this may be caused by the
        authorization

        token not having the required scope for an API, or the user doesn't have
        the

        necessary privileges on the provider platform.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error: forbidden
            error_description: user credentials do not have the required privileges
            trace_id: 57bc14d9bd461f0b5a72db830149b67a
    notFoundResponse:
      description: Unable to find a resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error: not_found
            error_description: the requested resource does not exist
            trace_id: 57bc14d9bd461f0b5a72db830149b67a
    internalServerErrorResponse:
      description: >-
        An unexpected or unhandled error occurred. This may be a transient error
        and

        may succeed on a retry.  If this isn't the case, please report it as an
        issue.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error: server_error
            error_description: failed to token claim
            trace_id: 57bc14d9bd461f0b5a72db830149b67a
    insufficientCapacityResponse:
      description: |-
        Insufficient capacity to satisfy the reservation. No contiguous set of
        reservation units of the requested size is available in the region.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
  schemas:
    reservationV2Create:
      description: A reservation creation request.
      type: object
      required:
        - metadata
        - spec
      properties:
        metadata:
          $ref: '#/components/schemas/resourceMetadata'
        spec:
          $ref: '#/components/schemas/reservationV2CreateSpec'
    reservationV2Read:
      description: A reservation.
      type: object
      required:
        - metadata
        - spec
        - status
      properties:
        metadata:
          $ref: '#/components/schemas/projectScopedResourceReadMetadata'
        spec:
          $ref: '#/components/schemas/reservationV2Spec'
        status:
          $ref: '#/components/schemas/reservationV2Status'
    error:
      description: Generic error message, compatible with oauth2.
      type: object
      required:
        - error
        - error_description
      properties:
        error:
          description: >-
            A terse error string expanding on the HTTP error code. Errors are
            based on the OAuth 2.02 specification, but are expanded with
            proprietary status codes for APIs other than those specified by
            OAuth 2.02.
          type: string
          enum:
            - invalid_request
            - server_error
            - access_denied
            - not_found
            - conflict
            - method_not_allowed
            - unsupported_media_type
            - request_entity_too_large
            - unprocessable_content
            - forbidden
        error_description:
          description: Verbose message describing the error.
          type: string
        trace_id:
          description: Unique trace identifier for the request.
          type: string
    resourceMetadata:
      description: Metadata required for all API resource reads and writes.
      required:
        - name
      properties:
        name:
          $ref: '#/components/schemas/kubernetesLabelValue'
        description:
          description: >-
            The resource description, this optionally augments the name with
            more context.
          type: string
        tags:
          $ref: '#/components/schemas/tagList'
    reservationV2CreateSpec:
      description: A reservation creation specification.
      type: object
      allOf:
        - $ref: '#/components/schemas/reservationV2Spec'
        - type: object
          required:
            - organizationId
            - projectId
          properties:
            organizationId:
              description: The organization to provision the reservation in.
              type: string
            projectId:
              description: The project to provision the reservation in.
              type: string
    projectScopedResourceReadMetadata:
      description: Metadata required by project scoped resource reads.
      allOf:
        - $ref: '#/components/schemas/organizationScopedResourceReadMetadata'
        - type: object
          required:
            - projectId
          properties:
            projectId:
              description: The project identifier the resource belongs to.
              type: string
    reservationV2Spec:
      description: A reservation's specification.
      type: object
      required:
        - regionId
        - accelerator
        - unit
        - count
      properties:
        regionId:
          description: The region to reserve capacity in.
          type: string
        accelerator:
          description: Public accelerator model or family to reserve.
          type: string
        unit:
          description: Public reservation granularity to reserve.
          type: string
        count:
          description: Number of reservation units to reserve.
          type: integer
          minimum: 1
    reservationV2Status:
      description: Read only status information about a reservation.
      type: object
      required:
        - machineFlavorId
        - claimedUnitCount
      properties:
        machineFlavorId:
          description: Resolved Region machine flavor used for pinned servers.
          type: string
        claimedUnitCount:
          description: Number of reservation units successfully claimed.
          type: integer
          minimum: 0
        topologyHash:
          description: Hash of the claimed topology projection accepted by the reservation.
          type: string
        topologyObservedAt:
          description: Time when the claimed topology projection was last observed.
          type: string
          format: date-time
    kubernetesLabelValue:
      description: >-
        A valid Kubernetes label value, typically used for resource names that
        can be

        indexed in the database.
      type: string
      pattern: ^[0-9A-Za-z](?:[0-9A-Za-z-_.]{0,61}[0-9A-Za-z])?$
    tagList:
      description: A list of tags.
      type: array
      items:
        $ref: '#/components/schemas/tag'
    organizationScopedResourceReadMetadata:
      description: Metadata required by organization scoped resource reads.
      allOf:
        - $ref: '#/components/schemas/resourceReadMetadata'
        - type: object
          required:
            - organizationId
          properties:
            organizationId:
              description: The organization identifier the resource belongs to.
              type: string
    tag:
      description: >-
        A tag mapping arbitrary names to values.  These have no special meaning

        for any component are are intended for use by end users to add
        additional

        context to a resource, for example to categorize it.
      type: object
      required:
        - name
        - value
      properties:
        name:
          description: A unique tag name.
          type: string
        value:
          description: The value of the tag.
          type: string
    resourceReadMetadata:
      description: Metadata required by all resource reads.
      allOf:
        - $ref: '#/components/schemas/staticResourceMetadata'
        - type: object
          required:
            - provisioningStatus
            - healthStatus
          properties:
            deletionTime:
              description: The time the resource was deleted.
              type: string
              format: date-time
            provisioningStatus:
              $ref: '#/components/schemas/resourceProvisioningStatus'
            healthStatus:
              $ref: '#/components/schemas/resourceHealthStatus'
    staticResourceMetadata:
      description: |
        This metadata is for resources that just exist, and don't require
        any provisioning and health status, but benefit from a standardized
        metadata format.
      type: object
      allOf:
        - $ref: '#/components/schemas/resourceMetadata'
        - type: object
          required:
            - id
            - creationTime
          properties:
            id:
              description: The unique resource ID.
              type: string
            creationTime:
              description: The time the resource was created.
              type: string
              format: date-time
            createdBy:
              description: The user who created the resource.
              type: string
            modifiedTime:
              description: The time a resource was updated.
              type: string
              format: date-time
            modifiedBy:
              description: The user who updated the resource.
              type: string
    resourceProvisioningStatus:
      description: The provisioning state of a resource.
      type: string
      enum:
        - unknown
        - pending
        - provisioning
        - provisioned
        - deprovisioning
        - error
    resourceHealthStatus:
      description: The health state of a resource.
      type: string
      enum:
        - unknown
        - healthy
        - degraded
        - error
  securitySchemes:
    oauth2Authentication:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: /oauth2/v2/authorization
          tokenUrl: /oauth2/v2/token
          scopes: {}

````