curl --request GET \
--url https://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor \
--header 'Authorization: Bearer <token>'import requests
url = "https://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor', 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://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session_id": "<string>",
"anchor": {
"criterion_id": "<string>",
"criterion_name": "<string>",
"judge_model": "<string>",
"judge_mode": "corrected"
},
"certificate": "<unknown>",
"rule": {
"window": 123,
"gap_floor": 123,
"drop_floor": 123,
"consecutive": 123,
"min_prompts": 123
},
"history": [
{
"step": "<string>",
"at": "2023-11-07T05:31:56Z",
"n": 123,
"reward_rate": 123,
"anchor_rate": 123,
"anchor_ci": [
123
],
"anchor_corrected": true,
"masked": 123,
"gap_se": 123
}
],
"holds": [
{
"step": "<string>",
"at": "2023-11-07T05:31:56Z",
"state": "clear",
"reason": "<string>",
"pinned_step": "<string>"
}
],
"current": {
"held": true,
"held_at": "<string>",
"held_state": "<string>",
"held_reason": "<string>",
"pinned_step": "<string>",
"resumed_at": "<string>"
},
"summary": {
"checks": 123,
"usable_checks": 123,
"holds": 123,
"max_divergence": 123,
"max_divergence_step": "<string>",
"max_gap_widening": 123,
"max_gap_widening_step": "<string>",
"anchor_range": [
123
],
"reward_range": [
123
],
"first_step": "<string>",
"last_step": "<string>"
}
}{
"error": {
"message": "Invalid API key",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}The anchor report
The whole anchor picture for a session, uncached (Cache-Control: no-store): the anchor’s identity and its live certificate, the rule in force, every stored check, every hold with its state, reason and pinned step (the rule replayed over the history; the current hold carries the reason the trainer was told), the current hold state, and a summary. The same document sits inside the signed environment bundle. From Python: python -m errorbar_reward.anchor_report <session_id> [--json]. Read scope.
curl --request GET \
--url https://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor \
--header 'Authorization: Bearer <token>'import requests
url = "https://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor', 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://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.errorbar.ai/v1/reward/sessions/{id}/anchor")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session_id": "<string>",
"anchor": {
"criterion_id": "<string>",
"criterion_name": "<string>",
"judge_model": "<string>",
"judge_mode": "corrected"
},
"certificate": "<unknown>",
"rule": {
"window": 123,
"gap_floor": 123,
"drop_floor": 123,
"consecutive": 123,
"min_prompts": 123
},
"history": [
{
"step": "<string>",
"at": "2023-11-07T05:31:56Z",
"n": 123,
"reward_rate": 123,
"anchor_rate": 123,
"anchor_ci": [
123
],
"anchor_corrected": true,
"masked": 123,
"gap_se": 123
}
],
"holds": [
{
"step": "<string>",
"at": "2023-11-07T05:31:56Z",
"state": "clear",
"reason": "<string>",
"pinned_step": "<string>"
}
],
"current": {
"held": true,
"held_at": "<string>",
"held_state": "<string>",
"held_reason": "<string>",
"pinned_step": "<string>",
"resumed_at": "<string>"
},
"summary": {
"checks": 123,
"usable_checks": 123,
"holds": 123,
"max_divergence": 123,
"max_divergence_step": "<string>",
"max_gap_widening": 123,
"max_gap_widening_step": "<string>",
"anchor_range": [
123
],
"reward_range": [
123
],
"first_step": "<string>",
"last_step": "<string>"
}
}{
"error": {
"message": "Invalid API key",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}Authorizations
Your workspace API key, e.g. sk_sovereign_..., sent as Authorization: Bearer <key>.
Path Parameters
Response
The report.
Show child attributes
Show child attributes
The anchor criterion's full signed certificate as issued now; null if the criterion no longer exists.
The thresholds this session decides under.
Show child attributes
Show child attributes
Every stored check, not the session view's 20-point tail.
Show child attributes
Show child attributes
The rule replayed over each prefix of the history; the current hold carries the reason the trainer was told.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes