> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/infra-controller/llms.txt.
> For full documentation content, see https://docs.nvidia.com/infra-controller/llms-full.txt.

# Batch Create Instances

POST https://carbide-rest-api.carbide.svc.cluster.local/v2/org/{org}/carbide/instance/batch
Content-Type: application/json

Batch create multiple Instances for Tenant with NVLink domain-aware machine allocation.

This endpoint creates multiple instances in a single atomic transaction. All instances share the same configuration (interfaces, OS, SSH keys, etc.) but are assigned different machines.

When `topologyOptimized` is true (default), all instances must be allocated on machines within the same NVLink domain. If insufficient machines are available in a single NVLink domain, the request will fail.

When `topologyOptimized` is false, instances can be spread across different NVLink domains.

Instance names are automatically generated using the `namePrefix` with a random 6-character suffix (e.g., "worker" becomes "worker-abc123", "worker-def456").

Org must have a Tenant entity. User must have `FORGE_TENANT_ADMIN` authorization role.


Reference: https://docs.nvidia.com/infra-controller/infra-controller/rest-api-reference/api-reference/instance/batch-create-instance

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: NCX Infra Controller REST API
  version: 1.0.0
paths:
  /v2/org/{org}/carbide/instance/batch:
    post:
      operationId: batch-create-instance
      summary: Batch Create Instances
      description: >
        Batch create multiple Instances for Tenant with NVLink domain-aware
        machine allocation.


        This endpoint creates multiple instances in a single atomic transaction.
        All instances share the same configuration (interfaces, OS, SSH keys,
        etc.) but are assigned different machines.


        When `topologyOptimized` is true (default), all instances must be
        allocated on machines within the same NVLink domain. If insufficient
        machines are available in a single NVLink domain, the request will fail.


        When `topologyOptimized` is false, instances can be spread across
        different NVLink domains.


        Instance names are automatically generated using the `namePrefix` with a
        random 6-character suffix (e.g., "worker" becomes "worker-abc123",
        "worker-def456").


        Org must have a Tenant entity. User must have `FORGE_TENANT_ADMIN`
        authorization role.
      tags:
        - subpackage_instance
      parameters:
        - name: org
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            ```

            export JWT_BEARER_TOKEN="<jwt-bearer-token>"


            # Example org name: "acme-inc

            export ORG_NAME=<org-name>


            # Use the JWT bearer token in your API request auth header:

            curl -v -X GET -H "Content-Type: application/json" -H
            "Authorization: Bearer $JWT_BEARER_TOKEN"
            https://carbide-rest-api.carbide.svc.cluster.local/v2/org/$ORG_NAME/carbide/user/current

            ```
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Instance'
        '400':
          description: Error response when request data cannot be validated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarbideAPIError'
        '403':
          description: >-
            Error response when user is not authorized to call an endpoint or
            retrieve/modify objects
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarbideAPIError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchInstanceCreateRequest'
servers:
  - url: https://carbide-rest-api.carbide.svc.cluster.local
