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 registeredImage.
images.get()
Fetch a registered image using any supported selector.
Example
API reference
Arguments and options
ImageSelector
required
See Image selectors.
OperationOptions
Optional
signal and timeoutMs.Return value
Returns the matchingImage.
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 aPage<Image> with items: Image[] and an optional nextCursor.
images.iterate()
Iterate through all registered images, fetching pages automatically.
Example
API reference
Arguments and options
AcceptsincludeBuiltin, signal, and timeoutMs. Iteration manages the cursor.
Return value
Returns an async iterator ofImage objects.
images.inspect()
Inspect the effective user, environment, version, and optimization state of an image.
Example
API reference
Arguments and options
ImageSelector
required
See Image selectors.
OperationOptions
Optional
signal and timeoutMs./, @, 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
See Image selectors.
OptimizeImageOptions
Return value
The promise resolves after the service reports completion. It rejects withImageOptimizationError 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
See Image selectors.
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
@ 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.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.