Skip to content
Get started

Register a device for passthrough

post/devices

Register a device for passthrough

Body ParametersExpand Collapse
pci_address: string

PCI address of the device (required, e.g., "0000:a2:00.0")

name: optional string

Optional globally unique device name. If not provided, a name is auto-generated from the PCI address (e.g., "pci-0000-a2-00-0")

ReturnsExpand Collapse
Device = object { id, bound_to_vfio, created_at, 7 more }
id: string

Auto-generated unique identifier (CUID2 format)

bound_to_vfio: boolean

Whether the device is currently bound to the vfio-pci driver, which is required for VM passthrough.

  • true: Device is bound to vfio-pci and ready for (or currently in use by) a VM. The device's native driver has been unloaded.
  • false: Device is using its native driver (e.g., nvidia) or no driver. Hypeman will automatically bind to vfio-pci when attaching to an instance.
created_at: string

Registration timestamp (RFC3339)

formatdate-time
device_id: string

PCI device ID (hex)

iommu_group: number

IOMMU group number

pci_address: string

PCI address

Type of PCI device

Accepts one of the following:
"gpu"
"pci"
vendor_id: string

PCI vendor ID (hex)

attached_to: optional string

Instance ID if attached

name: optional string

Device name (user-provided or auto-generated from PCI address)

Register a device for passthrough
curl http://localhost:8080/devices \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $HYPEMAN_API_KEY" \
    -d '{
          "pci_address": "0000:a2:00.0",
          "name": "l4-gpu"
        }'
{
  "id": "tz4a98xxat96iws9zmbrgj3a",
  "bound_to_vfio": false,
  "created_at": "2025-01-15T10:00:00Z",
  "device_id": "27b8",
  "iommu_group": 82,
  "pci_address": "0000:a2:00.0",
  "type": "gpu",
  "vendor_id": "10de",
  "attached_to": null,
  "name": "l4-gpu"
}
Returns Examples
{
  "id": "tz4a98xxat96iws9zmbrgj3a",
  "bound_to_vfio": false,
  "created_at": "2025-01-15T10:00:00Z",
  "device_id": "27b8",
  "iommu_group": 82,
  "pci_address": "0000:a2:00.0",
  "type": "gpu",
  "vendor_id": "10de",
  "attached_to": null,
  "name": "l4-gpu"
}