components:
  schemas:
    Labels:
      type: object
      additionalProperties:
        type: string
      title: Labels
    InterfaceCreateRequest:
      type: object
      properties:
        subnetId:
          type: string
          format: uuid
        vpcPrefixId:
          type: string
          format: uuid
        ipAddress:
          type:
            - string
            - 'null'
          description: >-
            Explicitly requested IP address for the interface. It cannot be
            specified for Subnet based interfaces. The least-significant host
            bit must be 1.
        isPhysical:
          type: boolean
          description: >-
            Specifies whether this Subnet or VPC Prefix should be attached to
            the Instance over physical interface.
        device:
          type: string
          description: Name of the device to use
        deviceInstance:
          type: integer
          description: >-
            Index of the device, used to identify which interface card to
            attache the Partition to
        virtualFunctionId:
          type:
            - integer
            - 'null'
          description: >-
            Index of the virtual function to use, must be specified if
            isPhysical is false
      description: >-
        Request data to create an Interface for an Instance by associating it
        with a Subnet or VPC Prefix.


        If VPC specified in request has FNN virtualization type, then all
        interfaces must specify VPC Prefix.


        If the VPC has Ethernet network virtualization type then all interfaces
        must specify Subnet.
      title: InterfaceCreateRequest
    InfiniBandInterfaceCreateRequest:
      type: object
      properties:
        partitionId:
          type: string
          format: uuid
          description: ID of the Partition the Interface should attach to
        device:
          type: string
          description: Name of the InfiniBand device to use
        vendor:
          type:
            - string
            - 'null'
          description: Name of the InfiniBand device vendor, optional
        deviceInstance:
          type: integer
          description: >-
            Index of the device, used to identify which interface card to
            attache the Partition to
        isPhysical:
          type: boolean
          description: >-
            Specifies whether this Partition should be attached to the Instance
            over physical interface
        virtualFunctionId:
          type:
            - integer
            - 'null'
          description: Must be specified if isPhysical is false
      description: >-
        Request data to create an InfiniBand Interface for an Instance by
        associating it with an InfiniBand Partition
      title: InfiniBandInterfaceCreateRequest
    DpuExtensionServiceDeploymentRequest:
      type: object
      properties:
        dpuExtensionServiceId:
          type: string
          format: uuid
          description: ID of the DPU Extension Service to deploy
        version:
          type: string
          description: Version of the DPU Extension Service to deploy
      description: >-
        Request data to deploy of a specific version of a DPU Extension Service
        on DPUs of an Instance
      title: DpuExtensionServiceDeploymentRequest
    NVLinkInterfaceCreateRequest:
      type: object
      properties:
        nvLinklogicalPartitionId:
          type: string
          format: uuid
          description: ID of the NVLink Logical Partition the Interface should attach to
        deviceInstance:
          type: integer
          description: >-
            GPU index for this NVLink interface. Must be non-negative, unique
            within the request, and within the GPU count exposed by the selected
            Machine or Instance Type.
      description: >-
        Request data to create an NVLink Interface for an Instance by
        associating a specific GPU index with an NVLink Logical Partition.
      title: NVLinkInterfaceCreateRequest
    BatchInstanceCreateRequest:
      type: object
      properties:
        namePrefix:
          type: string
          description: >-
            Prefix for instance names. Instances will be named with this prefix
            followed by a random 6-character suffix (e.g., "worker" becomes
            "worker-abc123")
        count:
          type: integer
          description: >-
            Number of instances to create in this batch. Minimum 2, maximum 18
            (limited by topology domain size)
        description:
          type:
            - string
            - 'null'
          description: Description applied to all instances in the batch, optional
        tenantId:
          type: string
          format: uuid
          description: ID of the Tenant creating the Instances
        instanceTypeId:
          type: string
          format: uuid
          description: ID of the Instance Type to use for all Instances in the batch
        vpcId:
          type: string
          format: uuid
          description: ID of the VPC the Instances should belong to
        secondaryVpcIds:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            IDs of additional VPCs the Instances should attach to through
            non-primary interfaces. This field may only be specified when every
            entry in `interfaces` uses `vpcPrefixId`. IDs must be unique, must
            be valid UUIDs, and must not include the primary `vpcId`.
        userData:
          type:
            - string
            - 'null'
          description: >-
            User data applied to all instances. Can only be specified if
            allowOverride is set to true in Operating System
        operatingSystemId:
          type:
            - string
            - 'null'
          format: uuid
          description: Must be specified if iPXE Script field is empty
        networkSecurityGroupId:
          type:
            - string
            - 'null'
          format: uuid
          description: ID of a Network Security Group to attach to all instances
        ipxeScript:
          type:
            - string
            - 'null'
          description: >-
            Override iPXE script specified in OS, must be specified if Operating
            System is not specified
        alwaysBootWithCustomIpxe:
          type: boolean
          description: >-
            When set to true, the iPXE script specified by OS or overridden here
            will always be run when rebooting the Instances. OS must be of iPXE
            type.
        phoneHomeEnabled:
          type: boolean
          description: >-
            When set to true, the Instances will be enabled with the Phone Home
            service.
        labels:
          $ref: '#/components/schemas/Labels'
        interfaces:
          type: array
          items:
            $ref: '#/components/schemas/InterfaceCreateRequest'
          description: >-
            Interface configuration shared across all instances. At least one
            interface must be specified. Either Subnet or VPC Prefix interfaces
            allowed, only one of the Subnets or VPC Prefixes can be attached
            over Physical interface. Interface `ipAddress` is not supported for
            batch instance creation requests.
        infinibandInterfaces:
          type: array
          items:
            $ref: '#/components/schemas/InfiniBandInterfaceCreateRequest'
          description: InfiniBand interface configuration shared across all instances
        dpuExtensionServiceDeployments:
          type: array
          items:
            $ref: '#/components/schemas/DpuExtensionServiceDeploymentRequest'
          description: DPU Extension Services to deploy to all instances in the batch
        nvLinkInterfaces:
          type: array
          items:
            $ref: '#/components/schemas/NVLinkInterfaceCreateRequest'
          description: >-
            NVLink interface configuration shared across all instances. A subset
            of GPUs may be specified. Each item references one GPU index
            (`deviceInstance`) and one NVLink Logical Partition. Different
            interfaces may reference different NVLink Logical Partitions.
        sshKeyGroupIds:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            SSH Key Group IDs that will provide Serial over LAN access to all
            instances
        topologyOptimized:
          type: boolean
          default: true
          description: >-
            When true (default), all instances must be allocated on machines
            within the same NVLink domain. When false, instances can be spread
            across different NVLink domains.
      required:
        - namePrefix
        - count
        - tenantId
        - instanceTypeId
        - vpcId
        - interfaces
      description: >-
        Request data to batch create multiple Instances with topology-optimized
        machine allocation. Explicit interface `ipAddress` values are not
        supported in batch requests.
      title: BatchInstanceCreateRequest
    NetworkSecurityGroupPropagationDetailsDetailedStatus:
      type: string
      enum:
        - None
        - Partial
        - Full
        - Unknown
        - Error
      title: NetworkSecurityGroupPropagationDetailsDetailedStatus
    NetworkSecurityGroupPropagationStatus:
      type: string
      enum:
        - Synchronizing
        - Synchronized
        - Error
      description: Status values for Network Security Group propagation
      title: NetworkSecurityGroupPropagationStatus
    NetworkSecurityGroupPropagationDetails:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The VPC or Instance ID
        detailedStatus:
          $ref: >-
            #/components/schemas/NetworkSecurityGroupPropagationDetailsDetailedStatus
        status:
          $ref: '#/components/schemas/NetworkSecurityGroupPropagationStatus'
        details:
          type:
            - string
            - 'null'
        unpropagatedInstanceIds:
          type: array
          items:
            type: string
            format: uuid
        relatedInstanceIds:
          type: array
          items:
            type: string
            format: uuid
      description: The Network Security Group propagation details for a VPC or Instance
      title: NetworkSecurityGroupPropagationDetails
    InterfaceStatus:
      type: string
      enum:
        - Pending
        - Provisioning
        - Ready
        - Deleting
        - Error
      description: Status values for Interface objects
      title: InterfaceStatus
    Interface:
      type: object
      properties:
        id:
          type: string
          format: uuid
        instanceId:
          type: string
          format: uuid
        subnetId:
          type:
            - string
            - 'null'
          format: uuid
        vpcPrefixId:
          type:
            - string
            - 'null'
          format: uuid
        isPhysical:
          type: boolean
        device:
          type:
            - string
            - 'null'
          description: Name of the device to use
        deviceInstance:
          type:
            - integer
            - 'null'
          description: >-
            Index of the device, used to identify which interface card to
            attache the Partition to
        virtualFunctionId:
          type:
            - integer
            - 'null'
          description: Must be specified if isPhysical is false
        macAddress:
          type:
            - string
            - 'null'
        ipAddresses:
          type: array
          items:
            type: string
          description: A list of IPv4 or IPv6 addresses
        requestedIpAddress:
          type:
            - string
            - 'null'
          description: >-
            Explicitly requested IP address for the interface. This is only used
            for VPC Prefix based interfaces and is not valid for Subnet based
            interfaces. The least-significant host bit must be 1.
        status:
          $ref: '#/components/schemas/InterfaceStatus'
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
      description: Associates an Instance with a Subnet
      title: Interface
    InfiniBandInterfaceStatus:
      type: string
      enum:
        - Pending
        - Provisioning
        - Ready
        - Deleting
        - Error
      description: Status values for InfiniBand Interface objects
      title: InfiniBandInterfaceStatus
    InfiniBandInterface:
      type: object
      properties:
        id:
          type: string
          format: uuid
        instanceId:
          type: string
          format: uuid
        partitionId:
          type: string
          format: uuid
          description: ID of the InfiniBand Partition associated with this interface
        device:
          type: string
          description: Name of the InfiniBand device associated with this interface
        deviceInstance:
          type: integer
        isPhysical:
          type: boolean
          description: Indicates whether this is a physical interface
        virtualFunctionId:
          type:
            - integer
            - 'null'
        guid:
          type:
            - string
            - 'null'
        status:
          $ref: '#/components/schemas/InfiniBandInterfaceStatus'
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
      description: >-
        Defines an interface created by associating an Instance with an
        InfiniBand Partition
      title: InfiniBandInterface
    NVLinkInterfaceStatus:
      type: string
      enum:
        - Pending
        - Provisioning
        - Ready
        - Deleting
        - Error
      description: Status values for NVLink Interface objects
      title: NVLinkInterfaceStatus
    NVLinkInterface:
      type: object
      properties:
        id:
          type: string
          format: uuid
        instanceId:
          type: string
          format: uuid
        nvLinkLogicalPartitionId:
          type: string
          format: uuid
          description: ID of the NVLink Logical Partition associated with this interface
        nvLinkDomainId:
          type: string
          format: uuid
          description: ID of the NVLink Domain associated with this Interface
        deviceInstance:
          type: integer
          description: >-
            Index of the device, used to identify the GPU associated with this
            Interface
        gpuGuid:
          type: string
          description: Unique ID of the GPU
        status:
          $ref: '#/components/schemas/NVLinkInterfaceStatus'
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
      description: >-
        Defines an interface created by associating a GPU of an Instance with an
        NVLink Logical Partition
      title: NVLinkInterface
    DpuExtensionServiceSummaryServiceType:
      type: string
      enum:
        - KubernetesPod
      description: Type of the DPU Extension Service
      title: DpuExtensionServiceSummaryServiceType
    DpuExtensionServiceStatus:
      type: string
      enum:
        - Pending
        - Ready
        - Error
        - Deleting
      description: Status values for DPU Extension Service objects
      title: DpuExtensionServiceStatus
    DpuExtensionServiceSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the DPU Extension Service
        name:
          type: string
          description: >-
            Name for the DPU Extension Service. Must be unique for a given
            Tenant
        serviceType:
          $ref: '#/components/schemas/DpuExtensionServiceSummaryServiceType'
          description: Type of the DPU Extension Service
        latestVersion:
          type:
            - string
            - 'null'
          description: Latest version of the DPU Extension Service
        status:
          $ref: '#/components/schemas/DpuExtensionServiceStatus'
          description: Status of the DPU Extension Service
      description: >-
        DPU Extension Service allows user defined services to run on DPUs of
        their Instances
      title: DpuExtensionServiceSummary
    DpuExtensionServiceDeploymentStatus:
      type: string
      enum:
        - Pending
        - Running
        - Error
        - Failed
        - Terminating
      description: Status values for DPU Extension Service Deployment objects
      title: DpuExtensionServiceDeploymentStatus
    DpuExtensionServiceDeployment:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the DPU Extension Service Deployment
        dpuExtensionService:
          $ref: '#/components/schemas/DpuExtensionServiceSummary'
          description: >-
            Summary of the DPU Extension Service. Deployed version may be
            different
        version:
          type: string
          description: Deployed version of the DPU Extension Service
        status:
          $ref: '#/components/schemas/DpuExtensionServiceDeploymentStatus'
          description: Status of the DPU Extension Service Deployment
        created:
          type: string
          format: date-time
          description: >-
            Date/time when this version of the DPU Extension Service Deployment
            was created
        updated:
          type: string
          format: date-time
          description: >-
            Date/time when this version of the DPU Extension Service Deployment
            was updated
      description: Describes a deployment of a DPU Extension Service on DPUs of an Instance
      title: DpuExtensionServiceDeployment
    SshKey:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the key
        name:
          type: string
        org:
          type: string
        tenantId:
          type: string
          format: uuid
        fingerprint:
          type: string
          description: SHA256 fingerprint of the public key
        created:
          type: string
          format: date-time
          description: Date/time when the SSH key was created
        updated:
          type: string
          format: date-time
          description: Date/time when the SSH key was last updated
      description: Details of SSH public key
      title: SshKey
    SiteCapabilities:
      type: object
      properties:
        nativeNetworking:
          type: boolean
        networkSecurityGroup:
          type: boolean
        nvLinkPartition:
          type: boolean
        rackLevelAdministration:
          type: boolean
        imageBasedOperatingSystem:
          type: boolean
      description: Boolean flags to indicate features supported by a Site
      title: SiteCapabilities
    SiteStatus:
      type: string
      enum:
        - Pending
        - Registered
        - Error
      description: Status values for Site objects
      title: SiteStatus
    SiteSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          description: Name of the Site
        infrastructureProviderId:
          type: string
          format: uuid
        isSerialConsoleEnabled:
          type: boolean
          description: Indicates if Serial Console is enabled for the Site by the Provider
        isOnline:
          type: boolean
          description: Indicates if the Site is currently reachable from Cloud
        capabilities:
          $ref: '#/components/schemas/SiteCapabilities'
        status:
          $ref: '#/components/schemas/SiteStatus'
      description: >-
        SiteSummary contains a subset of data for Site object, used when nesting
        in other objects
      title: SiteSummary
    SshKeyGroupSiteAssociationStatus:
      type: string
      enum:
        - Syncing
        - Synced
        - Pending
        - Error
        - Deleting
      description: Status values for SSH Key Group Site Association objects
      title: SshKeyGroupSiteAssociationStatus
    SshKeyGroupSiteAssociation:
      type: object
      properties:
        site:
          $ref: '#/components/schemas/SiteSummary'
        status:
          $ref: '#/components/schemas/SshKeyGroupSiteAssociationStatus'
        version:
          type: string
          description: Version of the Key Group on Site
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
      description: Describes the relationship between an SSH Key Group and a Site
      title: SshKeyGroupSiteAssociation
    SshKeyGroupStatus:
      type: string
      enum:
        - Syncing
        - Synced
        - Error
        - Deleting
      description: Status values for SSH Key Group objects
      title: SshKeyGroupStatus
    StatusDetail:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
      description: Describes the details of a status transition for a resource
      title: StatusDetail
    SshKeyGroup:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the SSH Key Group
        name:
          type: string
          description: Name of the SSH Key Group
        description:
          type:
            - string
            - 'null'
          description: Description for the SSH Key Group, optional
        org:
          type: string
          description: Organization this SSH Key Group belongs to
        tenantId:
          type: string
          format: uuid
          description: ID of the Tenane the SSH Key Group belongs to
        version:
          type: string
          description: Version of the SSH Key Group
        sshKeys:
          type: array
          items:
            $ref: '#/components/schemas/SshKey'
          description: SSH Keys associated with this SSH Key Group
        siteAssociations:
          type: array
          items:
            $ref: '#/components/schemas/SshKeyGroupSiteAssociation'
          description: Sites the SSH Key Group is synced to
        status:
          $ref: '#/components/schemas/SshKeyGroupStatus'
          description: Status of the SSH Key Group
        statusHistory:
          type: array
          items:
            $ref: '#/components/schemas/StatusDetail'
          description: History of the SSH Key Group states
        created:
          type: string
          format: date-time
          description: Date/time when the SSH key was created
        updated:
          type: string
          format: date-time
          description: Date/time when the SSH key was last updated
      description: Describes the model that groups SSH Keys
      title: SshKeyGroup
    InstanceStatus:
      type: string
      enum:
        - Pending
        - Provisioning
        - Configuring
        - Ready
        - Updating
        - Rebooting
        - Terminating
        - Error
      description: Status values for Instance objects
      title: InstanceStatus
    Deprecation:
      type: object
      properties:
        attribute:
          type:
            - string
            - 'null'
        queryParam:
          type:
            - string
            - 'null'
        endpoint:
          type:
            - string
            - 'null'
        replacedBy:
          type:
            - string
            - 'null'
        takeActionBy:
          type: string
          format: date-time
        notice:
          type: string
      description: Details of a particular deprecation in NCX Infra Controller API
      title: Deprecation
    Instance:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the Instance
        name:
          type: string
          description: Name for the Instance
        description:
          type: string
          description: Description for the Instance
        tenantId:
          type: string
          format: uuid
          description: ID of the Tenant the Instance belongs to
        infrastructureProviderId:
          type: string
          format: uuid
          description: >-
            ID of the Infrastructure Provider that owns the Site where the
            Instance is located
        siteId:
          type: string
          format: uuid
          description: ID of the Site where the Instance is located
        instanceTypeId:
          type: string
          format: uuid
        vpcId:
          type: string
          format: uuid
        secondaryVpcIds:
          type: array
          items:
            type: string
            format: uuid
          description: IDs of VPCs attached to the Instance through non-primary interfaces
        machineId:
          type:
            - string
            - 'null'
        operatingSystemId:
          type: string
          format: uuid
        networkSecurityGroupId:
          type:
            - string
            - 'null'
        networkSecurityGroupPropagationDetails:
          $ref: '#/components/schemas/NetworkSecurityGroupPropagationDetails'
          description: Propagation details for the attached Network Security Group
        networkSecurityGroupInherited:
          type: boolean
          description: Indicates if the Network Security Group is inherited from VPC
        controllerInstanceId:
          type:
            - string
            - 'null'
          format: uuid
        ipxeScript:
          type:
            - string
            - 'null'
        alwaysBootWithCustomIpxe:
          type: boolean
          description: >-
            Indicates whether the Instance should always execute custom iPXE
            script when rebooting
        phoneHomeEnabled:
          type: boolean
          description: >-
            Indicates whether the Phone Home service should be enabled or
            disabled for Instance
        userData:
          type:
            - string
            - 'null'
        labels:
          $ref: '#/components/schemas/Labels'
        isUpdatePending:
          type: boolean
          description: >-
            Indicates whether an update is available for the Instance. Updates
            can be applied on reboot
        serialConsoleUrl:
          type:
            - string
            - 'null'
          description: >-
            Serial Console URL for the Instance. Format:
            ssh://<id>@siteSerialConsoleHostname
        interfaces:
          type: array
          items:
            $ref: '#/components/schemas/Interface'
        infinibandInterfaces:
          type: array
          items:
            $ref: '#/components/schemas/InfiniBandInterface'
        nvLinkInterfaces:
          type: array
          items:
            $ref: '#/components/schemas/NVLinkInterface'
        dpuExtensionServiceDeployments:
          type: array
          items:
            $ref: '#/components/schemas/DpuExtensionServiceDeployment'
          description: DPU Extension Services deployed on DPUs of this Instance
        sshKeyGroupIds:
          type: array
          items:
            type: string
            format: uuid
          description: IDs of SSH Key Groups associated with this Instance
        sshKeyGroups:
          type: array
          items:
            $ref: '#/components/schemas/SshKeyGroup'
          description: IDs of SSH Key Groups associated with this Instance
        tpmEkCertificate:
          type:
            - string
            - 'null'
          description: base64 encoded TPM EK Certificate associated with this Instance
        status:
          $ref: '#/components/schemas/InstanceStatus'
        statusHistory:
          type: array
          items:
            $ref: '#/components/schemas/StatusDetail'
        deprecations:
          type: array
          items:
            $ref: '#/components/schemas/Deprecation'
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
      description: Instance is a baremetal Machine that has been provisioned for a Tenant
      title: Instance
    CarbideApiErrorSource:
      type: string
      enum:
        - carbide
      description: Source of the error. Only 'carbide' is supported
      title: CarbideApiErrorSource
    CarbideApiErrorData:
      type: object
      properties: {}
      description: Additional data about the error
      title: CarbideApiErrorData
    CarbideAPIError:
      type: object
      properties:
        source:
          $ref: '#/components/schemas/CarbideApiErrorSource'
          description: Source of the error. Only 'carbide' is supported
        message:
          type: string
          description: Message describing the error
        data:
          oneOf:
            - $ref: '#/components/schemas/CarbideApiErrorData'
            - type: 'null'
          description: Additional data about the error
      description: Describes the error response from NCX Infra Controller REST API
      title: CarbideAPIError
  securitySchemes:
    JWTBearerToken:
      type: http
      scheme: bearer
      description: >-
        ```

        export JWT_BEARER_TOKEN="<jwt-bearer-token>"


        # Example org name: "acme-inc

        export ORG_NAME=<org-name>


        # Use the JWT bearer token in your API request auth header:

        curl -v -X GET -H "Content-Type: application/json" -H "Authorization:
        Bearer $JWT_BEARER_TOKEN"
        https://carbide-rest-api.carbide.svc.cluster.local/v2/org/$ORG_NAME/carbide/user/current

        ```

