Run a suite
curl --request POST \
--url https://api.anpord.com/v1/evals.start \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cases": [
{
"id": "<string>",
"name": "<string>",
"user": {
"kind": "simulated",
"goal": "<string>",
"prompt": "<string>"
},
"prepare": {
"name": "<string>",
"source": "<string>"
},
"source": {
"kind": "empty"
},
"tags": [
"<string>"
],
"variables": {},
"validator": {
"name": "<string>",
"source": "<string>",
"capture": true,
"manifest": [
{
"index": 1,
"name": "<string>"
}
],
"sourceFiles": [
{
"path": "<string>",
"content": "<string>"
}
]
},
"verify": "<string>"
}
],
"suite": {
"id": "<string>",
"name": "<string>",
"prompt": "<string>"
},
"trials": 5,
"variants": [
{
"model": "<string>",
"credentials": {
"harnessConnectionId": "<string>",
"sandboxConnectionId": "<string>"
}
}
],
"local": true,
"trigger": {
"url": "<string>"
}
}
'import requests
url = "https://api.anpord.com/v1/evals.start"
payload = {
"cases": [
{
"id": "<string>",
"name": "<string>",
"user": {
"kind": "simulated",
"goal": "<string>",
"prompt": "<string>"
},
"prepare": {
"name": "<string>",
"source": "<string>"
},
"source": { "kind": "empty" },
"tags": ["<string>"],
"variables": {},
"validator": {
"name": "<string>",
"source": "<string>",
"capture": True,
"manifest": [
{
"index": 1,
"name": "<string>"
}
],
"sourceFiles": [
{
"path": "<string>",
"content": "<string>"
}
]
},
"verify": "<string>"
}
],
"suite": {
"id": "<string>",
"name": "<string>",
"prompt": "<string>"
},
"trials": 5,
"variants": [
{
"model": "<string>",
"credentials": {
"harnessConnectionId": "<string>",
"sandboxConnectionId": "<string>"
}
}
],
"local": True,
"trigger": { "url": "<string>" }
}
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({
cases: [
{
id: '<string>',
name: '<string>',
user: {kind: 'simulated', goal: '<string>', prompt: '<string>'},
prepare: {name: '<string>', source: '<string>'},
source: {kind: 'empty'},
tags: ['<string>'],
variables: {},
validator: {
name: '<string>',
source: '<string>',
capture: true,
manifest: [{index: 1, name: '<string>'}],
sourceFiles: [{path: '<string>', content: '<string>'}]
},
verify: '<string>'
}
],
suite: {id: '<string>', name: '<string>', prompt: '<string>'},
trials: 5,
variants: [
{
model: '<string>',
credentials: {harnessConnectionId: '<string>', sandboxConnectionId: '<string>'}
}
],
local: true,
trigger: {url: '<string>'}
})
};
fetch('https://api.anpord.com/v1/evals.start', 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.start",
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([
'cases' => [
[
'id' => '<string>',
'name' => '<string>',
'user' => [
'kind' => 'simulated',
'goal' => '<string>',
'prompt' => '<string>'
],
'prepare' => [
'name' => '<string>',
'source' => '<string>'
],
'source' => [
'kind' => 'empty'
],
'tags' => [
'<string>'
],
'variables' => [
],
'validator' => [
'name' => '<string>',
'source' => '<string>',
'capture' => true,
'manifest' => [
[
'index' => 1,
'name' => '<string>'
]
],
'sourceFiles' => [
[
'path' => '<string>',
'content' => '<string>'
]
]
],
'verify' => '<string>'
]
],
'suite' => [
'id' => '<string>',
'name' => '<string>',
'prompt' => '<string>'
],
'trials' => 5,
'variants' => [
[
'model' => '<string>',
'credentials' => [
'harnessConnectionId' => '<string>',
'sandboxConnectionId' => '<string>'
]
]
],
'local' => true,
'trigger' => [
'url' => '<string>'
]
]),
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.start"
payload := strings.NewReader("{\n \"cases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"user\": {\n \"kind\": \"simulated\",\n \"goal\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"prepare\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\"\n },\n \"source\": {\n \"kind\": \"empty\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": {},\n \"validator\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"capture\": true,\n \"manifest\": [\n {\n \"index\": 1,\n \"name\": \"<string>\"\n }\n ],\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n },\n \"verify\": \"<string>\"\n }\n ],\n \"suite\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"trials\": 5,\n \"variants\": [\n {\n \"model\": \"<string>\",\n \"credentials\": {\n \"harnessConnectionId\": \"<string>\",\n \"sandboxConnectionId\": \"<string>\"\n }\n }\n ],\n \"local\": true,\n \"trigger\": {\n \"url\": \"<string>\"\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.start")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"user\": {\n \"kind\": \"simulated\",\n \"goal\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"prepare\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\"\n },\n \"source\": {\n \"kind\": \"empty\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": {},\n \"validator\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"capture\": true,\n \"manifest\": [\n {\n \"index\": 1,\n \"name\": \"<string>\"\n }\n ],\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n },\n \"verify\": \"<string>\"\n }\n ],\n \"suite\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"trials\": 5,\n \"variants\": [\n {\n \"model\": \"<string>\",\n \"credentials\": {\n \"harnessConnectionId\": \"<string>\",\n \"sandboxConnectionId\": \"<string>\"\n }\n }\n ],\n \"local\": true,\n \"trigger\": {\n \"url\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anpord.com/v1/evals.start")
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 \"cases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"user\": {\n \"kind\": \"simulated\",\n \"goal\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"prepare\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\"\n },\n \"source\": {\n \"kind\": \"empty\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": {},\n \"validator\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"capture\": true,\n \"manifest\": [\n {\n \"index\": 1,\n \"name\": \"<string>\"\n }\n ],\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n },\n \"verify\": \"<string>\"\n }\n ],\n \"suite\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"trials\": 5,\n \"variants\": [\n {\n \"model\": \"<string>\",\n \"credentials\": {\n \"harnessConnectionId\": \"<string>\",\n \"sandboxConnectionId\": \"<string>\"\n }\n }\n ],\n \"local\": true,\n \"trigger\": {\n \"url\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"runs": [
{
"caseId": "<string>",
"id": "<string>",
"variantIndex": 123
}
]
}{
"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
Run a suite
Starts one run per case and variant, and returns the batch while trials continue in the background. The command harness needs a profile with a run command; other harnesses take no run. Any harness may take an install command.
POST
/
v1
/
evals.start
Run a suite
curl --request POST \
--url https://api.anpord.com/v1/evals.start \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cases": [
{
"id": "<string>",
"name": "<string>",
"user": {
"kind": "simulated",
"goal": "<string>",
"prompt": "<string>"
},
"prepare": {
"name": "<string>",
"source": "<string>"
},
"source": {
"kind": "empty"
},
"tags": [
"<string>"
],
"variables": {},
"validator": {
"name": "<string>",
"source": "<string>",
"capture": true,
"manifest": [
{
"index": 1,
"name": "<string>"
}
],
"sourceFiles": [
{
"path": "<string>",
"content": "<string>"
}
]
},
"verify": "<string>"
}
],
"suite": {
"id": "<string>",
"name": "<string>",
"prompt": "<string>"
},
"trials": 5,
"variants": [
{
"model": "<string>",
"credentials": {
"harnessConnectionId": "<string>",
"sandboxConnectionId": "<string>"
}
}
],
"local": true,
"trigger": {
"url": "<string>"
}
}
'import requests
url = "https://api.anpord.com/v1/evals.start"
payload = {
"cases": [
{
"id": "<string>",
"name": "<string>",
"user": {
"kind": "simulated",
"goal": "<string>",
"prompt": "<string>"
},
"prepare": {
"name": "<string>",
"source": "<string>"
},
"source": { "kind": "empty" },
"tags": ["<string>"],
"variables": {},
"validator": {
"name": "<string>",
"source": "<string>",
"capture": True,
"manifest": [
{
"index": 1,
"name": "<string>"
}
],
"sourceFiles": [
{
"path": "<string>",
"content": "<string>"
}
]
},
"verify": "<string>"
}
],
"suite": {
"id": "<string>",
"name": "<string>",
"prompt": "<string>"
},
"trials": 5,
"variants": [
{
"model": "<string>",
"credentials": {
"harnessConnectionId": "<string>",
"sandboxConnectionId": "<string>"
}
}
],
"local": True,
"trigger": { "url": "<string>" }
}
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({
cases: [
{
id: '<string>',
name: '<string>',
user: {kind: 'simulated', goal: '<string>', prompt: '<string>'},
prepare: {name: '<string>', source: '<string>'},
source: {kind: 'empty'},
tags: ['<string>'],
variables: {},
validator: {
name: '<string>',
source: '<string>',
capture: true,
manifest: [{index: 1, name: '<string>'}],
sourceFiles: [{path: '<string>', content: '<string>'}]
},
verify: '<string>'
}
],
suite: {id: '<string>', name: '<string>', prompt: '<string>'},
trials: 5,
variants: [
{
model: '<string>',
credentials: {harnessConnectionId: '<string>', sandboxConnectionId: '<string>'}
}
],
local: true,
trigger: {url: '<string>'}
})
};
fetch('https://api.anpord.com/v1/evals.start', 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.start",
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([
'cases' => [
[
'id' => '<string>',
'name' => '<string>',
'user' => [
'kind' => 'simulated',
'goal' => '<string>',
'prompt' => '<string>'
],
'prepare' => [
'name' => '<string>',
'source' => '<string>'
],
'source' => [
'kind' => 'empty'
],
'tags' => [
'<string>'
],
'variables' => [
],
'validator' => [
'name' => '<string>',
'source' => '<string>',
'capture' => true,
'manifest' => [
[
'index' => 1,
'name' => '<string>'
]
],
'sourceFiles' => [
[
'path' => '<string>',
'content' => '<string>'
]
]
],
'verify' => '<string>'
]
],
'suite' => [
'id' => '<string>',
'name' => '<string>',
'prompt' => '<string>'
],
'trials' => 5,
'variants' => [
[
'model' => '<string>',
'credentials' => [
'harnessConnectionId' => '<string>',
'sandboxConnectionId' => '<string>'
]
]
],
'local' => true,
'trigger' => [
'url' => '<string>'
]
]),
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.start"
payload := strings.NewReader("{\n \"cases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"user\": {\n \"kind\": \"simulated\",\n \"goal\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"prepare\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\"\n },\n \"source\": {\n \"kind\": \"empty\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": {},\n \"validator\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"capture\": true,\n \"manifest\": [\n {\n \"index\": 1,\n \"name\": \"<string>\"\n }\n ],\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n },\n \"verify\": \"<string>\"\n }\n ],\n \"suite\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"trials\": 5,\n \"variants\": [\n {\n \"model\": \"<string>\",\n \"credentials\": {\n \"harnessConnectionId\": \"<string>\",\n \"sandboxConnectionId\": \"<string>\"\n }\n }\n ],\n \"local\": true,\n \"trigger\": {\n \"url\": \"<string>\"\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.start")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"user\": {\n \"kind\": \"simulated\",\n \"goal\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"prepare\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\"\n },\n \"source\": {\n \"kind\": \"empty\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": {},\n \"validator\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"capture\": true,\n \"manifest\": [\n {\n \"index\": 1,\n \"name\": \"<string>\"\n }\n ],\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n },\n \"verify\": \"<string>\"\n }\n ],\n \"suite\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"trials\": 5,\n \"variants\": [\n {\n \"model\": \"<string>\",\n \"credentials\": {\n \"harnessConnectionId\": \"<string>\",\n \"sandboxConnectionId\": \"<string>\"\n }\n }\n ],\n \"local\": true,\n \"trigger\": {\n \"url\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anpord.com/v1/evals.start")
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 \"cases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"user\": {\n \"kind\": \"simulated\",\n \"goal\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"prepare\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\"\n },\n \"source\": {\n \"kind\": \"empty\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": {},\n \"validator\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"capture\": true,\n \"manifest\": [\n {\n \"index\": 1,\n \"name\": \"<string>\"\n }\n ],\n \"sourceFiles\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n },\n \"verify\": \"<string>\"\n }\n ],\n \"suite\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\"\n },\n \"trials\": 5,\n \"variants\": [\n {\n \"model\": \"<string>\",\n \"credentials\": {\n \"harnessConnectionId\": \"<string>\",\n \"sandboxConnectionId\": \"<string>\"\n }\n }\n ],\n \"local\": true,\n \"trigger\": {\n \"url\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"runs": [
{
"caseId": "<string>",
"id": "<string>",
"variantIndex": 123
}
]
}{
"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
Run every case of a suite on every variant, each as many times as trials.
an array of at most 100 item(s)
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
The suite the cases belong to, and the prompt they share.
Show child attributes
Show child attributes
a number between 1 and 10
Required range:
1 <= x <= 10an array of at most 20 item(s)
Required array length:
1 - 20 elementsShow child attributes
Show child attributes
What started this run. Client-reported context, not authorization.
Show child attributes
Show child attributes
⌘I