Skip to main content
The SDK provides service clients grouped by Nebius AI Cloud service and API version. When your application calls a typed client method, the SDK constructs and sends the corresponding API request. For mutating operations, such as creating, updating and deleting resources, the SDK returns an operation object. If an operation is asynchronous, call Wait to wait until it is completed. The following example creates a Compute virtual machine (VM).
  1. Install the Go SDK, create a service account and generate its credentials file.
  2. Create a Go file with the following code. This script initializes the SDK with the service account credentials file prepared in the previous step.
    In the script, set the following parameters:
    • <application_name>/<application_version_or_comment>: Application or library name and optional version or comment.
    • <credentials_file_path>: Path to the service account credentials file.
    • <project_ID>: Project ID.
    • <image_family_name>: Boot disk image family, for example, ubuntu24.04-driverless.
    • <platform_name>: Compute platform, for example, cpu-e2.
    • <preset_name>: Resource preset available for the selected platform, for example, 2vcpu-8gb for cpu-e2.
    • <subnet_ID>: Subnet ID.
  3. Execute the file:
After you run the example, delete the VM and its boot disk if you no longer need them. Otherwise, Compute continues charging for these resources.