```

## SDK Code Examples

```python Batch created Instances
import requests

url = "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch"

headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Batch created Instances
const url = 'https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Batch created Instances
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Batch created Instances
require 'uri'
require 'net/http'

url = URI("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Batch created Instances
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Batch created Instances
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Batch created Instances
using RestSharp;

var client = new RestClient("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Batch created Instances
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

```python Topology-optimized batch with InfiniBand
import requests

url = "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch"

payload = {
    "namePrefix": "gpu-worker",
    "count": 4,
    "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
    "instanceTypeId": "41e36058-8403-4086-a9b8-39cb5bc9cb98",
    "vpcId": "5e28ad7c-5fb7-46d6-a28a-fc0ba6fdc4a3",
    "interfaces": [
        {
            "subnetId": "1f232bf0-7b90-456e-b9b0-38d9fea4171a",
            "isPhysical": True
        }
    ],
    "description": "GPU worker nodes for distributed training",
    "operatingSystemId": "eaeb86ee-c435-444e-9e01-8346f67f194b",
    "infinibandInterfaces": [
        {
            "partitionId": "4f4decba-7d7f-46b9-9e5f-e5d71c2e0666",
            "device": "MT2910 Family [ConnectX-7]",
            "deviceInstance": 0,
            "isPhysical": True
        }
    ],
    "nvLinkInterfaces": [
        {
            "deviceInstance": 0,
            "nvLinkLogicalPartitionId": "2f8676fd-d228-4db5-ac76-1cfc74f48a23"
        },
        {
            "deviceInstance": 1,
            "nvLinkLogicalPartitionId": "2f8676fd-d228-4db5-ac76-1cfc74f48a23"
        }
    ],
    "sshKeyGroupIds": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
    "topologyOptimized": True
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Topology-optimized batch with InfiniBand
const url = 'https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"namePrefix":"gpu-worker","count":4,"tenantId":"f97df110-f4de-492e-8849-4a6af68026b0","instanceTypeId":"41e36058-8403-4086-a9b8-39cb5bc9cb98","vpcId":"5e28ad7c-5fb7-46d6-a28a-fc0ba6fdc4a3","interfaces":[{"subnetId":"1f232bf0-7b90-456e-b9b0-38d9fea4171a","isPhysical":true}],"description":"GPU worker nodes for distributed training","operatingSystemId":"eaeb86ee-c435-444e-9e01-8346f67f194b","infinibandInterfaces":[{"partitionId":"4f4decba-7d7f-46b9-9e5f-e5d71c2e0666","device":"MT2910 Family [ConnectX-7]","deviceInstance":0,"isPhysical":true}],"nvLinkInterfaces":[{"deviceInstance":0,"nvLinkLogicalPartitionId":"2f8676fd-d228-4db5-ac76-1cfc74f48a23"},{"deviceInstance":1,"nvLinkLogicalPartitionId":"2f8676fd-d228-4db5-ac76-1cfc74f48a23"}],"sshKeyGroupIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"topologyOptimized":true}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Topology-optimized batch with InfiniBand
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch"

	payload := strings.NewReader("{\n  \"namePrefix\": \"gpu-worker\",\n  \"count\": 4,\n  \"tenantId\": \"f97df110-f4de-492e-8849-4a6af68026b0\",\n  \"instanceTypeId\": \"41e36058-8403-4086-a9b8-39cb5bc9cb98\",\n  \"vpcId\": \"5e28ad7c-5fb7-46d6-a28a-fc0ba6fdc4a3\",\n  \"interfaces\": [\n    {\n      \"subnetId\": \"1f232bf0-7b90-456e-b9b0-38d9fea4171a\",\n      \"isPhysical\": true\n    }\n  ],\n  \"description\": \"GPU worker nodes for distributed training\",\n  \"operatingSystemId\": \"eaeb86ee-c435-444e-9e01-8346f67f194b\",\n  \"infinibandInterfaces\": [\n    {\n      \"partitionId\": \"4f4decba-7d7f-46b9-9e5f-e5d71c2e0666\",\n      \"device\": \"MT2910 Family [ConnectX-7]\",\n      \"deviceInstance\": 0,\n      \"isPhysical\": true\n    }\n  ],\n  \"nvLinkInterfaces\": [\n    {\n      \"deviceInstance\": 0,\n      \"nvLinkLogicalPartitionId\": \"2f8676fd-d228-4db5-ac76-1cfc74f48a23\"\n    },\n    {\n      \"deviceInstance\": 1,\n      \"nvLinkLogicalPartitionId\": \"2f8676fd-d228-4db5-ac76-1cfc74f48a23\"\n    }\n  ],\n  \"sshKeyGroupIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"topologyOptimized\": true\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Topology-optimized batch with InfiniBand
require 'uri'
require 'net/http'

url = URI("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"namePrefix\": \"gpu-worker\",\n  \"count\": 4,\n  \"tenantId\": \"f97df110-f4de-492e-8849-4a6af68026b0\",\n  \"instanceTypeId\": \"41e36058-8403-4086-a9b8-39cb5bc9cb98\",\n  \"vpcId\": \"5e28ad7c-5fb7-46d6-a28a-fc0ba6fdc4a3\",\n  \"interfaces\": [\n    {\n      \"subnetId\": \"1f232bf0-7b90-456e-b9b0-38d9fea4171a\",\n      \"isPhysical\": true\n    }\n  ],\n  \"description\": \"GPU worker nodes for distributed training\",\n  \"operatingSystemId\": \"eaeb86ee-c435-444e-9e01-8346f67f194b\",\n  \"infinibandInterfaces\": [\n    {\n      \"partitionId\": \"4f4decba-7d7f-46b9-9e5f-e5d71c2e0666\",\n      \"device\": \"MT2910 Family [ConnectX-7]\",\n      \"deviceInstance\": 0,\n      \"isPhysical\": true\n    }\n  ],\n  \"nvLinkInterfaces\": [\n    {\n      \"deviceInstance\": 0,\n      \"nvLinkLogicalPartitionId\": \"2f8676fd-d228-4db5-ac76-1cfc74f48a23\"\n    },\n    {\n      \"deviceInstance\": 1,\n      \"nvLinkLogicalPartitionId\": \"2f8676fd-d228-4db5-ac76-1cfc74f48a23\"\n    }\n  ],\n  \"sshKeyGroupIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"topologyOptimized\": true\n}"

response = http.request(request)
puts response.read_body
```

```java Topology-optimized batch with InfiniBand
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"namePrefix\": \"gpu-worker\",\n  \"count\": 4,\n  \"tenantId\": \"f97df110-f4de-492e-8849-4a6af68026b0\",\n  \"instanceTypeId\": \"41e36058-8403-4086-a9b8-39cb5bc9cb98\",\n  \"vpcId\": \"5e28ad7c-5fb7-46d6-a28a-fc0ba6fdc4a3\",\n  \"interfaces\": [\n    {\n      \"subnetId\": \"1f232bf0-7b90-456e-b9b0-38d9fea4171a\",\n      \"isPhysical\": true\n    }\n  ],\n  \"description\": \"GPU worker nodes for distributed training\",\n  \"operatingSystemId\": \"eaeb86ee-c435-444e-9e01-8346f67f194b\",\n  \"infinibandInterfaces\": [\n    {\n      \"partitionId\": \"4f4decba-7d7f-46b9-9e5f-e5d71c2e0666\",\n      \"device\": \"MT2910 Family [ConnectX-7]\",\n      \"deviceInstance\": 0,\n      \"isPhysical\": true\n    }\n  ],\n  \"nvLinkInterfaces\": [\n    {\n      \"deviceInstance\": 0,\n      \"nvLinkLogicalPartitionId\": \"2f8676fd-d228-4db5-ac76-1cfc74f48a23\"\n    },\n    {\n      \"deviceInstance\": 1,\n      \"nvLinkLogicalPartitionId\": \"2f8676fd-d228-4db5-ac76-1cfc74f48a23\"\n    }\n  ],\n  \"sshKeyGroupIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"topologyOptimized\": true\n}")
  .asString();
```

```php Topology-optimized batch with InfiniBand
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch', [
  'body' => '{
  "namePrefix": "gpu-worker",
  "count": 4,
  "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  "instanceTypeId": "41e36058-8403-4086-a9b8-39cb5bc9cb98",
  "vpcId": "5e28ad7c-5fb7-46d6-a28a-fc0ba6fdc4a3",
  "interfaces": [
    {
      "subnetId": "1f232bf0-7b90-456e-b9b0-38d9fea4171a",
      "isPhysical": true
    }
  ],
  "description": "GPU worker nodes for distributed training",
  "operatingSystemId": "eaeb86ee-c435-444e-9e01-8346f67f194b",
  "infinibandInterfaces": [
    {
      "partitionId": "4f4decba-7d7f-46b9-9e5f-e5d71c2e0666",
      "device": "MT2910 Family [ConnectX-7]",
      "deviceInstance": 0,
      "isPhysical": true
    }
  ],
  "nvLinkInterfaces": [
    {
      "deviceInstance": 0,
      "nvLinkLogicalPartitionId": "2f8676fd-d228-4db5-ac76-1cfc74f48a23"
    },
    {
      "deviceInstance": 1,
      "nvLinkLogicalPartitionId": "2f8676fd-d228-4db5-ac76-1cfc74f48a23"
    }
  ],
  "sshKeyGroupIds": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "topologyOptimized": true
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Topology-optimized batch with InfiniBand
using RestSharp;

var client = new RestClient("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"namePrefix\": \"gpu-worker\",\n  \"count\": 4,\n  \"tenantId\": \"f97df110-f4de-492e-8849-4a6af68026b0\",\n  \"instanceTypeId\": \"41e36058-8403-4086-a9b8-39cb5bc9cb98\",\n  \"vpcId\": \"5e28ad7c-5fb7-46d6-a28a-fc0ba6fdc4a3\",\n  \"interfaces\": [\n    {\n      \"subnetId\": \"1f232bf0-7b90-456e-b9b0-38d9fea4171a\",\n      \"isPhysical\": true\n    }\n  ],\n  \"description\": \"GPU worker nodes for distributed training\",\n  \"operatingSystemId\": \"eaeb86ee-c435-444e-9e01-8346f67f194b\",\n  \"infinibandInterfaces\": [\n    {\n      \"partitionId\": \"4f4decba-7d7f-46b9-9e5f-e5d71c2e0666\",\n      \"device\": \"MT2910 Family [ConnectX-7]\",\n      \"deviceInstance\": 0,\n      \"isPhysical\": true\n    }\n  ],\n  \"nvLinkInterfaces\": [\n    {\n      \"deviceInstance\": 0,\n      \"nvLinkLogicalPartitionId\": \"2f8676fd-d228-4db5-ac76-1cfc74f48a23\"\n    },\n    {\n      \"deviceInstance\": 1,\n      \"nvLinkLogicalPartitionId\": \"2f8676fd-d228-4db5-ac76-1cfc74f48a23\"\n    }\n  ],\n  \"sshKeyGroupIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"topologyOptimized\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Topology-optimized batch with InfiniBand
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "namePrefix": "gpu-worker",
  "count": 4,
  "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  "instanceTypeId": "41e36058-8403-4086-a9b8-39cb5bc9cb98",
  "vpcId": "5e28ad7c-5fb7-46d6-a28a-fc0ba6fdc4a3",
  "interfaces": [
    [
      "subnetId": "1f232bf0-7b90-456e-b9b0-38d9fea4171a",
      "isPhysical": true
    ]
  ],
  "description": "GPU worker nodes for distributed training",
  "operatingSystemId": "eaeb86ee-c435-444e-9e01-8346f67f194b",
  "infinibandInterfaces": [
    [
      "partitionId": "4f4decba-7d7f-46b9-9e5f-e5d71c2e0666",
      "device": "MT2910 Family [ConnectX-7]",
      "deviceInstance": 0,
      "isPhysical": true
    ]
  ],
  "nvLinkInterfaces": [
    [
      "deviceInstance": 0,
      "nvLinkLogicalPartitionId": "2f8676fd-d228-4db5-ac76-1cfc74f48a23"
    ],
    [
      "deviceInstance": 1,
      "nvLinkLogicalPartitionId": "2f8676fd-d228-4db5-ac76-1cfc74f48a23"
    ]
  ],
  "sshKeyGroupIds": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
  "topologyOptimized": true
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

```python Cross-domain batch with VPC Prefix
import requests

url = "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch"

payload = {
    "namePrefix": "inference-node",
    "count": 8,
    "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
    "instanceTypeId": "83e71f8f-65d3-44ba-92ba-19daac2e497a",
    "vpcId": "ebcd2d2a-deca-4ac4-b079-d7a97fff8a6b",
    "interfaces": [
        {
            "vpcPrefixId": "000bc42b-f946-472e-83d4-ddf7e365e148",
            "isPhysical": True
        }
    ],
    "description": "Inference nodes spread across NVLink domains",
    "operatingSystemId": "eaeb86ee-c435-444e-9e01-8346f67f194b",
    "labels": {
        "workload": "inference",
        "tier": "production"
    },
    "sshKeyGroupIds": ["a7bf2f9c-12f0-4673-be47-12be6d9e16c8"],
    "topologyOptimized": False
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Cross-domain batch with VPC Prefix
const url = 'https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"namePrefix":"inference-node","count":8,"tenantId":"f97df110-f4de-492e-8849-4a6af68026b0","instanceTypeId":"83e71f8f-65d3-44ba-92ba-19daac2e497a","vpcId":"ebcd2d2a-deca-4ac4-b079-d7a97fff8a6b","interfaces":[{"vpcPrefixId":"000bc42b-f946-472e-83d4-ddf7e365e148","isPhysical":true}],"description":"Inference nodes spread across NVLink domains","operatingSystemId":"eaeb86ee-c435-444e-9e01-8346f67f194b","labels":{"workload":"inference","tier":"production"},"sshKeyGroupIds":["a7bf2f9c-12f0-4673-be47-12be6d9e16c8"],"topologyOptimized":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Cross-domain batch with VPC Prefix
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch"

	payload := strings.NewReader("{\n  \"namePrefix\": \"inference-node\",\n  \"count\": 8,\n  \"tenantId\": \"f97df110-f4de-492e-8849-4a6af68026b0\",\n  \"instanceTypeId\": \"83e71f8f-65d3-44ba-92ba-19daac2e497a\",\n  \"vpcId\": \"ebcd2d2a-deca-4ac4-b079-d7a97fff8a6b\",\n  \"interfaces\": [\n    {\n      \"vpcPrefixId\": \"000bc42b-f946-472e-83d4-ddf7e365e148\",\n      \"isPhysical\": true\n    }\n  ],\n  \"description\": \"Inference nodes spread across NVLink domains\",\n  \"operatingSystemId\": \"eaeb86ee-c435-444e-9e01-8346f67f194b\",\n  \"labels\": {\n    \"workload\": \"inference\",\n    \"tier\": \"production\"\n  },\n  \"sshKeyGroupIds\": [\n    \"a7bf2f9c-12f0-4673-be47-12be6d9e16c8\"\n  ],\n  \"topologyOptimized\": false\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Cross-domain batch with VPC Prefix
require 'uri'
require 'net/http'

url = URI("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"namePrefix\": \"inference-node\",\n  \"count\": 8,\n  \"tenantId\": \"f97df110-f4de-492e-8849-4a6af68026b0\",\n  \"instanceTypeId\": \"83e71f8f-65d3-44ba-92ba-19daac2e497a\",\n  \"vpcId\": \"ebcd2d2a-deca-4ac4-b079-d7a97fff8a6b\",\n  \"interfaces\": [\n    {\n      \"vpcPrefixId\": \"000bc42b-f946-472e-83d4-ddf7e365e148\",\n      \"isPhysical\": true\n    }\n  ],\n  \"description\": \"Inference nodes spread across NVLink domains\",\n  \"operatingSystemId\": \"eaeb86ee-c435-444e-9e01-8346f67f194b\",\n  \"labels\": {\n    \"workload\": \"inference\",\n    \"tier\": \"production\"\n  },\n  \"sshKeyGroupIds\": [\n    \"a7bf2f9c-12f0-4673-be47-12be6d9e16c8\"\n  ],\n  \"topologyOptimized\": false\n}"

response = http.request(request)
puts response.read_body
```

```java Cross-domain batch with VPC Prefix
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"namePrefix\": \"inference-node\",\n  \"count\": 8,\n  \"tenantId\": \"f97df110-f4de-492e-8849-4a6af68026b0\",\n  \"instanceTypeId\": \"83e71f8f-65d3-44ba-92ba-19daac2e497a\",\n  \"vpcId\": \"ebcd2d2a-deca-4ac4-b079-d7a97fff8a6b\",\n  \"interfaces\": [\n    {\n      \"vpcPrefixId\": \"000bc42b-f946-472e-83d4-ddf7e365e148\",\n      \"isPhysical\": true\n    }\n  ],\n  \"description\": \"Inference nodes spread across NVLink domains\",\n  \"operatingSystemId\": \"eaeb86ee-c435-444e-9e01-8346f67f194b\",\n  \"labels\": {\n    \"workload\": \"inference\",\n    \"tier\": \"production\"\n  },\n  \"sshKeyGroupIds\": [\n    \"a7bf2f9c-12f0-4673-be47-12be6d9e16c8\"\n  ],\n  \"topologyOptimized\": false\n}")
  .asString();
```

```php Cross-domain batch with VPC Prefix
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch', [
  'body' => '{
  "namePrefix": "inference-node",
  "count": 8,
  "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  "instanceTypeId": "83e71f8f-65d3-44ba-92ba-19daac2e497a",
  "vpcId": "ebcd2d2a-deca-4ac4-b079-d7a97fff8a6b",
  "interfaces": [
    {
      "vpcPrefixId": "000bc42b-f946-472e-83d4-ddf7e365e148",
      "isPhysical": true
    }
  ],
  "description": "Inference nodes spread across NVLink domains",
  "operatingSystemId": "eaeb86ee-c435-444e-9e01-8346f67f194b",
  "labels": {
    "workload": "inference",
    "tier": "production"
  },
  "sshKeyGroupIds": [
    "a7bf2f9c-12f0-4673-be47-12be6d9e16c8"
  ],
  "topologyOptimized": false
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Cross-domain batch with VPC Prefix
using RestSharp;

var client = new RestClient("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"namePrefix\": \"inference-node\",\n  \"count\": 8,\n  \"tenantId\": \"f97df110-f4de-492e-8849-4a6af68026b0\",\n  \"instanceTypeId\": \"83e71f8f-65d3-44ba-92ba-19daac2e497a\",\n  \"vpcId\": \"ebcd2d2a-deca-4ac4-b079-d7a97fff8a6b\",\n  \"interfaces\": [\n    {\n      \"vpcPrefixId\": \"000bc42b-f946-472e-83d4-ddf7e365e148\",\n      \"isPhysical\": true\n    }\n  ],\n  \"description\": \"Inference nodes spread across NVLink domains\",\n  \"operatingSystemId\": \"eaeb86ee-c435-444e-9e01-8346f67f194b\",\n  \"labels\": {\n    \"workload\": \"inference\",\n    \"tier\": \"production\"\n  },\n  \"sshKeyGroupIds\": [\n    \"a7bf2f9c-12f0-4673-be47-12be6d9e16c8\"\n  ],\n  \"topologyOptimized\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Cross-domain batch with VPC Prefix
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "namePrefix": "inference-node",
  "count": 8,
  "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  "instanceTypeId": "83e71f8f-65d3-44ba-92ba-19daac2e497a",
  "vpcId": "ebcd2d2a-deca-4ac4-b079-d7a97fff8a6b",
  "interfaces": [
    [
      "vpcPrefixId": "000bc42b-f946-472e-83d4-ddf7e365e148",
      "isPhysical": true
    ]
  ],
  "description": "Inference nodes spread across NVLink domains",
  "operatingSystemId": "eaeb86ee-c435-444e-9e01-8346f67f194b",
  "labels": [
    "workload": "inference",
    "tier": "production"
  ],
  "sshKeyGroupIds": ["a7bf2f9c-12f0-4673-be47-12be6d9e16c8"],
  "topologyOptimized": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/instance/batch")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```