CreateInstance call, so everything about the machine and the workload it runs is set at creation time.
This page covers the fields of CreateInstanceRequest that select the machine, bound its lifetime, expose it on the network, give it storage, and choose the workload model.
The fields are the same in every language. Each example below shows the fragment to add to a CreateInstance request in Go and TypeScript, plus the JSON body a plain HTTP client sends.
See the quickstart for a complete create call.
Machine shape
shape selects the machine. machineArch accepts amd64 and arm64, and os accepts linux and macos.
selectors adds further constraints on placement, such as a macOS version.
Deadline
deadline is a request, not a guarantee. Workspace policy can shorten it, so read metadata.deadline on the response for the deadline that actually applies.
Use ExtendInstance to push it out while work is still in progress. Its ensureMinimum field is idempotent, which makes it suitable for a heartbeat.
Exported ports
exportPorts publishes a container port through the platform. proto is either HTTP, where Namespace terminates TLS and forwards cleartext HTTP to your container, or TCP, where Namespace terminates TLS and proxies the raw stream.
containers[].exportedPort[].
Exported ports are container-scoped and Linux only. To expose a port on macOS, or to add an endpoint after boot, use the ingresses field or the CreateIngress RPC.
Exported endpoints require Namespace authentication by default. See access controls for how to authenticate a caller or make a route public.
Volumes
A container volume withpersistencyKind: CACHE is restored on a best-effort basis from the most recent volume carrying the same tag, which lets a new instance start with a warm cache.
PERSISTENT instead when the data has to survive reliably. Those volumes are snapshotted on shutdown.
See cache volumes for how tags and reuse work.
macOS workloads
macOS instances runapplications rather than containers. imageRef is used only to distribute the files: the platform extracts the image filesystem and runs command against it.
ENTRYPOINT and CMD from the image configuration are not used.
Reusing an instance
experimental.uniqueTag makes creation idempotent. Repeating a request with the same tag returns the running instance instead of creating a second one, and ReleaseUniqueTag gives the tag up again.
Fields under experimental can change or be removed at any time.