Images
Build named images from registry references or Dockerfiles.
Named images are project-scoped, pre-built boot artifacts. Building is asynchronous: POST /images returns a job_id and the image starts pending, becoming ready or failed. Sandboxes can then reference the image by name on POST /vms. See Image Sources and the Images concept guide.
POST /images (JSON)
Build (or re-build) a named image from a registry reference. Re-posting an existing name replaces its source and re-triggers the build. If the project has a registry credential matching the ref's host, the pull authenticates automatically.
Request
| Field | Type | Required / default | Description |
|---|---|---|---|
name | string | required | Project-unique image name. |
source | object | required | Image source, e.g. { "type": "registry", "ref": "node:20" }. |
docker | bool | false | Mark the image Docker-capable: sandboxes created from it get a dedicated Docker data device by default. |
region | string | resolved default | Home region for the build. Other regions replicate the artifact on first use. |
Errors
400— invalid JSON, or an unknown/disabledregion.503— build queue temporarily degraded; nothing was enqueued, safe to retry.
POST /images (multipart)
Build a named image from a Dockerfile and build context. Send multipart/form-data:
| Field | Type | Required / default | Description |
|---|---|---|---|
name | text | required | Project-unique image name. |
context | file | required | Build context as a tar archive. |
dockerfile | text | "Dockerfile" | Path to the Dockerfile within the context. |
docker | text | false | 1/true/yes/on to mark the image Docker-capable. |
region | text | resolved default | Home region for the build. |
The response is the same shape as the JSON form.
Errors
400— missingname, missingcontextfile, malformed multipart body, or an unknown/disabledregion.
GET /images
List the project's images, newest first, with cursor pagination (limit default 100, max 200; cursor from a previous next_cursor).
Image statuses: pending → ready | failed. manifest_name and layer_count are set once the build completes.
GET /jobs/:id
Poll a background job — image builds, sandbox creates, and snapshot captures all return a job_id. A job is visible only when the sandbox or image it acts on belongs to the caller's project.
Job statuses: queued → running → done | failed. Job kinds include build, vm.create, and snapshot.create.
Note: polling the resource itself (
GET /images,GET /vms/:id?wait=,GET /snapshots/:id?wait=ready) is usually more convenient than polling the job.
Errors
404— unknown job, or a job whose resource belongs to another project.