Skip to main content
Use createComputeClient() to configure authentication and select the regional API endpoint. The returned client provides access to the compute services: instances, commands, storage, usage, observability, and management.

createComputeClient()

Create a client for the compute services. The client loads credentials when it first makes an authenticated request.

Example

Select another region or provide an explicit token source:

API reference

Arguments and options

ComputeClientOpts
Options used to configure the client.

Return value

createComputeClient() returns a ComputeClient. In examples, this object is assigned to the client variable.

ComputeClient

A ComputeClient exposes one service client per compute API. All six share the transport created with the client, so they use the same region and credentials.

Example

API reference

Each service client exposes its RPCs as camelCase methods. The table below lists what each service covers. Request and response types for every method are documented in the compute API reference. These pages cover the methods most applications need. The service clients expose every generated RPC, including internal ones such as optimizeImage, so use the generated API reference for anything not documented here.
ComputeClient has no close() method.

Explore the APIs

Create and manage instances

Create, wait for, inspect, list, extend, suspend, wake, and destroy instances.

Access and networking

Expose ingresses and read SSH, VNC, and Kubernetes configuration.

Authenticate with Namespace

Configure credentials for local development and automated workloads.

Get started with Compute

Create your first instance with the TypeScript SDK.

Compute platform

Learn about platforms, machine shapes, storage, and instance access.
Last modified on September 25, 2026