Report a trial run outside the platform
curl --request POST \
--url https://api.anpord.com/v1/evals.reportTrial \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"trial": {
"caseName": "<string>",
"events": [
{
"_tag": "Started",
"model": "<string>",
"sessionId": "<string>",
"at": 123
}
],
"ordinal": 1,
"outcome": {
"commandCount": 123,
"exitCode": 123,
"modelMs": 123,
"passed": true,
"sandboxMs": 123,
"verifySteps": [
{
"command": "<string>",
"exitCode": 123
}
],
"voidFields": [
"<string>"
],
"artifacts": [
{
"path": "<string>",
"byteSize": 1,
"sha256": "<string>"
}
],
"validations": [
{
"id": "<string>",
"index": 1,
"name": "<string>",
"startedAt": 123,
"durationMs": 1,
"message": "<string>",
"exitCode": 123,
"truncated": true,
"input": {
"text": "<string>",
"truncated": true
},
"output": {
"text": "<string>",
"truncated": true
},
"error": {
"text": "<string>",
"truncated": true
},
"calls": [
{
"index": 1,
"startedAt": 123,
"durationMs": 1,
"input": {
"text": "<string>",
"truncated": true
},
"output": {
"text": "<string>",
"truncated": true
},
"error": {
"text": "<string>",
"truncated": true
}
}
],
"logs": [
{
"index": 1,
"at": 123,
"value": {
"text": "<string>",
"truncated": true
}
}
]
}
],
"judgments": [
{
"name": "<string>",
"model": "<string>",
"evaluator": "<string>",
"score": 0.5,
"choice": "<string>",
"reason": "<string>",
"threshold": 0.5,
"durationMs": 1,
"error": "<string>"
}
]
},
"taskIndex": 1,
"sandboxId": "<string>",
"usage": {
"cacheReadTokens": 123,
"cacheWriteTokens": 123,
"inputTokens": 123,
"outputTokens": 123,
"totalTokens": 123,
"costUsd": 123
}
}
}
'import requests
url = "https://api.anpord.com/v1/evals.reportTrial"
payload = {
"id": "<string>",
"trial": {
"caseName": "<string>",
"events": [
{
"_tag": "Started",
"model": "<string>",
"sessionId": "<string>",
"at": 123
}
],
"ordinal": 1,
"outcome": {
"commandCount": 123,
"exitCode": 123,
"modelMs": 123,
"passed": True,
"sandboxMs": 123,
"verifySteps": [
{
"command": "<string>",
"exitCode": 123
}
],
"voidFields": ["<string>"],
"artifacts": [
{
"path": "<string>",
"byteSize": 1,
"sha256": "<string>"
}
],
"validations": [
{
"id": "<string>",
"index": 1,
"name": "<string>",
"startedAt": 123,
"durationMs": 1,
"message": "<string>",
"exitCode": 123,
"truncated": True,
"input": {
"text": "<string>",
"truncated": True
},
"output": {
"text": "<string>",
"truncated": True
},
"error": {
"text": "<string>",
"truncated": True
},
"calls": [
{
"index": 1,
"startedAt": 123,
"durationMs": 1,
"input": {
"text": "<string>",
"truncated": True
},
"output": {
"text": "<string>",
"truncated": True
},
"error": {
"text": "<string>",
"truncated": True
}
}
],
"logs": [
{
"index": 1,
"at": 123,
"value": {
"text": "<string>",
"truncated": True
}
}
]
}
],
"judgments": [
{
"name": "<string>",
"model": "<string>",
"evaluator": "<string>",
"score": 0.5,
"choice": "<string>",
"reason": "<string>",
"threshold": 0.5,
"durationMs": 1,
"error": "<string>"
}
]
},
"taskIndex": 1,
"sandboxId": "<string>",
"usage": {
"cacheReadTokens": 123,
"cacheWriteTokens": 123,
"inputTokens": 123,
"outputTokens": 123,
"totalTokens": 123,
"costUsd": 123
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
trial: {
caseName: '<string>',
events: [{_tag: 'Started', model: '<string>', sessionId: '<string>', at: 123}],
ordinal: 1,
outcome: {
commandCount: 123,
exitCode: 123,
modelMs: 123,
passed: true,
sandboxMs: 123,
verifySteps: [{command: '<string>', exitCode: 123}],
voidFields: ['<string>'],
artifacts: [{path: '<string>', byteSize: 1, sha256: '<string>'}],
validations: [
{
id: '<string>',
index: 1,
name: '<string>',
startedAt: 123,
durationMs: 1,
message: '<string>',
exitCode: 123,
truncated: true,
input: {text: '<string>', truncated: true},
output: {text: '<string>', truncated: true},
error: {text: '<string>', truncated: true},
calls: [
{
index: 1,
startedAt: 123,
durationMs: 1,
input: {text: '<string>', truncated: true},
output: {text: '<string>', truncated: true},
error: {text: '<string>', truncated: true}
}
],
logs: [{index: 1, at: 123, value: {text: '<string>', truncated: true}}]
}
],
judgments: [
{
name: '<string>',
model: '<string>',
evaluator: '<string>',
score: 0.5,
choice: '<string>',
reason: '<string>',
threshold: 0.5,
durationMs: 1,
error: '<string>'
}
]
},
taskIndex: 1,
sandboxId: '<string>',
usage: {
cacheReadTokens: 123,
cacheWriteTokens: 123,
inputTokens: 123,
outputTokens: 123,
totalTokens: 123,
costUsd: 123
}
}
})
};
fetch('https://api.anpord.com/v1/evals.reportTrial', 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://api.anpord.com/v1/evals.reportTrial",
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([
'id' => '<string>',
'trial' => [
'caseName' => '<string>',
'events' => [
[
'_tag' => 'Started',
'model' => '<string>',
'sessionId' => '<string>',
'at' => 123
]
],
'ordinal' => 1,
'outcome' => [
'commandCount' => 123,
'exitCode' => 123,
'modelMs' => 123,
'passed' => true,
'sandboxMs' => 123,
'verifySteps' => [
[
'command' => '<string>',
'exitCode' => 123
]
],
'voidFields' => [
'<string>'
],
'artifacts' => [
[
'path' => '<string>',
'byteSize' => 1,
'sha256' => '<string>'
]
],
'validations' => [
[
'id' => '<string>',
'index' => 1,
'name' => '<string>',
'startedAt' => 123,
'durationMs' => 1,
'message' => '<string>',
'exitCode' => 123,
'truncated' => true,
'input' => [
'text' => '<string>',
'truncated' => true
],
'output' => [
'text' => '<string>',
'truncated' => true
],
'error' => [
'text' => '<string>',
'truncated' => true
],
'calls' => [
[
'index' => 1,
'startedAt' => 123,
'durationMs' => 1,
'input' => [
'text' => '<string>',
'truncated' => true
],
'output' => [
'text' => '<string>',
'truncated' => true
],
'error' => [
'text' => '<string>',
'truncated' => true
]
]
],
'logs' => [
[
'index' => 1,
'at' => 123,
'value' => [
'text' => '<string>',
'truncated' => true
]
]
]
]
],
'judgments' => [
[
'name' => '<string>',
'model' => '<string>',
'evaluator' => '<string>',
'score' => 0.5,
'choice' => '<string>',
'reason' => '<string>',
'threshold' => 0.5,
'durationMs' => 1,
'error' => '<string>'
]
]
],
'taskIndex' => 1,
'sandboxId' => '<string>',
'usage' => [
'cacheReadTokens' => 123,
'cacheWriteTokens' => 123,
'inputTokens' => 123,
'outputTokens' => 123,
'totalTokens' => 123,
'costUsd' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.anpord.com/v1/evals.reportTrial"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"trial\": {\n \"caseName\": \"<string>\",\n \"events\": [\n {\n \"_tag\": \"Started\",\n \"model\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"at\": 123\n }\n ],\n \"ordinal\": 1,\n \"outcome\": {\n \"commandCount\": 123,\n \"exitCode\": 123,\n \"modelMs\": 123,\n \"passed\": true,\n \"sandboxMs\": 123,\n \"verifySteps\": [\n {\n \"command\": \"<string>\",\n \"exitCode\": 123\n }\n ],\n \"voidFields\": [\n \"<string>\"\n ],\n \"artifacts\": [\n {\n \"path\": \"<string>\",\n \"byteSize\": 1,\n \"sha256\": \"<string>\"\n }\n ],\n \"validations\": [\n {\n \"id\": \"<string>\",\n \"index\": 1,\n \"name\": \"<string>\",\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"message\": \"<string>\",\n \"exitCode\": 123,\n \"truncated\": true,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"calls\": [\n {\n \"index\": 1,\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ],\n \"logs\": [\n {\n \"index\": 1,\n \"at\": 123,\n \"value\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ]\n }\n ],\n \"judgments\": [\n {\n \"name\": \"<string>\",\n \"model\": \"<string>\",\n \"evaluator\": \"<string>\",\n \"score\": 0.5,\n \"choice\": \"<string>\",\n \"reason\": \"<string>\",\n \"threshold\": 0.5,\n \"durationMs\": 1,\n \"error\": \"<string>\"\n }\n ]\n },\n \"taskIndex\": 1,\n \"sandboxId\": \"<string>\",\n \"usage\": {\n \"cacheReadTokens\": 123,\n \"cacheWriteTokens\": 123,\n \"inputTokens\": 123,\n \"outputTokens\": 123,\n \"totalTokens\": 123,\n \"costUsd\": 123\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.anpord.com/v1/evals.reportTrial")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"trial\": {\n \"caseName\": \"<string>\",\n \"events\": [\n {\n \"_tag\": \"Started\",\n \"model\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"at\": 123\n }\n ],\n \"ordinal\": 1,\n \"outcome\": {\n \"commandCount\": 123,\n \"exitCode\": 123,\n \"modelMs\": 123,\n \"passed\": true,\n \"sandboxMs\": 123,\n \"verifySteps\": [\n {\n \"command\": \"<string>\",\n \"exitCode\": 123\n }\n ],\n \"voidFields\": [\n \"<string>\"\n ],\n \"artifacts\": [\n {\n \"path\": \"<string>\",\n \"byteSize\": 1,\n \"sha256\": \"<string>\"\n }\n ],\n \"validations\": [\n {\n \"id\": \"<string>\",\n \"index\": 1,\n \"name\": \"<string>\",\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"message\": \"<string>\",\n \"exitCode\": 123,\n \"truncated\": true,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"calls\": [\n {\n \"index\": 1,\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ],\n \"logs\": [\n {\n \"index\": 1,\n \"at\": 123,\n \"value\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ]\n }\n ],\n \"judgments\": [\n {\n \"name\": \"<string>\",\n \"model\": \"<string>\",\n \"evaluator\": \"<string>\",\n \"score\": 0.5,\n \"choice\": \"<string>\",\n \"reason\": \"<string>\",\n \"threshold\": 0.5,\n \"durationMs\": 1,\n \"error\": \"<string>\"\n }\n ]\n },\n \"taskIndex\": 1,\n \"sandboxId\": \"<string>\",\n \"usage\": {\n \"cacheReadTokens\": 123,\n \"cacheWriteTokens\": 123,\n \"inputTokens\": 123,\n \"outputTokens\": 123,\n \"totalTokens\": 123,\n \"costUsd\": 123\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anpord.com/v1/evals.reportTrial")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"trial\": {\n \"caseName\": \"<string>\",\n \"events\": [\n {\n \"_tag\": \"Started\",\n \"model\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"at\": 123\n }\n ],\n \"ordinal\": 1,\n \"outcome\": {\n \"commandCount\": 123,\n \"exitCode\": 123,\n \"modelMs\": 123,\n \"passed\": true,\n \"sandboxMs\": 123,\n \"verifySteps\": [\n {\n \"command\": \"<string>\",\n \"exitCode\": 123\n }\n ],\n \"voidFields\": [\n \"<string>\"\n ],\n \"artifacts\": [\n {\n \"path\": \"<string>\",\n \"byteSize\": 1,\n \"sha256\": \"<string>\"\n }\n ],\n \"validations\": [\n {\n \"id\": \"<string>\",\n \"index\": 1,\n \"name\": \"<string>\",\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"message\": \"<string>\",\n \"exitCode\": 123,\n \"truncated\": true,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"calls\": [\n {\n \"index\": 1,\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ],\n \"logs\": [\n {\n \"index\": 1,\n \"at\": 123,\n \"value\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ]\n }\n ],\n \"judgments\": [\n {\n \"name\": \"<string>\",\n \"model\": \"<string>\",\n \"evaluator\": \"<string>\",\n \"score\": 0.5,\n \"choice\": \"<string>\",\n \"reason\": \"<string>\",\n \"threshold\": 0.5,\n \"durationMs\": 1,\n \"error\": \"<string>\"\n }\n ]\n },\n \"taskIndex\": 1,\n \"sandboxId\": \"<string>\",\n \"usage\": {\n \"cacheReadTokens\": 123,\n \"cacheWriteTokens\": 123,\n \"inputTokens\": 123,\n \"outputTokens\": 123,\n \"totalTokens\": 123,\n \"costUsd\": 123\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"issues": [
{
"_tag": "Pointer",
"path": [
"<string>"
],
"message": "<string>"
}
],
"message": "<string>",
"_tag": "HttpApiDecodeError"
}{
"message": "<string>",
"_tag": "Unauthorized"
}{
"message": "<string>",
"_tag": "Forbidden"
}{
"message": "<string>",
"_tag": "NotFound"
}{
"message": "<string>",
"_tag": "Conflict"
}Evals
Report a trial run outside the platform
For a run started with executeLocally. The result is recorded as reported: it was produced somewhere the platform cannot inspect, so it is marked and kept out of baselines.
POST
/
v1
/
evals.reportTrial
Report a trial run outside the platform
curl --request POST \
--url https://api.anpord.com/v1/evals.reportTrial \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"trial": {
"caseName": "<string>",
"events": [
{
"_tag": "Started",
"model": "<string>",
"sessionId": "<string>",
"at": 123
}
],
"ordinal": 1,
"outcome": {
"commandCount": 123,
"exitCode": 123,
"modelMs": 123,
"passed": true,
"sandboxMs": 123,
"verifySteps": [
{
"command": "<string>",
"exitCode": 123
}
],
"voidFields": [
"<string>"
],
"artifacts": [
{
"path": "<string>",
"byteSize": 1,
"sha256": "<string>"
}
],
"validations": [
{
"id": "<string>",
"index": 1,
"name": "<string>",
"startedAt": 123,
"durationMs": 1,
"message": "<string>",
"exitCode": 123,
"truncated": true,
"input": {
"text": "<string>",
"truncated": true
},
"output": {
"text": "<string>",
"truncated": true
},
"error": {
"text": "<string>",
"truncated": true
},
"calls": [
{
"index": 1,
"startedAt": 123,
"durationMs": 1,
"input": {
"text": "<string>",
"truncated": true
},
"output": {
"text": "<string>",
"truncated": true
},
"error": {
"text": "<string>",
"truncated": true
}
}
],
"logs": [
{
"index": 1,
"at": 123,
"value": {
"text": "<string>",
"truncated": true
}
}
]
}
],
"judgments": [
{
"name": "<string>",
"model": "<string>",
"evaluator": "<string>",
"score": 0.5,
"choice": "<string>",
"reason": "<string>",
"threshold": 0.5,
"durationMs": 1,
"error": "<string>"
}
]
},
"taskIndex": 1,
"sandboxId": "<string>",
"usage": {
"cacheReadTokens": 123,
"cacheWriteTokens": 123,
"inputTokens": 123,
"outputTokens": 123,
"totalTokens": 123,
"costUsd": 123
}
}
}
'import requests
url = "https://api.anpord.com/v1/evals.reportTrial"
payload = {
"id": "<string>",
"trial": {
"caseName": "<string>",
"events": [
{
"_tag": "Started",
"model": "<string>",
"sessionId": "<string>",
"at": 123
}
],
"ordinal": 1,
"outcome": {
"commandCount": 123,
"exitCode": 123,
"modelMs": 123,
"passed": True,
"sandboxMs": 123,
"verifySteps": [
{
"command": "<string>",
"exitCode": 123
}
],
"voidFields": ["<string>"],
"artifacts": [
{
"path": "<string>",
"byteSize": 1,
"sha256": "<string>"
}
],
"validations": [
{
"id": "<string>",
"index": 1,
"name": "<string>",
"startedAt": 123,
"durationMs": 1,
"message": "<string>",
"exitCode": 123,
"truncated": True,
"input": {
"text": "<string>",
"truncated": True
},
"output": {
"text": "<string>",
"truncated": True
},
"error": {
"text": "<string>",
"truncated": True
},
"calls": [
{
"index": 1,
"startedAt": 123,
"durationMs": 1,
"input": {
"text": "<string>",
"truncated": True
},
"output": {
"text": "<string>",
"truncated": True
},
"error": {
"text": "<string>",
"truncated": True
}
}
],
"logs": [
{
"index": 1,
"at": 123,
"value": {
"text": "<string>",
"truncated": True
}
}
]
}
],
"judgments": [
{
"name": "<string>",
"model": "<string>",
"evaluator": "<string>",
"score": 0.5,
"choice": "<string>",
"reason": "<string>",
"threshold": 0.5,
"durationMs": 1,
"error": "<string>"
}
]
},
"taskIndex": 1,
"sandboxId": "<string>",
"usage": {
"cacheReadTokens": 123,
"cacheWriteTokens": 123,
"inputTokens": 123,
"outputTokens": 123,
"totalTokens": 123,
"costUsd": 123
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
trial: {
caseName: '<string>',
events: [{_tag: 'Started', model: '<string>', sessionId: '<string>', at: 123}],
ordinal: 1,
outcome: {
commandCount: 123,
exitCode: 123,
modelMs: 123,
passed: true,
sandboxMs: 123,
verifySteps: [{command: '<string>', exitCode: 123}],
voidFields: ['<string>'],
artifacts: [{path: '<string>', byteSize: 1, sha256: '<string>'}],
validations: [
{
id: '<string>',
index: 1,
name: '<string>',
startedAt: 123,
durationMs: 1,
message: '<string>',
exitCode: 123,
truncated: true,
input: {text: '<string>', truncated: true},
output: {text: '<string>', truncated: true},
error: {text: '<string>', truncated: true},
calls: [
{
index: 1,
startedAt: 123,
durationMs: 1,
input: {text: '<string>', truncated: true},
output: {text: '<string>', truncated: true},
error: {text: '<string>', truncated: true}
}
],
logs: [{index: 1, at: 123, value: {text: '<string>', truncated: true}}]
}
],
judgments: [
{
name: '<string>',
model: '<string>',
evaluator: '<string>',
score: 0.5,
choice: '<string>',
reason: '<string>',
threshold: 0.5,
durationMs: 1,
error: '<string>'
}
]
},
taskIndex: 1,
sandboxId: '<string>',
usage: {
cacheReadTokens: 123,
cacheWriteTokens: 123,
inputTokens: 123,
outputTokens: 123,
totalTokens: 123,
costUsd: 123
}
}
})
};
fetch('https://api.anpord.com/v1/evals.reportTrial', 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://api.anpord.com/v1/evals.reportTrial",
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([
'id' => '<string>',
'trial' => [
'caseName' => '<string>',
'events' => [
[
'_tag' => 'Started',
'model' => '<string>',
'sessionId' => '<string>',
'at' => 123
]
],
'ordinal' => 1,
'outcome' => [
'commandCount' => 123,
'exitCode' => 123,
'modelMs' => 123,
'passed' => true,
'sandboxMs' => 123,
'verifySteps' => [
[
'command' => '<string>',
'exitCode' => 123
]
],
'voidFields' => [
'<string>'
],
'artifacts' => [
[
'path' => '<string>',
'byteSize' => 1,
'sha256' => '<string>'
]
],
'validations' => [
[
'id' => '<string>',
'index' => 1,
'name' => '<string>',
'startedAt' => 123,
'durationMs' => 1,
'message' => '<string>',
'exitCode' => 123,
'truncated' => true,
'input' => [
'text' => '<string>',
'truncated' => true
],
'output' => [
'text' => '<string>',
'truncated' => true
],
'error' => [
'text' => '<string>',
'truncated' => true
],
'calls' => [
[
'index' => 1,
'startedAt' => 123,
'durationMs' => 1,
'input' => [
'text' => '<string>',
'truncated' => true
],
'output' => [
'text' => '<string>',
'truncated' => true
],
'error' => [
'text' => '<string>',
'truncated' => true
]
]
],
'logs' => [
[
'index' => 1,
'at' => 123,
'value' => [
'text' => '<string>',
'truncated' => true
]
]
]
]
],
'judgments' => [
[
'name' => '<string>',
'model' => '<string>',
'evaluator' => '<string>',
'score' => 0.5,
'choice' => '<string>',
'reason' => '<string>',
'threshold' => 0.5,
'durationMs' => 1,
'error' => '<string>'
]
]
],
'taskIndex' => 1,
'sandboxId' => '<string>',
'usage' => [
'cacheReadTokens' => 123,
'cacheWriteTokens' => 123,
'inputTokens' => 123,
'outputTokens' => 123,
'totalTokens' => 123,
'costUsd' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.anpord.com/v1/evals.reportTrial"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"trial\": {\n \"caseName\": \"<string>\",\n \"events\": [\n {\n \"_tag\": \"Started\",\n \"model\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"at\": 123\n }\n ],\n \"ordinal\": 1,\n \"outcome\": {\n \"commandCount\": 123,\n \"exitCode\": 123,\n \"modelMs\": 123,\n \"passed\": true,\n \"sandboxMs\": 123,\n \"verifySteps\": [\n {\n \"command\": \"<string>\",\n \"exitCode\": 123\n }\n ],\n \"voidFields\": [\n \"<string>\"\n ],\n \"artifacts\": [\n {\n \"path\": \"<string>\",\n \"byteSize\": 1,\n \"sha256\": \"<string>\"\n }\n ],\n \"validations\": [\n {\n \"id\": \"<string>\",\n \"index\": 1,\n \"name\": \"<string>\",\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"message\": \"<string>\",\n \"exitCode\": 123,\n \"truncated\": true,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"calls\": [\n {\n \"index\": 1,\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ],\n \"logs\": [\n {\n \"index\": 1,\n \"at\": 123,\n \"value\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ]\n }\n ],\n \"judgments\": [\n {\n \"name\": \"<string>\",\n \"model\": \"<string>\",\n \"evaluator\": \"<string>\",\n \"score\": 0.5,\n \"choice\": \"<string>\",\n \"reason\": \"<string>\",\n \"threshold\": 0.5,\n \"durationMs\": 1,\n \"error\": \"<string>\"\n }\n ]\n },\n \"taskIndex\": 1,\n \"sandboxId\": \"<string>\",\n \"usage\": {\n \"cacheReadTokens\": 123,\n \"cacheWriteTokens\": 123,\n \"inputTokens\": 123,\n \"outputTokens\": 123,\n \"totalTokens\": 123,\n \"costUsd\": 123\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.anpord.com/v1/evals.reportTrial")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"trial\": {\n \"caseName\": \"<string>\",\n \"events\": [\n {\n \"_tag\": \"Started\",\n \"model\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"at\": 123\n }\n ],\n \"ordinal\": 1,\n \"outcome\": {\n \"commandCount\": 123,\n \"exitCode\": 123,\n \"modelMs\": 123,\n \"passed\": true,\n \"sandboxMs\": 123,\n \"verifySteps\": [\n {\n \"command\": \"<string>\",\n \"exitCode\": 123\n }\n ],\n \"voidFields\": [\n \"<string>\"\n ],\n \"artifacts\": [\n {\n \"path\": \"<string>\",\n \"byteSize\": 1,\n \"sha256\": \"<string>\"\n }\n ],\n \"validations\": [\n {\n \"id\": \"<string>\",\n \"index\": 1,\n \"name\": \"<string>\",\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"message\": \"<string>\",\n \"exitCode\": 123,\n \"truncated\": true,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"calls\": [\n {\n \"index\": 1,\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ],\n \"logs\": [\n {\n \"index\": 1,\n \"at\": 123,\n \"value\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ]\n }\n ],\n \"judgments\": [\n {\n \"name\": \"<string>\",\n \"model\": \"<string>\",\n \"evaluator\": \"<string>\",\n \"score\": 0.5,\n \"choice\": \"<string>\",\n \"reason\": \"<string>\",\n \"threshold\": 0.5,\n \"durationMs\": 1,\n \"error\": \"<string>\"\n }\n ]\n },\n \"taskIndex\": 1,\n \"sandboxId\": \"<string>\",\n \"usage\": {\n \"cacheReadTokens\": 123,\n \"cacheWriteTokens\": 123,\n \"inputTokens\": 123,\n \"outputTokens\": 123,\n \"totalTokens\": 123,\n \"costUsd\": 123\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anpord.com/v1/evals.reportTrial")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"trial\": {\n \"caseName\": \"<string>\",\n \"events\": [\n {\n \"_tag\": \"Started\",\n \"model\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"at\": 123\n }\n ],\n \"ordinal\": 1,\n \"outcome\": {\n \"commandCount\": 123,\n \"exitCode\": 123,\n \"modelMs\": 123,\n \"passed\": true,\n \"sandboxMs\": 123,\n \"verifySteps\": [\n {\n \"command\": \"<string>\",\n \"exitCode\": 123\n }\n ],\n \"voidFields\": [\n \"<string>\"\n ],\n \"artifacts\": [\n {\n \"path\": \"<string>\",\n \"byteSize\": 1,\n \"sha256\": \"<string>\"\n }\n ],\n \"validations\": [\n {\n \"id\": \"<string>\",\n \"index\": 1,\n \"name\": \"<string>\",\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"message\": \"<string>\",\n \"exitCode\": 123,\n \"truncated\": true,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"calls\": [\n {\n \"index\": 1,\n \"startedAt\": 123,\n \"durationMs\": 1,\n \"input\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"output\": {\n \"text\": \"<string>\",\n \"truncated\": true\n },\n \"error\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ],\n \"logs\": [\n {\n \"index\": 1,\n \"at\": 123,\n \"value\": {\n \"text\": \"<string>\",\n \"truncated\": true\n }\n }\n ]\n }\n ],\n \"judgments\": [\n {\n \"name\": \"<string>\",\n \"model\": \"<string>\",\n \"evaluator\": \"<string>\",\n \"score\": 0.5,\n \"choice\": \"<string>\",\n \"reason\": \"<string>\",\n \"threshold\": 0.5,\n \"durationMs\": 1,\n \"error\": \"<string>\"\n }\n ]\n },\n \"taskIndex\": 1,\n \"sandboxId\": \"<string>\",\n \"usage\": {\n \"cacheReadTokens\": 123,\n \"cacheWriteTokens\": 123,\n \"inputTokens\": 123,\n \"outputTokens\": 123,\n \"totalTokens\": 123,\n \"costUsd\": 123\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"issues": [
{
"_tag": "Pointer",
"path": [
"<string>"
],
"message": "<string>"
}
],
"message": "<string>",
"_tag": "HttpApiDecodeError"
}{
"message": "<string>",
"_tag": "Unauthorized"
}{
"message": "<string>",
"_tag": "Forbidden"
}{
"message": "<string>",
"_tag": "NotFound"
}{
"message": "<string>",
"_tag": "Conflict"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Success
⌘I