curl -X POST "https://first-signal-api.fly.dev/v1/agents/6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b/tests/calibrate" \
-H "Authorization: Bearer $SIGNAL_API_KEY"import requests
url = "https://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate"
payload = { "testIds": ["3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"] }
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({testIds: ['3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f']})
};
fetch('https://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate', 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://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate",
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([
'testIds' => [
'3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f'
]
]),
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://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate"
payload := strings.NewReader("{\n \"testIds\": [\n \"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f\"\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://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"testIds\": [\n \"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate")
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 \"testIds\": [\n \"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "calibration",
"runs": [
{
"object": "run",
"id": "d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a",
"status": "complete",
"message": null,
"kind": "run",
"trigger": "ci",
"version": 8,
"testSetId": "c7d8e9f0-a1b2-4c3d-8e4f-5a6b7c8d9e0f",
"testIds": [
"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"
],
"personas": null,
"repeats": null,
"shadowAgentId": null,
"progress": {
"completed": 12,
"total": 12
},
"cells": {
"requested": 12,
"runnable": 12
},
"summary": {
"cells": 12,
"scored": 12,
"counts": {
"passed": 9,
"failed": 2,
"flaky": 1,
"error": 0,
"drift": 0,
"notRun": 0
},
"passRate": 0.75
},
"cost": {
"retellUsd": 1.84,
"signalUsd": 0.21
},
"approvedAt": null,
"createdBy": "key:00000000-0000-4000-8000-00000000000a",
"createdAt": "2026-10-02T11:00:03.000Z",
"updatedAt": "2026-10-02T11:07:41.000Z"
}
],
"skipped": [
{
"testId": "3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"reason": "<string>"
}
]
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}Calibrate tests
Plays each test three times with its own caller to decide whether it may gate a release: an issue test on the version its source call ran on (it must fail 2 of 3), any other on the version in production (it must pass 3 of 3). Until then a test is shown and never gates. Starts one calibration run per version and returns at once. This spends like a run, under the agent’s budget and the plan. People only: calibration rewrites whether tests gate, so every API key is refused with 403 people_only.
curl -X POST "https://first-signal-api.fly.dev/v1/agents/6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b/tests/calibrate" \
-H "Authorization: Bearer $SIGNAL_API_KEY"import requests
url = "https://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate"
payload = { "testIds": ["3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"] }
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({testIds: ['3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f']})
};
fetch('https://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate', 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://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate",
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([
'testIds' => [
'3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f'
]
]),
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://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate"
payload := strings.NewReader("{\n \"testIds\": [\n \"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f\"\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://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"testIds\": [\n \"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://first-signal-api.fly.dev/v1/agents/{agentId}/tests/calibrate")
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 \"testIds\": [\n \"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "calibration",
"runs": [
{
"object": "run",
"id": "d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a",
"status": "complete",
"message": null,
"kind": "run",
"trigger": "ci",
"version": 8,
"testSetId": "c7d8e9f0-a1b2-4c3d-8e4f-5a6b7c8d9e0f",
"testIds": [
"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"
],
"personas": null,
"repeats": null,
"shadowAgentId": null,
"progress": {
"completed": 12,
"total": 12
},
"cells": {
"requested": 12,
"runnable": 12
},
"summary": {
"cells": 12,
"scored": 12,
"counts": {
"passed": 9,
"failed": 2,
"flaky": 1,
"error": 0,
"drift": 0,
"notRun": 0
},
"passRate": 0.75
},
"cost": {
"retellUsd": 1.84,
"signalUsd": 0.21
},
"approvedAt": null,
"createdBy": "key:00000000-0000-4000-8000-00000000000a",
"createdAt": "2026-10-02T11:00:03.000Z",
"updatedAt": "2026-10-02T11:07:41.000Z"
}
],
"skipped": [
{
"testId": "3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"reason": "<string>"
}
]
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}Authorizations
An API key (sig_...), or a session token from the web app.
Path Parameters
The agent's id.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"
Body
The tests to calibrate. Every id must be one of this agent's tests: an unknown id is 404 tests_not_found and an archived one 400 tests_archived, both naming the ids, and nothing runs.
1^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Response
The calibration runs, queued, and the tests skipped.
calibration The calibration runs started (kind "calibration"), one per version the tests are calibrated on. Poll each with GET .../runs/{runId}; each test's calibration says what they decided.
Show child attributes
Show child attributes
Tests asked for that were not calibrated, and why: the version is not known or not stored, or the budget or the plan does not cover them.
Show child attributes
Show child attributes
Was this page helpful?