canonical: https://jentic.com/apis/googleapis.com/compute

# Google Compute Engine API

The Compute Engine API creates and runs virtual machines on Google Cloud Platform and is one of the largest control surfaces in GCP, covering instances, instance groups, disks, images, networks, subnetworks, firewalls, load balancers, routers, VPNs, and global networking primitives. It is the foundation for IaaS workloads on Google Cloud and is the same API the gcloud CLI and Terraform provider use under the hood. Most platform teams interact with a focused subset around instances, disks, and networking rather than the full surface.

## For AI agents

Provision VMs, disks, networks, firewalls, and load balancers on Google Cloud across more than 800 endpoints. Lets agents stand up and operate full Compute Engine infrastructure programmatically.

## Scope

Does not run managed Kubernetes, serverless containers, or managed databases - use for IaaS primitives (VMs, disks, networks, load balancers) on Google Cloud only.

## Capabilities

- Create, start, stop, reset, and delete VM instances per zone
- Take incremental snapshots of persistent disks and restore disks from snapshots
- Configure VPC networks, subnets, firewall rules, and routes
- Resize and roll out updates to managed instance groups
- Provision global HTTP load balancers with backend services and URL maps
- Manage VM service accounts and access scopes

## Use cases

### Programmatic VM Provisioning

Create Compute Engine VMs from automation, CI/CD pipelines, or platform tooling without going through the Cloud Console. The instances.insert endpoint accepts the machine type, image, network, and metadata, and the API returns a long-running operation that resolves once the VM is RUNNING. This is the core building block for self-service developer environments and ephemeral build runners.

Example prompt: Create a VM named build-runner-42 in us-central1-a from image debian-12 with machine type n1-standard-2 and the default VPC

### Managed Instance Group Autoscaling

Operate managed instance groups that scale a stateless web service in response to load. The API exposes resize, recreateInstances, and policy update endpoints so platform teams can codify scale events, rolling restarts, and version rollouts without manual clicks. Most teams keep the autoscaler in charge for normal load and use the API only for surgical interventions.

Example prompt: Resize managed instance group projects/acme/regions/us-central1/instanceGroupManagers/web from 4 to 12 and wait for the operation to complete

### Network And Firewall Codification

Define VPCs, subnets, firewall rules, and routes through the API so the network topology is codified rather than clicked together. Compute Engine exposes networks, subnetworks, firewalls, and routers under one API, which keeps Terraform-style automation, drift detection, and disaster recovery rebuilds straightforward.

Example prompt: Create a firewall rule allow-https in the default network that permits TCP/443 from 0.0.0.0/0 to instances tagged web-server

### Disk Snapshot Backup And Restore

Snapshot persistent disks on a schedule and restore from them to recover from accidental deletions or corruption. The disks.createSnapshot endpoint takes an incremental snapshot stored in Cloud Storage, and disks.insert with sourceSnapshot creates a new disk from any prior snapshot, giving operators a fast point-in-time recovery path.

Example prompt: Take a snapshot of disk projects/acme/zones/us-central1-a/disks/db-data named db-data-2026-06-10 and store it in the default project

### Agent-Driven Infrastructure Operations

An AI agent can run controlled infrastructure operations - restart a stuck VM, expand a disk, or open a firewall port for a debug session - by calling Compute Engine through Jentic. Because Jentic returns the operation schema, the agent can target the exact endpoint it needs out of the 800+ surface area without parsing the discovery doc.

Example prompt: Use Jentic to call instances.reset on projects/acme/zones/us-central1-a/instances/api-server-3 and poll the returned operation until DONE

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /projects/{project}/zones/{zone}/instances | Create a VM instance in a zone |
| GET | /projects/{project}/zones/{zone}/instances | List VM instances in a zone |
| POST | /projects/{project}/zones/{zone}/instances/{instance}/reset | Hard-reset a running VM instance |
| POST | /projects/{project}/zones/{zone}/disks/{disk}/createSnapshot | Snapshot a persistent disk for backup |
| POST | /projects/{project}/global/firewalls | Create a firewall rule on a VPC network |
| POST | /projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize | Resize a managed instance group |

