curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data action=sagescreen_start_full_sage_build \
--data nonce=abc123def456 \
--data sage_id=1234import requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build"
payload = {
"action": "sagescreen_start_full_sage_build",
"nonce": "abc123def456",
"sage_id": "1234"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
action: 'sagescreen_start_full_sage_build',
nonce: 'abc123def456',
sage_id: '1234'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build', 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://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "action=sagescreen_start_full_sage_build&nonce=abc123def456&sage_id=1234",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build"
payload := strings.NewReader("action=sagescreen_start_full_sage_build&nonce=abc123def456&sage_id=1234")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("action=sagescreen_start_full_sage_build&nonce=abc123def456&sage_id=1234")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "action=sagescreen_start_full_sage_build&nonce=abc123def456&sage_id=1234"
response = http.request(request)
puts response.read_body{
"success": true,
"run_id": "run_abc123def456",
"total_time": 600000,
"steps": [
{
"name": "starting",
"label": "Starting",
"max_time": 30000,
"step_order": 1
},
{
"name": "creating_sage",
"label": "Creating Sage",
"max_time": 60000,
"step_order": 2
},
{
"name": "sage_generation",
"label": "Sage Generation",
"max_time": 120000,
"step_order": 3
},
{
"name": "test_shu",
"label": "Test Shu",
"max_time": 60000,
"step_order": 4
},
{
"name": "test_ha",
"label": "Test Ha",
"max_time": 60000,
"step_order": 5
},
{
"name": "test_ri",
"label": "Test Ri",
"max_time": 60000,
"step_order": 6
},
{
"name": "transcending_training",
"label": "Transcending Training",
"max_time": 120000,
"step_order": 7
},
{
"name": "enlightenment",
"label": "Enlightenment",
"max_time": 90000,
"step_order": 8
}
]
}Start sage build workflow
Initiates the full sage build process by calling the Python service. If a valid build is already in progress, resumes it instead of starting a new one.
Checks credits before starting (deduction happens at
complete_build). Non-admin users cannot rebuild a sage that
has already been completed.
Build timeout is 20 minutes. Timed-out builds are automatically cleared so the user can restart.
Registered as wp_ajax_sagescreen_start_full_sage_build — login required.
curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data action=sagescreen_start_full_sage_build \
--data nonce=abc123def456 \
--data sage_id=1234import requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build"
payload = {
"action": "sagescreen_start_full_sage_build",
"nonce": "abc123def456",
"sage_id": "1234"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
action: 'sagescreen_start_full_sage_build',
nonce: 'abc123def456',
sage_id: '1234'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build', 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://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "action=sagescreen_start_full_sage_build&nonce=abc123def456&sage_id=1234",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build"
payload := strings.NewReader("action=sagescreen_start_full_sage_build&nonce=abc123def456&sage_id=1234")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("action=sagescreen_start_full_sage_build&nonce=abc123def456&sage_id=1234")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_start_full_sage_build")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "action=sagescreen_start_full_sage_build&nonce=abc123def456&sage_id=1234"
response = http.request(request)
puts response.read_body{
"success": true,
"run_id": "run_abc123def456",
"total_time": 600000,
"steps": [
{
"name": "starting",
"label": "Starting",
"max_time": 30000,
"step_order": 1
},
{
"name": "creating_sage",
"label": "Creating Sage",
"max_time": 60000,
"step_order": 2
},
{
"name": "sage_generation",
"label": "Sage Generation",
"max_time": 120000,
"step_order": 3
},
{
"name": "test_shu",
"label": "Test Shu",
"max_time": 60000,
"step_order": 4
},
{
"name": "test_ha",
"label": "Test Ha",
"max_time": 60000,
"step_order": 5
},
{
"name": "test_ri",
"label": "Test Ri",
"max_time": 60000,
"step_order": 6
},
{
"name": "transcending_training",
"label": "Transcending Training",
"max_time": 120000,
"step_order": 7
},
{
"name": "enlightenment",
"label": "Enlightenment",
"max_time": 90000,
"step_order": 8
}
]
}Authorizations
WordPress AJAX nonce (passed as form field, verified per-action)
Body
Response
Build start result
- Option 1
- Option 2
true
Workflow run ID for polling
"run_abc123def456"
Sum of all step max_time values in milliseconds
600000
Show child attributes
Show child attributes
true if an existing build was resumed instead of starting fresh
false
Unix timestamp of build start (only present when resumed)
"1739980800"