Get a run
curl --request GET \
--url https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId} \
--cookie session=import requests
url = "https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}"
headers = {"cookie": "session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'session='}};
fetch('https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}")
.header("cookie", "session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'session='
response = http.request(request)
puts response.read_body{
"data": {
"status": "<string>",
"measured_cost_usd": 123,
"estimated_cost_usd": 123,
"tokens_in": 123,
"tokens_out": 123,
"simulation_id": "<string>",
"scenarios": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"category": "<string>",
"status": "<string>",
"offline_scores": {},
"trace_id": "<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": {}
}
}Get a run
A Cost Calculator run with its measured and estimated cost and per-scenario results.
Auth: session. Permission: member of the project’s organization.
GET
/
projects
/
{projectId}
/
cost-calculator
/
runs
/
{runId}
Get a run
curl --request GET \
--url https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId} \
--cookie session=import requests
url = "https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}"
headers = {"cookie": "session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'session='}};
fetch('https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}")
.header("cookie", "session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/cost-calculator/runs/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'session='
response = http.request(request)
puts response.read_body{
"data": {
"status": "<string>",
"measured_cost_usd": 123,
"estimated_cost_usd": 123,
"tokens_in": 123,
"tokens_out": 123,
"simulation_id": "<string>",
"scenarios": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"category": "<string>",
"status": "<string>",
"offline_scores": {},
"trace_id": "<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.
Response
Run detail.
Show child attributes
Show child attributes