## Key resources

- **Instances** — Create, start, stop, reset, delete, and list VM instances per zone
- **Disks and Snapshots** — Manage persistent disks, regional disks, and disk snapshots
- **Images** — Create custom images and list public images for VM creation
- **Networks and Subnetworks** — Define VPC networks and regional subnets for Compute resources
- **Firewalls and Firewall Policies** — Control ingress and egress for VM instances at network and policy level
- **Instance Groups and Templates** — Manage managed and unmanaged instance groups, autoscalers, and templates
- **Load Balancers** — Configure backend services, forwarding rules, target proxies, and URL maps

## Why Jentic

- **Setup:** Wiring the Compute Engine API by hand means setting up Google OAuth 2.0, minting short-lived tokens against the cloud-platform scope, and routing each call across its 800-plus endpoint surface at compute.googleapis.com yourself. Through Jentic you install once, import the Compute Engine API from the API Directory, store the OAuth credential once, and your agent calls it.
- **Permission scoping:** Compute Engine puts the project, zone, and instance ids in the URL path (/projects/{project}/zones/{zone}/instances/{instance}/reset), so a rule can pin your agent to one project: it can create and list instances there and nothing else. You choose the operations it may call, so instance reset or firewall creation are not included unless you add them.
- **Credential handling:** Your Compute Engine OAuth credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a GCP VM' or 'add a firewall rule', and Jentic returns the matching Compute Engine operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Kubernetes Engine API** — Managed Kubernetes instead of raw VMs
- **Cloud Run Admin API** — Serverless containers without managing VMs at all
- **Identity and Access Management (IAM) API** — Manages the service accounts and roles attached to Compute Engine VMs

## FAQ

### What authentication does the Compute Engine API use?

It uses Google OAuth 2.0 with scopes such as https://www.googleapis.com/auth/compute and the broader cloud-platform scope. Through Jentic the OAuth credentials are stored encrypted in your Jentic One instance and the agent receives only short-lived access tokens at execution time.

### Can I create and start a VM with a single API call?

Yes. Send a POST to /compute/v1/projects/{project}/zones/{zone}/instances with the machine type, source image, network interface, and metadata. The endpoint returns a long-running operation that resolves once the VM transitions to RUNNING.

### What are the rate limits for the Compute Engine API?

Compute Engine enforces per-project read and write quotas per minute, with regional resource quotas (CPUs, IPs, disks) governing actual provisioning. Heavy automation should batch reads, use list pagination, and respect the operation polling backoff so you do not exhaust the per-minute control-plane budget.

### How do I provision a VM through Jentic?

Search Jentic for 'create gcp vm', load the instances.insert schema, and execute the call against /compute/v1/projects/{project}/zones/{zone}/instances with the machine type, source image, and network. Jentic returns the schema so the agent fills only the required fields out of Compute Engine's 800+ endpoint surface.

### Is the Compute Engine API free?

The API has no per-call charge - you pay only for the underlying resources you create such as VM-hours, persistent disks, and egress. Free-tier credits cover small e2-micro instances in eligible regions.

### How do I take a disk snapshot for backup?

Call POST on /compute/v1/projects/{project}/zones/{zone}/disks/{disk}/createSnapshot with a name and labels. Snapshots are incremental and stored in Cloud Storage, and a new disk can be created from any snapshot via disks.insert with sourceSnapshot.

### Can I limit what my agent is allowed to do with the Compute Engine API?

Yes. Because you run Jentic One yourself, your own rules decide which Compute Engine operations and credentials the agent may use. Compute Engine puts the project, zone, and instance ids in the URL path, such as /projects/{project}/zones/{zone}/instances/{instance}/reset, so you can pin the agent to a single project where it may only create and list instances and nothing else. Operations like instance reset, firewall creation, or disk snapshots are excluded unless you explicitly add them to the agent's allowed set.
