Sandboxes
Build Image
Builds an OCI image for use by sandboxes. Poll Get Image
until it is ready, then pass its image_id when creating a sandbox.
Repeated requests join an active build. Completed tags rebuild; completed digest references are reused. During a rebuild, sandboxes can use the last successful digest. Submit the request again to retry a failed or unresponsive build.
POST
/
api
/
images
Build a sandbox image
curl --request POST \
--url https://control.green.us-east-1.aws.prod.archil.com/api/images \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "ghcr.io/acme/agent-runtime:v2",
"registry_auth": {
"username": "YOUR_REGISTRY_USERNAME",
"password": "YOUR_REGISTRY_TOKEN"
}
}
'import requests
url = "https://control.green.us-east-1.aws.prod.archil.com/api/images"
payload = {
"source": "ghcr.io/acme/agent-runtime:v2",
"registry_auth": {
"username": "YOUR_REGISTRY_USERNAME",
"password": "YOUR_REGISTRY_TOKEN"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source: 'ghcr.io/acme/agent-runtime:v2',
registry_auth: {username: 'YOUR_REGISTRY_USERNAME', password: 'YOUR_REGISTRY_TOKEN'}
})
};
fetch('https://control.green.us-east-1.aws.prod.archil.com/api/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://control.green.us-east-1.aws.prod.archil.com/api/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source' => 'ghcr.io/acme/agent-runtime:v2',
'registry_auth' => [
'username' => 'YOUR_REGISTRY_USERNAME',
'password' => 'YOUR_REGISTRY_TOKEN'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://control.green.us-east-1.aws.prod.archil.com/api/images"
payload := strings.NewReader("{\n \"source\": \"ghcr.io/acme/agent-runtime:v2\",\n \"registry_auth\": {\n \"username\": \"YOUR_REGISTRY_USERNAME\",\n \"password\": \"YOUR_REGISTRY_TOKEN\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://control.green.us-east-1.aws.prod.archil.com/api/images")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"ghcr.io/acme/agent-runtime:v2\",\n \"registry_auth\": {\n \"username\": \"YOUR_REGISTRY_USERNAME\",\n \"password\": \"YOUR_REGISTRY_TOKEN\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.green.us-east-1.aws.prod.archil.com/api/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"ghcr.io/acme/agent-runtime:v2\",\n \"registry_auth\": {\n \"username\": \"YOUR_REGISTRY_USERNAME\",\n \"password\": \"YOUR_REGISTRY_TOKEN\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"image_id": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"source": "ghcr.io/acme/agent-runtime:v2",
"private": true,
"status": "building",
"created_at": "2026-10-06T12:00:00Z",
"updated_at": "2026-10-06T12:00:00Z"
}
}
Authorizations
API key
Body
application/json
Was this page helpful?
Build a sandbox image
curl --request POST \
--url https://control.green.us-east-1.aws.prod.archil.com/api/images \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "ghcr.io/acme/agent-runtime:v2",
"registry_auth": {
"username": "YOUR_REGISTRY_USERNAME",
"password": "YOUR_REGISTRY_TOKEN"
}
}
'import requests
url = "https://control.green.us-east-1.aws.prod.archil.com/api/images"
payload = {
"source": "ghcr.io/acme/agent-runtime:v2",
"registry_auth": {
"username": "YOUR_REGISTRY_USERNAME",
"password": "YOUR_REGISTRY_TOKEN"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source: 'ghcr.io/acme/agent-runtime:v2',
registry_auth: {username: 'YOUR_REGISTRY_USERNAME', password: 'YOUR_REGISTRY_TOKEN'}
})
};
fetch('https://control.green.us-east-1.aws.prod.archil.com/api/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://control.green.us-east-1.aws.prod.archil.com/api/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source' => 'ghcr.io/acme/agent-runtime:v2',
'registry_auth' => [
'username' => 'YOUR_REGISTRY_USERNAME',
'password' => 'YOUR_REGISTRY_TOKEN'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://control.green.us-east-1.aws.prod.archil.com/api/images"
payload := strings.NewReader("{\n \"source\": \"ghcr.io/acme/agent-runtime:v2\",\n \"registry_auth\": {\n \"username\": \"YOUR_REGISTRY_USERNAME\",\n \"password\": \"YOUR_REGISTRY_TOKEN\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://control.green.us-east-1.aws.prod.archil.com/api/images")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"ghcr.io/acme/agent-runtime:v2\",\n \"registry_auth\": {\n \"username\": \"YOUR_REGISTRY_USERNAME\",\n \"password\": \"YOUR_REGISTRY_TOKEN\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.green.us-east-1.aws.prod.archil.com/api/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"ghcr.io/acme/agent-runtime:v2\",\n \"registry_auth\": {\n \"username\": \"YOUR_REGISTRY_USERNAME\",\n \"password\": \"YOUR_REGISTRY_TOKEN\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"image_id": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"source": "ghcr.io/acme/agent-runtime:v2",
"private": true,
"status": "building",
"created_at": "2026-10-06T12:00:00Z",
"updated_at": "2026-10-06T12:00:00Z"
}
}