Skip to main content
Register images for use by Devboxes and blueprints with client.images. Fetch image records, inspect runtime metadata, optimize images for a site, and delete registered versions.

images.register()

Register an image reference under a name. Metadata that you omit is derived from the image by the service.

Example

API reference

Arguments and options

RegisterImageInput
required
OperationOptions
Optional signal and timeoutMs.

Return value

Returns the registered Image.

images.get()

Fetch a registered image using any supported selector.

Example

API reference

Arguments and options

ImageSelector
required
OperationOptions
Optional signal and timeoutMs.

Return value

Returns the matching Image.

images.list()

List one page of registered images. Built-in images are excluded by default.

Example

API reference

Arguments and options

ListImagesOptions

Return value

Returns a Page<Image> with items: Image[] and an optional nextCursor.

images.iterate()

Iterate through all registered images, fetching pages automatically.

Example

API reference

Arguments and options

Accepts includeBuiltin, signal, and timeoutMs. Iteration manages the cursor.

Return value

Returns an async iterator of Image objects.

images.inspect()

Inspect the effective user, environment, version, and optimization state of an image.

Example

API reference

Arguments and options

ImageSelector
required
OperationOptions
Optional signal and timeoutMs.
A string containing /, @, or : is inspected directly as a full image reference. Other selectors are resolved to the registered image’s repository@digest reference first.

Return value

string
The image’s effective user.
Record<string, string>
required
The effective environment.
string[]
required
The compute kinds for which this version is optimized.
string[]
required
The sites where this version is optimized.
bigint
required
The inspected version.
Date
When the version was created.

images.optimize()

Optimize an image for faster Devbox startup at a site. This operation can take several minutes and resolves only after optimization completes.

Example

API reference

Arguments and options

ImageSelector
required
OptimizeImageOptions

Return value

The promise resolves after the service reports completion. It rejects with ImageOptimizationError when the service reports failure or closes the progress stream before completion. The failure message is available on the error.

images.delete()

Delete a registered image version selected by reference, ID, name, or digest.

Example

API reference

Arguments and options

ImageSelector
required
OperationOptions
Optional signal and timeoutMs.

Return value

The SDK resolves the selector before deleting the selected version. The promise resolves after deletion completes.

Image selectors

A string containing @ selects the digest after the final @. Every other string is interpreted as an image name. Use an object selector for an ID or digest, or whenever you need to make the interpretation explicit. Add version to a digest selector to select a specific registered version.

Image metadata

string
The default workspace directory.
string
The default shell executable.
string
The remote user.
boolean
Whether Devboxes use privileged mode. Defaults to false when explicitly supplied as metadata.
Record<string, string>
Environment variables included in the image configuration.
BlueprintOperation[]
Operations run when a Devbox is created.
BlueprintOperation[]
Operations run when a Devbox starts.
BlueprintSession[]
Named commands made available as sessions.
string[]
Directories added to PATH.
Operations and sessions have these forms:
Command operations execute a command with structured arguments. Script operations run shell source. A session requires a name and command, with an optional emoji.

Image fields

string
required
The registered image ID.
string
required
The registered name.
string
required
The image repository.
string
required
The effective digest.
string
The source digest when it differs from the effective digest.
string
required
The resolved repository@digest reference.
bigint
required
The registered version.
string
The image description.
Date
When the image was registered.
Date
When the image expires.
boolean
required
Whether Namespace manages the image.
See Use blueprints to use registered images in reusable configurations and Create and manage Devboxes to create a Devbox from an image.
Last modified on August 26, 2026