Skip to main content
POST
/
v1
/
templates
/
build
Trigger template build
curl --request POST \
  --url https://api.hopx.dev/v1/templates/build \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "cpu": 123,
  "diskGB": 123,
  "from_image": "<string>",
  "memory": 123,
  "name": "<string>",
  "readyCmd": "<any>",
  "registry_credentials": {
    "password": "<string>",
    "token": "<string>",
    "type": "<string>",
    "username": "<string>"
  },
  "skipCache": true,
  "startCmd": "<string>",
  "steps": [
    "<any>"
  ],
  "update": true
}'
{
  "build_id": "<string>",
  "logs_url": "<string>",
  "request_id": "<string>",
  "status": "<string>",
  "template_id": "<string>"
}

Authorizations

X-API-Key
string
header
required

API key for authentication (format: sk_live_...)

Body

application/json

Template build configuration

cpu
integer
required

REQUIRED

diskGB
integer
required

REQUIRED

from_image
string
required

Base image (REQUIRED - separate from steps)

memory
integer
required

REQUIRED (MB)

name
string
required

Core fields - ALL REQUIRED, no defaults

readyCmd
any
registry_credentials
object

Private registry support

skipCache
boolean
startCmd
string

Optional

steps
any[]

Steps - build steps (RUN, COPY, ENV, WORKDIR, USER, CMD) Note: FROM is NOT a step, it's specified in from_image field

update
boolean

Update flag

Response

Build started successfully

build_id
string
logs_url
string
request_id
string
status
string
template_id
string