Execute a run (streaming)
curl --request POST \
--url https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream \
--header 'Content-Type: application/json' \
--cookie session= \
--data '
{
"model_config_ids": [],
"org_slug": "<string>",
"project_slug": "<string>"
}
'import requests
url = "https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream"
payload = {
"model_config_ids": [],
"org_slug": "<string>",
"project_slug": "<string>"
}
headers = {
"cookie": "session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'session=', 'Content-Type': 'application/json'},
body: JSON.stringify({model_config_ids: [], org_slug: '<string>', project_slug: '<string>'})
};
fetch('https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream', 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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream",
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([
'model_config_ids' => [
],
'org_slug' => '<string>',
'project_slug' => '<string>'
]),
CURLOPT_COOKIE => "session=",
CURLOPT_HTTPHEADER => [
"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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream"
payload := strings.NewReader("{\n \"model_config_ids\": [],\n \"org_slug\": \"<string>\",\n \"project_slug\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "session=")
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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream")
.header("cookie", "session=")
.header("Content-Type", "application/json")
.body("{\n \"model_config_ids\": [],\n \"org_slug\": \"<string>\",\n \"project_slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_config_ids\": [],\n \"org_slug\": \"<string>\",\n \"project_slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}Execute a run (streaming)
Executes a run, optionally across several models at once, streaming newline-delimited JSON progress:
{"type":"batch_started","batchId","models":[...]}{"type":"scenario_started" | "scenario_done" | "scenario_failed", ...}{"type":"model_done","runId","modelIdentifier","status","passCount","totalCount", ...}{"type":"done","result":{...}}{"type":"error","message"}{"type":"ping"}heartbeat every 10 seconds
Can run for up to 800 seconds.
Auth: session. Permission: run_agents or manage_agents.
POST
/
projects
/
{projectId}
/
cost-calculator
/
runs
/
{runId}
/
execute
/
stream
Execute a run (streaming)
curl --request POST \
--url https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream \
--header 'Content-Type: application/json' \
--cookie session= \
--data '
{
"model_config_ids": [],
"org_slug": "<string>",
"project_slug": "<string>"
}
'import requests
url = "https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream"
payload = {
"model_config_ids": [],
"org_slug": "<string>",
"project_slug": "<string>"
}
headers = {
"cookie": "session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'session=', 'Content-Type': 'application/json'},
body: JSON.stringify({model_config_ids: [], org_slug: '<string>', project_slug: '<string>'})
};
fetch('https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream', 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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream",
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([
'model_config_ids' => [
],
'org_slug' => '<string>',
'project_slug' => '<string>'
]),
CURLOPT_COOKIE => "session=",
CURLOPT_HTTPHEADER => [
"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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream"
payload := strings.NewReader("{\n \"model_config_ids\": [],\n \"org_slug\": \"<string>\",\n \"project_slug\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "session=")
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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream")
.header("cookie", "session=")
.header("Content-Type", "application/json")
.body("{\n \"model_config_ids\": [],\n \"org_slug\": \"<string>\",\n \"project_slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}/execute/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_config_ids\": [],\n \"org_slug\": \"<string>\",\n \"project_slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}Authorizations
The session cookie set when you sign in to AgentHub or ModelHub in a browser. The cookie name shown here is illustrative. There are no API tokens for these endpoints.
Path Parameters
Project id.
Cost Calculator run id.
Body
application/json
Response
Event stream.
One JSON object per line.