@nirvana-labs/nirvana-mcp 1.76.1 → 1.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1025,8 +1025,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1025
1025
  qualified: 'client.compute.vms.create',
1026
1026
  params: [
1027
1027
  "boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; };",
1028
- 'cpu_config: { vcpu: number; };',
1029
- 'memory_config: { size: number; };',
1030
1028
  'name: string;',
1031
1029
  'os_image_name: string;',
1032
1030
  'project_id: string;',
@@ -1034,32 +1032,35 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1034
1032
  "region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1';",
1035
1033
  'ssh_key: { public_key: string; };',
1036
1034
  'subnet_id: string;',
1035
+ 'cpu_config?: { vcpu?: number; };',
1037
1036
  "data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[];",
1037
+ 'instance_type?: string;',
1038
+ 'memory_config?: { size?: number; };',
1038
1039
  'tags?: string[];',
1039
1040
  ],
1040
1041
  response:
1041
1042
  "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
1042
1043
  markdown:
1043
- "## create\n\n`client.compute.vms.create(boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }, cpu_config: { vcpu: number; }, memory_config: { size: number; }, name: string, os_image_name: string, project_id: string, public_ip_enabled: boolean, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1', ssh_key: { public_key: string; }, subnet_id: string, data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[], tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/compute/vms`\n\nCreate a VM\n\n### Parameters\n\n- `boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }`\n Boot volume for the VM.\n - `size: number`\n Size of the Volume in GB.\n - `type: 'nvme' | 'abs'`\n Type of the Volume.\n - `tags?: string[]`\n Tags to attach to the Volume.\n\n- `cpu_config: { vcpu: number; }`\n CPU configuration for the VM.\n - `vcpu: number`\n Number of virtual CPUs.\n\n- `memory_config: { size: number; }`\n Memory configuration for the VM.\n - `size: number`\n Size of the memory in GB.\n\n- `name: string`\n Name of the VM.\n\n- `os_image_name: string`\n Name of the OS Image to use for the VM.\n\n- `project_id: string`\n Project ID to create the VM in.\n\n- `public_ip_enabled: boolean`\n Whether to enable public IP for the VM.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n Region the resource is in.\n\n- `ssh_key: { public_key: string; }`\n Public SSH key configuration for the VM.\n - `public_key: string`\n Public key to and and use to access the VM.\n\n- `subnet_id: string`\n ID of the subnet to use for the VM.\n\n- `data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[]`\n Data volumes for the VM.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation);\n```",
1044
+ "## create\n\n`client.compute.vms.create(boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }, name: string, os_image_name: string, project_id: string, public_ip_enabled: boolean, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1', ssh_key: { public_key: string; }, subnet_id: string, cpu_config?: { vcpu?: number; }, data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[], instance_type?: string, memory_config?: { size?: number; }, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/compute/vms`\n\nCreate a VM\n\n### Parameters\n\n- `boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }`\n Boot volume for the VM.\n - `size: number`\n Size of the Volume in GB.\n - `type: 'nvme' | 'abs'`\n Type of the Volume.\n - `tags?: string[]`\n Tags to attach to the Volume.\n\n- `name: string`\n Name of the VM.\n\n- `os_image_name: string`\n Name of the OS Image to use for the VM.\n\n- `project_id: string`\n Project ID to create the VM in.\n\n- `public_ip_enabled: boolean`\n Whether to enable public IP for the VM.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n Region the resource is in.\n\n- `ssh_key: { public_key: string; }`\n Public SSH key configuration for the VM.\n - `public_key: string`\n Public key to and and use to access the VM.\n\n- `subnet_id: string`\n ID of the subnet to use for the VM.\n\n- `cpu_config?: { vcpu?: number; }`\n CPU configuration for the VM.\n - `vcpu?: number`\n Number of virtual CPUs.\n\n- `data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[]`\n Data volumes for the VM.\n\n- `instance_type?: string`\n Instance type name.\n\n- `memory_config?: { size?: number; }`\n Memory configuration for the VM.\n - `size?: number`\n Size of the memory in GB.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation);\n```",
1044
1045
  perLanguage: {
1045
1046
  cli: {
1046
1047
  method: 'vms create',
1047
1048
  example:
1048
- "nirvana compute:vms create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\n --cpu-config '{vcpu: 2}' \\\n --memory-config '{size: 2}' \\\n --name my-vm \\\n --os-image-name ubuntu-noble-2025-10-01 \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --public-ip-enabled \\\n --region us-sva-2 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000",
1049
+ "nirvana compute:vms create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\n --name my-vm \\\n --os-image-name ubuntu-noble-2025-10-01 \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --public-ip-enabled \\\n --region us-sva-2 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000",
1049
1050
  },
1050
1051
  go: {
1051
1052
  method: 'client.Compute.VMs.New',
1052
1053
  example:
1053
- 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
1054
+ 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
1054
1055
  },
1055
1056
  http: {
1056
1057
  example:
1057
- 'curl https://api.nirvanalabs.io/v1/compute/vms \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "cpu_config": {\n "vcpu": 2\n },\n "memory_config": {\n "size": 2\n },\n "name": "my-vm",\n "os_image_name": "ubuntu-noble-2025-10-01",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "public_ip_enabled": true,\n "region": "us-sva-2",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1058
+ 'curl https://api.nirvanalabs.io/v1/compute/vms \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "name": "my-vm",\n "os_image_name": "ubuntu-noble-2025-10-01",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "public_ip_enabled": true,\n "region": "us-sva-2",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "instance_type": "n1-standard-8",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1058
1059
  },
1059
1060
  typescript: {
1060
1061
  method: 'client.compute.vms.create',
1061
1062
  example:
1062
- "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
1063
+ "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
1063
1064
  },
1064
1065
  },
