curl --request GET \
--url https://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}', 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.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"metric": {
"metric_output_id": "01JCQR8Z9PQSTNVWXY12345678",
"metric_id": "abc123xyz789",
"status": "COMPLETED",
"metric_version_ulid": "01JCQR8Z9PQSTNVWXY12345678",
"value": 0.85,
"status_reason": "No OTel trace spans were found for this simulation.",
"explanation": "The agent never confirmed the caller's address before ending the call.",
"evidence_references": [
{
"frame_id": "<string>",
"type": "frame"
}
],
"subvalues_by_timestamp": [
{
"start_offset": 0,
"end_offset": 2.5,
"output_type": "float",
"float_value": 0.85,
"string_value": "",
"role": "assistant",
"message_index": 3,
"metadata": {}
}
],
"result": {
"llm": {
"answer_explanation": "The agent never confirmed the caller's address before ending the call.",
"prompt": "Did the agent confirm the caller's address?"
}
},
"runtime_metadata": {},
"subvalues_by_timestamp_total_count": 0,
"subvalues_by_timestamp_truncated": false
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Missing API Key",
"details": [
{
"field": "X-API-Key",
"description": "X-API-Key header is required"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Agent not found",
"details": [
{
"field": "agent_id",
"description": "Agent 'gk3jK9mPq2xRt5vW8yZaBc' does not exist"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred. Please contact support."
}
]
}
}Get simulation metric output(s)
Retrieve metric output(s) for a simulation by ID. The path segment accepts two ID types and returns different response shapes:
- 26-char MetricOutput ULID: returns a single metric output as
{ "metric": {...} }. - 22-char Metric definition ID: returns every output for that
metric on the simulation as
{ "metric_outputs": [...] }.
Clients should branch on the input ID length they passed.
Retrieving test-metric results: after calling
POST /v1/metrics/{metric_id}/test, poll this endpoint using the same
simulation output ID you tested against as simulation_id, plus the
returned 26-char metric_output_ulid. The response includes a status
field (IN QUEUE, IN PROGRESS, COMPLETED, FAILED) — poll until it
is terminal. Test-metric outputs belong to the simulation they ran
against, so they are retrieved here, not via the conversations endpoint.
curl --request GET \
--url https://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}', 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.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/conversations/simulated/{simulation_id}/metrics/{metric_output_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"metric": {
"metric_output_id": "01JCQR8Z9PQSTNVWXY12345678",
"metric_id": "abc123xyz789",
"status": "COMPLETED",
"metric_version_ulid": "01JCQR8Z9PQSTNVWXY12345678",
"value": 0.85,
"status_reason": "No OTel trace spans were found for this simulation.",
"explanation": "The agent never confirmed the caller's address before ending the call.",
"evidence_references": [
{
"frame_id": "<string>",
"type": "frame"
}
],
"subvalues_by_timestamp": [
{
"start_offset": 0,
"end_offset": 2.5,
"output_type": "float",
"float_value": 0.85,
"string_value": "",
"role": "assistant",
"message_index": 3,
"metadata": {}
}
],
"result": {
"llm": {
"answer_explanation": "The agent never confirmed the caller's address before ending the call.",
"prompt": "Did the agent confirm the caller's address?"
}
},
"runtime_metadata": {},
"subvalues_by_timestamp_total_count": 0,
"subvalues_by_timestamp_truncated": false
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Missing API Key",
"details": [
{
"field": "X-API-Key",
"description": "X-API-Key header is required"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Agent not found",
"details": [
{
"field": "agent_id",
"description": "Agent 'gk3jK9mPq2xRt5vW8yZaBc' does not exist"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred. Please contact support."
}
]
}
}Authorizations
API key for authentication.
Path Parameters
The simulation ID
22 - 27Either a 26-char MetricOutput ULID or a 22-char Metric definition ID. See endpoint description for response shape per ID type.
22 - 26Response
Metric output details. Single object when called with a 26-char ULID, collection object when called with a 22-char metric_id.
- Option 1
- Option 2
Single metric output (returned when {metric_output_id} is a 26-char ULID)
Show child attributes
Show child attributes
Was this page helpful?