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 Python SDK, create a service account and prepare its authentication credentials.
  2. Create a Python file with the following code. This script initializes the SDK with the authentication credentials 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.
    • <private_key_file_path>: Path to the private key file.
    • <public_key_ID>: Authorized key ID.
    • <service_account_ID>: Service account ID.
    • <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.