1065
1066
  },
@@ -1073,9 +1074,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1073
1074
  qualified: 'client.compute.vms.get',
1074
1075
  params: ['vm_id: string;'],
1075
1076
  response:
1076
- "{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }",
1077
+ "{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; instance_type?: string; }",
1077
1078
  markdown:
1078
- "## get\n\n`client.compute.vms.get(vm_id: string): { id: string; boot_volume_id: string; cpu_config: cpu_config; created_at: string; data_volume_ids: string[]; memory_config: memory_config; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: region_name; status: resource_status; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }`\n\n**get** `/v1/compute/vms/{vm_id}`\n\nGet details about a VM\n\n### Parameters\n\n- `vm_id: string`\n\n### Returns\n\n- `{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }`\n VM details.\n\n - `id: string`\n - `boot_volume_id: string`\n - `cpu_config: { vcpu: number; }`\n - `created_at: string`\n - `data_volume_ids: string[]`\n - `memory_config: { size: number; }`\n - `name: string`\n - `private_ip: string`\n - `project_id: string`\n - `public_ip: string`\n - `public_ip_enabled: boolean`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `subnet_id: string`\n - `tags: string[]`\n - `updated_at: string`\n - `vpc_id: string`\n - `vpc_name: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst vm = await client.compute.vms.get('vm_id');\n\nconsole.log(vm);\n```",
1079
+ "## get\n\n`client.compute.vms.get(vm_id: string): { id: string; boot_volume_id: string; cpu_config: cpu_config; created_at: string; data_volume_ids: string[]; memory_config: memory_config; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: region_name; status: resource_status; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; instance_type?: string; }`\n\n**get** `/v1/compute/vms/{vm_id}`\n\nGet details about a VM\n\n### Parameters\n\n- `vm_id: string`\n\n### Returns\n\n- `{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; instance_type?: string; }`\n VM details.\n\n - `id: string`\n - `boot_volume_id: string`\n - `cpu_config: { vcpu: number; }`\n - `created_at: string`\n - `data_volume_ids: string[]`\n - `memory_config: { size: number; }`\n - `name: string`\n - `private_ip: string`\n - `project_id: string`\n - `public_ip: string`\n - `public_ip_enabled: boolean`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `subnet_id: string`\n - `tags: string[]`\n - `updated_at: string`\n - `vpc_id: string`\n - `vpc_name: string`\n - `instance_type?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst vm = await client.compute.vms.get('vm_id');\n\nconsole.log(vm);\n```",
1079
1080
  perLanguage: {
1080
1081
  cli: {
1081
1082
  method: 'vms get',
@@ -1107,8 +1108,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1107
1108
  qualified: 'client.compute.vms.update',
1108
1109
  params: [
1109
1110
  'vm_id: string;',
1110
- 'cpu_config?: { vcpu: number; };',
1111
- 'memory_config?: { size: number; };',
1111
+ 'cpu_config?: { vcpu?: number; };',
1112
+ 'instance_type?: string;',
1113
+ 'memory_config?: { size?: number; };',
1112
1114
  'name?: string;',
1113
1115
  'public_ip_enabled?: boolean;',
1114
1116
  'tags?: string[];',
@@ -1116,7 +1118,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1116
1118
  response:
1117
1119
  "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
1118
1120
  markdown:
1119
- "## update\n\n`client.compute.vms.update(vm_id: string, cpu_config?: { vcpu: number; }, memory_config?: { size: number; }, name?: string, public_ip_enabled?: boolean, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/compute/vms/{vm_id}`\n\nUpdate a VM\n\n### Parameters\n\n- `vm_id: string`\n\n- `cpu_config?: { vcpu: number; }`\n CPU configuration for the VM.\n - `vcpu: number`\n Number of virtual CPUs.\n\n- `memory_config?: { size: number; }`\n Memory configuration for the VM.\n - `size: number`\n Size of the memory in GB.\n\n- `name?: string`\n Name of the VM.\n\n- `public_ip_enabled?: boolean`\n Whether to enable public IP for the VM.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.vms.update('vm_id');\n\nconsole.log(operation);\n```",
1121
+ "## update\n\n`client.compute.vms.update(vm_id: string, cpu_config?: { vcpu?: number; }, instance_type?: string, memory_config?: { size?: number; }, name?: string, public_ip_enabled?: boolean, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/compute/vms/{vm_id}`\n\nUpdate a VM\n\n### Parameters\n\n- `vm_id: string`\n\n- `cpu_config?: { vcpu?: number; }`\n CPU configuration for the VM.\n - `vcpu?: number`\n Number of virtual CPUs.\n\n- `instance_type?: string`\n Instance type name.\n\n- `memory_config?: { size?: number; }`\n Memory configuration for the VM.\n - `size?: number`\n Size of the memory in GB.\n\n- `name?: string`\n Name of the VM.\n\n- `public_ip_enabled?: boolean`\n Whether to enable public IP for the VM.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.vms.update('vm_id');\n\nconsole.log(operation);\n```",
1120
1122
  perLanguage: {
1121
1123
  cli: {
1122
1124
  method: 'vms update',
@@ -1129,7 +1131,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1129
1131
  },
1130
1132
  http: {
1131
1133
  example:
1132
- 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1134
+ 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1133
1135
  },
1134
1136
  typescript: {
1135
1137
  method: 'client.compute.vms.update',
@@ -1182,9 +1184,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1182
1184
  qualified: 'client.compute.vms.list',
1183
1185
  params: ['project_id: string;', 'cursor?: string;', 'limit?: number;'],
1184
1186
  response:
1185
- "{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }",
1187
+ "{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; instance_type?: string; }",
1186
1188
  markdown:
1187
- "## list\n\n`client.compute.vms.list(project_id: string, cursor?: string, limit?: number): { id: string; boot_volume_id: string; cpu_config: cpu_config; created_at: string; data_volume_ids: string[]; memory_config: memory_config; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: region_name; status: resource_status; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }`\n\n**get** `/v1/compute/vms`\n\nList all VMs\n\n### Parameters\n\n- `project_id: string`\n Project ID of resources to request\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }`\n VM details.\n\n - `id: string`\n - `boot_volume_id: string`\n - `cpu_config: { vcpu: number; }`\n - `created_at: string`\n - `data_volume_ids: string[]`\n - `memory_config: { size: number; }`\n - `name: string`\n - `private_ip: string`\n - `project_id: string`\n - `public_ip: string`\n - `public_ip_enabled: boolean`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `subnet_id: string`\n - `tags: string[]`\n - `updated_at: string`\n - `vpc_id: string`\n - `vpc_name: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const vm of client.compute.vms.list({ project_id: 'project_id' })) {\n console.log(vm);\n}\n```",
1189
+ "## list\n\n`client.compute.vms.list(project_id: string, cursor?: string, limit?: number): { id: string; boot_volume_id: string; cpu_config: cpu_config; created_at: string; data_volume_ids: string[]; memory_config: memory_config; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: region_name; status: resource_status; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; instance_type?: string; }`\n\n**get** `/v1/compute/vms`\n\nList all VMs\n\n### Parameters\n\n- `project_id: string`\n Project ID of resources to request\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; instance_type?: string; }`\n VM details.\n\n - `id: string`\n - `boot_volume_id: string`\n - `cpu_config: { vcpu: number; }`\n - `created_at: string`\n - `data_volume_ids: string[]`\n - `memory_config: { size: number; }`\n - `name: string`\n - `private_ip: string`\n - `project_id: string`\n - `public_ip: string`\n - `public_ip_enabled: boolean`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `subnet_id: string`\n - `tags: string[]`\n - `updated_at: string`\n - `vpc_id: string`\n - `vpc_name: string`\n - `instance_type?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const vm of client.compute.vms.list({ project_id: 'project_id' })) {\n console.log(vm);\n}\n```",
1188
1190
  perLanguage: {
1189
1191
  cli: {
1190
1192
  method: 'vms list',
@@ -1250,8 +1252,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1250
1252
  qualified: 'client.compute.vms.availability.create',
1251
1253
  params: [
1252
1254
  "boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; };",
1253
- 'cpu_config: { vcpu: number; };',
1254
- 'memory_config: { size: number; };',
1255
1255
  'name: string;',
1256
1256
  'os_image_name: string;',
1257
1257
  'project_id: string;',
@@ -1259,30 +1259,33 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1259
1259
  "region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1';",
1260
1260
  'ssh_key: { public_key: string; };',
1261
1261
  'subnet_id: string;',
1262
+ 'cpu_config?: { vcpu?: number; };',
1262
1263
  "data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[];",
1264
+ 'instance_type?: string;',
1265
+ 'memory_config?: { size?: number; };',
1263
1266
  'tags?: string[];',
1264
1267
  ],
1265
1268
  markdown:
1266
- "## create\n\n`client.compute.vms.availability.create(boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }, cpu_config: { vcpu: number; }, memory_config: { size: number; }, name: string, os_image_name: string, project_id: string, public_ip_enabled: boolean, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1', ssh_key: { public_key: string; }, subnet_id: string, data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[], tags?: string[]): void`\n\n**post** `/v1/compute/vms/availability`\n\nCheck VM Create Availability\n\n### Parameters\n\n- `boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }`\n Boot volume for the VM.\n - `size: number`\n Size of the Volume in GB.\n - `type: 'nvme' | 'abs'`\n Type of the Volume.\n - `tags?: string[]`\n Tags to attach to the Volume.\n\n- `cpu_config: { vcpu: number; }`\n CPU configuration for the VM.\n - `vcpu: number`\n Number of virtual CPUs.\n\n- `memory_config: { size: number; }`\n Memory configuration for the VM.\n - `size: number`\n Size of the memory in GB.\n\n- `name: string`\n Name of the VM.\n\n- `os_image_name: string`\n Name of the OS Image to use for the VM.\n\n- `project_id: string`\n Project ID to create the VM in.\n\n- `public_ip_enabled: boolean`\n Whether to enable public IP for the VM.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n Region the resource is in.\n\n- `ssh_key: { public_key: string; }`\n Public SSH key configuration for the VM.\n - `public_key: string`\n Public key to and and use to access the VM.\n\n- `subnet_id: string`\n ID of the subnet to use for the VM.\n\n- `data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[]`\n Data volumes for the VM.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.compute.vms.availability.create({\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n})\n```",
1269
+ "## create\n\n`client.compute.vms.availability.create(boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }, name: string, os_image_name: string, project_id: string, public_ip_enabled: boolean, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1', ssh_key: { public_key: string; }, subnet_id: string, cpu_config?: { vcpu?: number; }, data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[], instance_type?: string, memory_config?: { size?: number; }, tags?: string[]): void`\n\n**post** `/v1/compute/vms/availability`\n\nCheck VM Create Availability\n\n### Parameters\n\n- `boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }`\n Boot volume for the VM.\n - `size: number`\n Size of the Volume in GB.\n - `type: 'nvme' | 'abs'`\n Type of the Volume.\n - `tags?: string[]`\n Tags to attach to the Volume.\n\n- `name: string`\n Name of the VM.\n\n- `os_image_name: string`\n Name of the OS Image to use for the VM.\n\n- `project_id: string`\n Project ID to create the VM in.\n\n- `public_ip_enabled: boolean`\n Whether to enable public IP for the VM.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n Region the resource is in.\n\n- `ssh_key: { public_key: string; }`\n Public SSH key configuration for the VM.\n - `public_key: string`\n Public key to and and use to access the VM.\n\n- `subnet_id: string`\n ID of the subnet to use for the VM.\n\n- `cpu_config?: { vcpu?: number; }`\n CPU configuration for the VM.\n - `vcpu?: number`\n Number of virtual CPUs.\n\n- `data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[]`\n Data volumes for the VM.\n\n- `instance_type?: string`\n Instance type name.\n\n- `memory_config?: { size?: number; }`\n Memory configuration for the VM.\n - `size?: number`\n Size of the memory in GB.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.compute.vms.availability.create({\n boot_volume: { size: 100, type: 'abs' },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n})\n```",
1267
1270
  perLanguage: {
1268
1271
  cli: {
1269
1272
  method: 'availability create',
1270
1273
  example:
1271
- "nirvana compute:vms:availability create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\n --cpu-config '{vcpu: 2}' \\\n --memory-config '{size: 2}' \\\n --name my-vm \\\n --os-image-name ubuntu-noble-2025-10-01 \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --public-ip-enabled \\\n --region us-sva-2 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000",
1274
+ "nirvana compute:vms:availability create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\n --name my-vm \\\n --os-image-name ubuntu-noble-2025-10-01 \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --public-ip-enabled \\\n --region us-sva-2 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000",
1272
1275
  },
1273
1276
  go: {
1274
1277
  method: 'client.Compute.VMs.Availability.New',
1275
1278
  example:
1276
- 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Compute.VMs.Availability.New(context.TODO(), compute.VMAvailabilityNewParams{\n\t\tBootVolume: compute.VMAvailabilityNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
1279
+ 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Compute.VMs.Availability.New(context.TODO(), compute.VMAvailabilityNewParams{\n\t\tBootVolume: compute.VMAvailabilityNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
1277
1280
  },
1278
1281
  http: {
1279
1282
  example:
1280
- 'curl https://api.nirvanalabs.io/v1/compute/vms/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "cpu_config": {\n "vcpu": 2\n },\n "memory_config": {\n "size": 2\n },\n "name": "my-vm",\n "os_image_name": "ubuntu-noble-2025-10-01",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "public_ip_enabled": true,\n "region": "us-sva-2",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1283
+ 'curl https://api.nirvanalabs.io/v1/compute/vms/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "name": "my-vm",\n "os_image_name": "ubuntu-noble-2025-10-01",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "public_ip_enabled": true,\n "region": "us-sva-2",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "instance_type": "n1-standard-8",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1281
1284
  },
1282
1285
  typescript: {
1283
1286
  method: 'client.compute.vms.availability.create',
1284
1287
  example:
1285
- "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.vms.availability.create({\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});",
1288
+ "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.vms.availability.create({\n boot_volume: { size: 100, type: 'abs' },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});",
1286
1289
  },
1287
1290
  },
1288
1291
  },
@@ -1296,14 +1299,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1296
1299
  qualified: 'client.compute.vms.availability.update',
1297
1300
  params: [
1298
1301
  'vm_id: string;',
1299
- 'cpu_config?: { vcpu: number; };',
1300
- 'memory_config?: { size: number; };',
1302
+ 'cpu_config?: { vcpu?: number; };',
1303
+ 'instance_type?: string;',
1304
+ 'memory_config?: { size?: number; };',
1301
1305
  'name?: string;',
1302
1306
  'public_ip_enabled?: boolean;',
1303
1307
  'tags?: string[];',
1304
1308
  ],
1305
1309
  markdown:
1306
- "## update\n\n`client.compute.vms.availability.update(vm_id: string, cpu_config?: { vcpu: number; }, memory_config?: { size: number; }, name?: string, public_ip_enabled?: boolean, tags?: string[]): void`\n\n**patch** `/v1/compute/vms/{vm_id}/availability`\n\nCheck VM Update Availability\n\n### Parameters\n\n- `vm_id: string`\n\n- `cpu_config?: { vcpu: number; }`\n CPU configuration for the VM.\n - `vcpu: number`\n Number of virtual CPUs.\n\n- `memory_config?: { size: number; }`\n Memory configuration for the VM.\n - `size: number`\n Size of the memory in GB.\n\n- `name?: string`\n Name of the VM.\n\n- `public_ip_enabled?: boolean`\n Whether to enable public IP for the VM.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.compute.vms.availability.update('vm_id')\n```",
1310
+ "## update\n\n`client.compute.vms.availability.update(vm_id: string, cpu_config?: { vcpu?: number; }, instance_type?: string, memory_config?: { size?: number; }, name?: string, public_ip_enabled?: boolean, tags?: string[]): void`\n\n**patch** `/v1/compute/vms/{vm_id}/availability`\n\nCheck VM Update Availability\n\n### Parameters\n\n- `vm_id: string`\n\n- `cpu_config?: { vcpu?: number; }`\n CPU configuration for the VM.\n - `vcpu?: number`\n Number of virtual CPUs.\n\n- `instance_type?: string`\n Instance type name.\n\n- `memory_config?: { size?: number; }`\n Memory configuration for the VM.\n - `size?: number`\n Size of the memory in GB.\n\n- `name?: string`\n Name of the VM.\n\n- `public_ip_enabled?: boolean`\n Whether to enable public IP for the VM.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.compute.vms.availability.update('vm_id')\n```",
1307
1311
  perLanguage: {
1308
1312
  cli: {
1309
1313
  method: 'availability update',
@@ -1316,7 +1320,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1316
1320
  },
1317
1321
  http: {
1318
1322
  example:
1319
- 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1323
+ 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1320
1324
  },
1321
1325
  typescript: {
1322
1326
  method: 'client.compute.vms.availability.update',
@@ -3696,22 +3700,22 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [
3696
3700
  {
3697
3701
  language: 'go',
3698
3702
  content:
3699
- '# Nirvana Labs Go API Library\n\n<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go"><img src="https://pkg.go.dev/badge/github.com/nirvana-labs/nirvana-go.svg" alt="Go Reference"></a>\n\nThe Nirvana Labs Go library provides convenient access to the [Nirvana Labs REST API](https://docs.nirvanalabs.io)\nfrom applications written in Go.\n\n\n\n## MCP Server\n\nUse the Nirvana Labs MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40nirvana-labs%2Fnirvana-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuaXJ2YW5hLWxhYnMvbmlydmFuYS1tY3AiXSwiZW52Ijp7Ik5JUlZBTkFfTEFCU19BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40nirvana-labs%2Fnirvana-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nirvana-labs%2Fnirvana-mcp%22%5D%2C%22env%22%3A%7B%22NIRVANA_LABS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/nirvana-labs/nirvana-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/nirvana-labs/nirvana-go@v0.0.1\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("NIRVANA_LABS_API_KEY")\n\t)\n\toperation, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeNvme,\n\t\t},\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva1,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Compute.VMs.New(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Compute.VMs.ListAutoPaging(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tvm := iter.Current()\n\tfmt.Printf("%+v\\n", vm)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Compute.VMs.List(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\nfor page != nil {\n\tfor _, vm := range page.Items {\n\t\tfmt.Printf("%+v\\n", vm)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\tBootVolume: compute.VMNewParamsBootVolume{\n\t\tSize: 100,\n\t\tType: compute.VolumeTypeNvme,\n\t},\n\tCPUConfig: compute.CPUConfigRequestParam{\n\t\tVcpu: 2,\n\t},\n\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\tSize: 2,\n\t},\n\tName: "my-vm",\n\tOSImageName: "ubuntu-noble-2025-10-01",\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tPublicIPEnabled: true,\n\tRegion: shared.RegionNameUsSva1,\n\tSSHKey: compute.SSHKeyRequestParam{\n\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t},\n\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n})\nif err != nil {\n\tvar apierr *nirvana.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/v1/compute/vms": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Compute.VMs.New(\n\tctx,\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeNvme,\n\t\t},\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva1,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := nirvana.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeNvme,\n\t\t},\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva1,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\noperation, err := client.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeNvme,\n\t\t},\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva1,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", operation)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/nirvana-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
3703
+ '# Nirvana Labs Go API Library\n\n<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go"><img src="https://pkg.go.dev/badge/github.com/nirvana-labs/nirvana-go.svg" alt="Go Reference"></a>\n\nThe Nirvana Labs Go library provides convenient access to the [Nirvana Labs REST API](https://docs.nirvanalabs.io)\nfrom applications written in Go.\n\n\n\n## MCP Server\n\nUse the Nirvana Labs MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40nirvana-labs%2Fnirvana-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuaXJ2YW5hLWxhYnMvbmlydmFuYS1tY3AiXSwiZW52Ijp7Ik5JUlZBTkFfTEFCU19BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40nirvana-labs%2Fnirvana-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nirvana-labs%2Fnirvana-mcp%22%5D%2C%22env%22%3A%7B%22NIRVANA_LABS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/nirvana-labs/nirvana-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/nirvana-labs/nirvana-go@v0.0.1\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("NIRVANA_LABS_API_KEY")\n\t)\n\toperation, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeNvme,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva1,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: nirvana.Int(2),\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: nirvana.Int(2),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Compute.VMs.New(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Compute.VMs.ListAutoPaging(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tvm := iter.Current()\n\tfmt.Printf("%+v\\n", vm)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Compute.VMs.List(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\nfor page != nil {\n\tfor _, vm := range page.Items {\n\t\tfmt.Printf("%+v\\n", vm)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\tBootVolume: compute.VMNewParamsBootVolume{\n\t\tSize: 100,\n\t\tType: compute.VolumeTypeNvme,\n\t},\n\tName: "my-vm",\n\tOSImageName: "ubuntu-noble-2025-10-01",\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tPublicIPEnabled: true,\n\tRegion: shared.RegionNameUsSva1,\n\tSSHKey: compute.SSHKeyRequestParam{\n\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t},\n\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\tCPUConfig: compute.CPUConfigRequestParam{\n\t\tVcpu: nirvana.Int(2),\n\t},\n\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\tSize: nirvana.Int(2),\n\t},\n})\nif err != nil {\n\tvar apierr *nirvana.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/v1/compute/vms": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Compute.VMs.New(\n\tctx,\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeNvme,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva1,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: nirvana.Int(2),\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: nirvana.Int(2),\n\t\t},\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := nirvana.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeNvme,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva1,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: nirvana.Int(2),\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: nirvana.Int(2),\n\t\t},\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\noperation, err := client.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeNvme,\n\t\t},\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva1,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: nirvana.Int(2),\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: nirvana.Int(2),\n\t\t},\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", operation)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/nirvana-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
3700
3704
  },
3701
3705
  {
3702
3706
  language: 'terraform',
3703
3707
  content:
3704
- '# Nirvana Labs Terraform Provider\n\nThe [Nirvana Labs Terraform provider](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs) provides convenient access to\nthe [Nirvana Labs REST API](https://docs.nirvanalabs.io) from Terraform.\n\n\n\n## Requirements\n\nThis provider requires Terraform CLI 1.0 or later. You can [install it for your system](https://developer.hashicorp.com/terraform/install)\non Hashicorp\'s website.\n\n## Usage\n\nAdd the following to your `main.tf` file:\n\n<!-- x-release-please-start-version -->\n\n```hcl\n# Declare the provider and version\nterraform {\n required_providers {\n SDK_ProviderTypeName = {\n source = "nirvana-labs/nirvana"\n version = "~> 0.0.1"\n }\n }\n}\n\n# Initialize the provider\nprovider "nirvana" {\n api_key = "My API Key" # or set NIRVANA_LABS_API_KEY env variable\n}\n\n# Configure a resource\nresource "nirvana_compute_vm" "example_compute_vm" {\n boot_volume = {\n size = 100\n type = "nvme"\n tags = ["production", "ethereum"]\n }\n cpu_config = {\n vcpu = 2\n }\n memory_config = {\n size = 2\n }\n name = "my-vm"\n os_image_name = "ubuntu-noble-2025-10-01"\n project_id = "123e4567-e89b-12d3-a456-426614174000"\n public_ip_enabled = true\n region = "us-sva-1"\n ssh_key = {\n public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n }\n subnet_id = "123e4567-e89b-12d3-a456-426614174000"\n data_volumes = [{\n name = "my-data-volume"\n size = 100\n type = "abs"\n tags = ["production", "ethereum"]\n }]\n tags = ["production", "ethereum"]\n}\n```\n\n<!-- x-release-please-end -->\n\nInitialize your project by running `terraform init` in the directory.\n\nAdditional examples can be found in the [./examples](./examples) folder within this repository, and you can\nrefer to the full documentation on [the Terraform Registry](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs).\n\n### Provider Options\nWhen you initialize the provider, the following options are supported. It is recommended to use environment variables for sensitive values like access tokens.\nIf an environment variable is provided, then the option does not need to be set in the terraform source.\n\n| Property | Environment variable | Required | Default value |\n| -------- | ---------------------- | -------- | ------------- |\n| api_key | `NIRVANA_LABS_API_KEY` | true | — |\n\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/terraform-provider-nirvana/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
3708
+ '# Nirvana Labs Terraform Provider\n\nThe [Nirvana Labs Terraform provider](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs) provides convenient access to\nthe [Nirvana Labs REST API](https://docs.nirvanalabs.io) from Terraform.\n\n\n\n## Requirements\n\nThis provider requires Terraform CLI 1.0 or later. You can [install it for your system](https://developer.hashicorp.com/terraform/install)\non Hashicorp\'s website.\n\n## Usage\n\nAdd the following to your `main.tf` file:\n\n<!-- x-release-please-start-version -->\n\n```hcl\n# Declare the provider and version\nterraform {\n required_providers {\n SDK_ProviderTypeName = {\n source = "nirvana-labs/nirvana"\n version = "~> 0.0.1"\n }\n }\n}\n\n# Initialize the provider\nprovider "nirvana" {\n api_key = "My API Key" # or set NIRVANA_LABS_API_KEY env variable\n}\n\n# Configure a resource\nresource "nirvana_compute_vm" "example_compute_vm" {\n boot_volume = {\n size = 100\n type = "nvme"\n tags = ["production", "ethereum"]\n }\n name = "my-vm"\n os_image_name = "ubuntu-noble-2025-10-01"\n project_id = "123e4567-e89b-12d3-a456-426614174000"\n public_ip_enabled = true\n region = "us-sva-1"\n ssh_key = {\n public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n }\n subnet_id = "123e4567-e89b-12d3-a456-426614174000"\n cpu_config = {\n vcpu = 2\n }\n data_volumes = [{\n name = "my-data-volume"\n size = 100\n type = "abs"\n tags = ["production", "ethereum"]\n }]\n instance_type = "n1-standard-8"\n memory_config = {\n size = 2\n }\n tags = ["production", "ethereum"]\n}\n```\n\n<!-- x-release-please-end -->\n\nInitialize your project by running `terraform init` in the directory.\n\nAdditional examples can be found in the [./examples](./examples) folder within this repository, and you can\nrefer to the full documentation on [the Terraform Registry](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs).\n\n### Provider Options\nWhen you initialize the provider, the following options are supported. It is recommended to use environment variables for sensitive values like access tokens.\nIf an environment variable is provided, then the option does not need to be set in the terraform source.\n\n| Property | Environment variable | Required | Default value |\n| -------- | ---------------------- | -------- | ------------- |\n| api_key | `NIRVANA_LABS_API_KEY` | true | — |\n\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/terraform-provider-nirvana/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
3705
3709
  },
3706
3710
  {
3707
3711
  language: 'typescript',
3708
3712
  content:
3709
- "# Nirvana Labs TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@nirvana-labs/nirvana.svg?label=npm%20(stable))](https://npmjs.org/package/@nirvana-labs/nirvana) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@nirvana-labs/nirvana)\n\nThis library provides convenient access to the Nirvana Labs REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.nirvanalabs.io](https://docs.nirvanalabs.io). The full API of this library can be found in [api.md](api.md).\n\n\n\n## MCP Server\n\nUse the Nirvana Labs MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40nirvana-labs%2Fnirvana-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuaXJ2YW5hLWxhYnMvbmlydmFuYS1tY3AiXSwiZW52Ijp7Ik5JUlZBTkFfTEFCU19BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40nirvana-labs%2Fnirvana-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nirvana-labs%2Fnirvana-mcp%22%5D%2C%22env%22%3A%7B%22NIRVANA_LABS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @nirvana-labs/nirvana\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: NirvanaLabs.Compute.VMCreateParams = {\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n};\nconst operation: NirvanaLabs.Operation = await client.compute.vms.create(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst operation = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .catch(async (err) => {\n if (err instanceof NirvanaLabs.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new NirvanaLabs({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.compute.vms.create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n}, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new NirvanaLabs({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.compute.vms.create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n}, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the NirvanaLabs API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllVMs(params) {\n const allVMs = [];\n // Automatically fetches more pages as needed.\n for await (const vm of client.compute.vms.list({\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n limit: 10,\n })) {\n allVMs.push(vm);\n }\n return allVMs;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.compute.vms.list({\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n limit: 10,\n});\nfor (const vm of page.items) {\n console.log(vm);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new NirvanaLabs();\n\nconst response = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: operation, response: raw } = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(operation.id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `NIRVANA_LABS_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new NirvanaLabs({\n logger: logger.child({ name: 'NirvanaLabs' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.compute.vms.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport fetch from 'my-fetch';\n\nconst client = new NirvanaLabs({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new NirvanaLabs({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport NirvanaLabs from 'npm:@nirvana-labs/nirvana';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new NirvanaLabs({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/nirvana-typescript/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
3713
+ "# Nirvana Labs TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@nirvana-labs/nirvana.svg?label=npm%20(stable))](https://npmjs.org/package/@nirvana-labs/nirvana) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@nirvana-labs/nirvana)\n\nThis library provides convenient access to the Nirvana Labs REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.nirvanalabs.io](https://docs.nirvanalabs.io). The full API of this library can be found in [api.md](api.md).\n\n\n\n## MCP Server\n\nUse the Nirvana Labs MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40nirvana-labs%2Fnirvana-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuaXJ2YW5hLWxhYnMvbmlydmFuYS1tY3AiXSwiZW52Ijp7Ik5JUlZBTkFfTEFCU19BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40nirvana-labs%2Fnirvana-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nirvana-labs%2Fnirvana-mcp%22%5D%2C%22env%22%3A%7B%22NIRVANA_LABS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @nirvana-labs/nirvana\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'nvme' },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n});\n\nconsole.log(operation.id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: NirvanaLabs.Compute.VMCreateParams = {\n boot_volume: { size: 100, type: 'nvme' },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n};\nconst operation: NirvanaLabs.Operation = await client.compute.vms.create(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst operation = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'nvme' },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n })\n .catch(async (err) => {\n if (err instanceof NirvanaLabs.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new NirvanaLabs({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.compute.vms.create({\n boot_volume: { size: 100, type: 'nvme' },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n}, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new NirvanaLabs({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.compute.vms.create({\n boot_volume: { size: 100, type: 'nvme' },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n}, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the NirvanaLabs API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllVMs(params) {\n const allVMs = [];\n // Automatically fetches more pages as needed.\n for await (const vm of client.compute.vms.list({\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n limit: 10,\n })) {\n allVMs.push(vm);\n }\n return allVMs;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.compute.vms.list({\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n limit: 10,\n});\nfor (const vm of page.items) {\n console.log(vm);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new NirvanaLabs();\n\nconst response = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'nvme' },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: operation, response: raw } = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'nvme' },\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-1',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n cpu_config: { vcpu: 2 },\n memory_config: { size: 2 },\n })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(operation.id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `NIRVANA_LABS_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new NirvanaLabs({\n logger: logger.child({ name: 'NirvanaLabs' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.compute.vms.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport fetch from 'my-fetch';\n\nconst client = new NirvanaLabs({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new NirvanaLabs({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport NirvanaLabs from 'npm:@nirvana-labs/nirvana';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new NirvanaLabs({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/nirvana-typescript/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
3710
3714
  },
3711
3715
  {
3712
3716
  language: 'cli',
3713
3717
  content:
3714
- "# Nirvana Labs CLI\n\nThe official CLI for the [Nirvana Labs REST API](https://docs.nirvanalabs.io).\n\n<!-- x-release-please-start-version -->\n\n## Installation\n\n### Installing with Homebrew\n\n~~~sh\nbrew install nirvana-labs/tap/nirvana\n~~~\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/nirvana-labs/nirvana-cli/cmd/nirvana@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n<!-- x-release-please-end -->\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\nnirvana [resource] <command> [flags...]\n~~~\n\n~~~sh\nnirvana compute:vms create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: nvme}' \\\n --cpu-config '{vcpu: 2}' \\\n --memory-config '{size: 2}' \\\n --name my-vm \\\n --os-image-name ubuntu-noble-2025-10-01 \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --public-ip-enabled \\\n --region us-sva-1 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Required |\n| ---------------------- | -------- |\n| `NIRVANA_LABS_API_KEY` | yes |\n\n### Global flags\n\n- `--api-key` (can also be set with `NIRVANA_LABS_API_KEY` env var)\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\nnirvana <command> --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\nnirvana <command> --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\nnirvana <command> <<YAML\narg:\n image: \"@abe.jpg\"\nYAML\n~~~\n\nIf you need to pass a string literal that begins with an `@` sign, you can\nescape the `@` sign to avoid accidentally passing a file.\n\n~~~bash\nnirvana <command> --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\nnirvana <command> --arg @data://file.txt\n~~~\n\n## Linking different Go SDK versions\n\nYou can link the CLI against a different version of the Nirvana Labs Go SDK\nfor development purposes using the `./scripts/link` script.\n\nTo link to a specific version from a repository (version can be a branch,\ngit tag, or commit hash):\n\n~~~bash\n./scripts/link github.com/org/repo@version\n~~~\n\nTo link to a local copy of the SDK:\n\n~~~bash\n./scripts/link ../path/to/nirvana-go\n~~~\n\nIf you run the link script without any arguments, it will default to `../nirvana-go`.\n",
3718
+ "# Nirvana Labs CLI\n\nThe official CLI for the [Nirvana Labs REST API](https://docs.nirvanalabs.io).\n\n<!-- x-release-please-start-version -->\n\n## Installation\n\n### Installing with Homebrew\n\n~~~sh\nbrew install nirvana-labs/tap/nirvana\n~~~\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/nirvana-labs/nirvana-cli/cmd/nirvana@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n<!-- x-release-please-end -->\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\nnirvana [resource] <command> [flags...]\n~~~\n\n~~~sh\nnirvana compute:vms create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: nvme}' \\\n --name my-vm \\\n --os-image-name ubuntu-noble-2025-10-01 \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --public-ip-enabled \\\n --region us-sva-1 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000 \\\n --cpu-config '{}' \\\n --memory-config '{}'\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Required |\n| ---------------------- | -------- |\n| `NIRVANA_LABS_API_KEY` | yes |\n\n### Global flags\n\n- `--api-key` (can also be set with `NIRVANA_LABS_API_KEY` env var)\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\nnirvana <command> --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\nnirvana <command> --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\nnirvana <command> <<YAML\narg:\n image: \"@abe.jpg\"\nYAML\n~~~\n\nIf you need to pass a string literal that begins with an `@` sign, you can\nescape the `@` sign to avoid accidentally passing a file.\n\n~~~bash\nnirvana <command> --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\nnirvana <command> --arg @data://file.txt\n~~~\n\n## Linking different Go SDK versions\n\nYou can link the CLI against a different version of the Nirvana Labs Go SDK\nfor development purposes using the `./scripts/link` script.\n\nTo link to a specific version from a repository (version can be a branch,\ngit tag, or commit hash):\n\n~~~bash\n./scripts/link github.com/org/repo@version\n~~~\n\nTo link to a local copy of the SDK:\n\n~~~bash\n./scripts/link ../path/to/nirvana-go\n~~~\n\nIf you run the link script without any arguments, it will default to `../nirvana-go`.\n",
3715
3719
  },
3716
3720
  ];
3717
3721
 
package/src/server.ts CHANGED
@@ -28,7 +28,7 @@ export const newMcpServer = async ({
28
28
  new McpServer(
29
29
  {
30
30
  name: 'nirvana_labs_nirvana_api',
31
- version: '1.76.1',
31
+ version: '1.77.0',
32
32
  },
33
33
  {
34
34
  instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),