Skip to main content
POST
Build an image

Authorizations

Authorization
string
header
required

An API key (zode_tok_...). Create one in the console under API keys (https://console.zode.dev/tokens), or with zode login.

Body

application/json

Exactly one of dockerfile and setup.

name
string
required
Pattern: ^[a-z0-9][a-z0-9._-]{0,62}$
dockerfile
string

FROM zode/base (or ubuntu:24.04) runs each instruction in the VM; any other FROM is built with docker build inside the VM. No build context: COPY and ADD of local files are refused.

Maximum string length: 65536
setup
object
vcpus
enum<integer>

With ram_mb, picks one of the sizes in GET /v1/images images (see CreateSandboxRequest); both left out is the default size, small. The image keeps the size: its sandboxes have it.

Available options:
2,
4,
8,
16
ram_mb
enum<integer>
Available options:
4096,
8192,
16384,
32768
region
enum<string>
default:eu-central

eu-central is the only region today; more will be added.

Available options:
eu-central
timeout_minutes
integer
default:30
Required range: 1 <= x <= 60

Response

Build started

id
string
required
Pattern: ^img_[a-z2-7]{16}$
name
string
required
status
enum<string>
required
Available options:
building,
ready,
failed
error
string | null
required
source_kind
enum<string>
required
Available options:
dockerfile,
setup
vcpus
integer
required
ram_mb
integer
required
disk_gb
integer
required
base
string | null
required

The base golden it was built from.

region
string
required
log_bytes
integer<int64>
required
created_by
null | object
required
created_at
string<date-time>
required
finished_at
string<date-time> | null
required
dockerfile
string

GET one image and create only.

setup
object
warnings
string[]

Create only. Instructions that do nothing in Zode.