Prerequisites
- Web console
- CLI
- Go SDK
- Python SDK
- JavaScript SDK
-
Install and configure the Nebius AI Cloud CLI.
Check that your project ID is saved in the Nebius AI Cloud CLI profile configuration:
cat ~/.nebius/config.yaml
Steps
- Web console
- CLI
- Go SDK
- Python SDK
- JavaScript SDK
- In the sidebar, go to
Serverless AI → Devlabs.
- Find the Devlab and then click
→ Stop or Restart.
- In the window that opens, confirm the action.
-
List Devlabs and copy the ID of the Devlab that you want to stop:
nebius ai devlab list -
To stop a Devlab, run the following command:
nebius ai devlab stop <devlab_ID> -
To restart a Devlab, run the following command:
nebius ai devlab restart <devlab_ID>
-
List Devlabs:
In
listDevlabService := sdk.Services().Ai().V1().Devlab() listDevlabsRequest := &ai.ListDevlabsRequest{ ParentId: "<project_ID>", } for { devlabs, err := listDevlabService.List( ctx, listDevlabsRequest, ) if err != nil { return fmt.Errorf("list devlabs: %w", err) } fmt.Println(devlabs) if devlabs.GetNextPageToken() == "" { break } listDevlabsRequest.PageToken = devlabs.GetNextPageToken() }ai.ListDevlabsRequest, setParentIdto the project ID. In the response, copy theMetadata.Idof the Devlab to stop. -
Stop the Devlab:
In
stopDevlabService := sdk.Services().Ai().V1().Devlab() stopDevlabOperation, err := stopDevlabService.Stop( ctx, &ai.StopDevlabRequest{Id: "<devlab_ID>"}, ) if err != nil { return fmt.Errorf("stop devlab: %w", err) } if _, err = stopDevlabOperation.Wait(ctx); err != nil { return fmt.Errorf("wait for devlab stop: %w", err) }ai.StopDevlabRequest, setIdto the Devlab ID. The sample waits for the stop operation to complete. -
When you need the Devlab again, restart it:
In
restartDevlabService := sdk.Services().Ai().V1().Devlab() restartDevlabOperation, err := restartDevlabService.Restart( ctx, &ai.RestartDevlabRequest{Id: "<devlab_ID>"}, ) if err != nil { return fmt.Errorf("restart devlab: %w", err) } if _, err = restartDevlabOperation.Wait(ctx); err != nil { return fmt.Errorf("wait for devlab restart: %w", err) }ai.RestartDevlabRequest, setIdto the same Devlab ID. The sample waits for the restart operation to complete.
-
List Devlabs:
In
list_devlab_service = DevlabServiceClient(sdk) list_devlabs_request = ListDevlabsRequest( parent_id="<project_ID>", ) while True: devlabs = await list_devlab_service.list( list_devlabs_request, ) print(devlabs) if not devlabs.next_page_token: break list_devlabs_request.page_token = devlabs.next_page_tokenListDevlabsRequest, setparent_idto the project ID. In the response, copy themetadata.idof the Devlab to stop. -
Stop the Devlab:
In
stop_devlab_service = DevlabServiceClient(sdk) stop_devlab_operation = await stop_devlab_service.stop( StopDevlabRequest(id="<devlab_ID>"), ) await stop_devlab_operation.wait()StopDevlabRequest, setidto the Devlab ID. The sample waits for the stop operation to complete. -
When you need the Devlab again, restart it:
In
restart_devlab_service = DevlabServiceClient(sdk) restart_devlab_operation = await restart_devlab_service.restart( RestartDevlabRequest(id="<devlab_ID>"), ) await restart_devlab_operation.wait()RestartDevlabRequest, setidto the same Devlab ID. The sample waits for the restart operation to complete.
-
List Devlabs:
In
const listDevlabService = new DevlabService(sdk); const listDevlabsRequest = ListDevlabsRequest.create({ parentId: "<project_ID>", }); while (true) { const devlabs = await listDevlabService.list( listDevlabsRequest, ); console.log(devlabs); if (!devlabs.nextPageToken) { break; } listDevlabsRequest.pageToken = devlabs.nextPageToken; }ListDevlabsRequest, setparentIdto the project ID. In the response, copy themetadata.idof the Devlab to stop. -
Stop the Devlab:
In
const stopDevlabService = new DevlabService(sdk); const stopDevlabOperation = await stopDevlabService.stop( StopDevlabRequest.create({ id: "<devlab_ID>" }), ).result; await stopDevlabOperation.wait();StopDevlabRequest, setidto the Devlab ID. The sample waits for the stop operation to complete. -
When you need the Devlab again, restart it:
In
const restartDevlabService = new DevlabService(sdk); const restartDevlabOperation = await restartDevlabService.restart( RestartDevlabRequest.create({ id: "<devlab_ID>" }), ).result; await restartDevlabOperation.wait();RestartDevlabRequest, setidto the same Devlab ID. The sample waits for the restart operation to complete.