curl --request POST \
--url https://api.getbluejay.ai/v1/evaluate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"agent_id": "<string>",
"start_time_utc": "2023-11-07T05:31:56Z",
"participants": [
{
"role": "AGENT",
"name": "<string>",
"spoke_first": false,
"phone_number": "<string>"
}
],
"recording_url": "<string>",
"recording_base64": "<string>",
"call_direction": "INBOUND",
"interface": "PHONE",
"transcript_url": "<string>",
"transcript": [
{
"start_offset_ms": 123,
"end_offset_ms": 123,
"utterance": "<string>",
"filler_utterance": true
}
],
"tool_calls": [
{
"name": "<string>",
"start_offset_ms": 123,
"description": "<string>",
"parameters": {},
"output": null
}
],
"events": [
{
"title": "<string>",
"start_offset_ms": 123,
"description": "<string>",
"end_offset_ms": 123,
"tags": [
"<string>"
],
"metadata": {}
}
],
"tags": [
"<string>"
],
"trace_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"metadata": {},
"webhook_tag": "<string>",
"custom_metrics": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"custom_metric_tags": [
"<string>"
],
"label": "<string>",
"enable_phrase_latencies": true,
"multichannel": false
}
'import requests
url = "https://api.getbluejay.ai/v1/evaluate"
payload = {
"agent_id": "<string>",
"start_time_utc": "2023-11-07T05:31:56Z",
"participants": [
{
"role": "AGENT",
"name": "<string>",
"spoke_first": False,
"phone_number": "<string>"
}
],
"recording_url": "<string>",
"recording_base64": "<string>",
"call_direction": "INBOUND",
"interface": "PHONE",
"transcript_url": "<string>",
"transcript": [
{
"start_offset_ms": 123,
"end_offset_ms": 123,
"utterance": "<string>",
"filler_utterance": True
}
],
"tool_calls": [
{
"name": "<string>",
"start_offset_ms": 123,
"description": "<string>",
"parameters": {},
"output": None
}
],
"events": [
{
"title": "<string>",
"start_offset_ms": 123,
"description": "<string>",
"end_offset_ms": 123,
"tags": ["<string>"],
"metadata": {}
}
],
"tags": ["<string>"],
"trace_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"metadata": {},
"webhook_tag": "<string>",
"custom_metrics": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"custom_metric_tags": ["<string>"],
"label": "<string>",
"enable_phrase_latencies": True,
"multichannel": False
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
start_time_utc: '2023-11-07T05:31:56Z',
participants: [
{role: 'AGENT', name: '<string>', spoke_first: false, phone_number: '<string>'}
],
recording_url: '<string>',
recording_base64: '<string>',
call_direction: 'INBOUND',
interface: 'PHONE',
transcript_url: '<string>',
transcript: [
{
start_offset_ms: 123,
end_offset_ms: 123,
utterance: '<string>',
filler_utterance: true
}
],
tool_calls: [
{
name: '<string>',
start_offset_ms: 123,
description: '<string>',
parameters: {},
output: null
}
],
events: [
{
title: '<string>',
start_offset_ms: 123,
description: '<string>',
end_offset_ms: 123,
tags: ['<string>'],
metadata: {}
}
],
tags: ['<string>'],
trace_id: '<string>',
created_at: '2023-11-07T05:31:56Z',
metadata: {},
webhook_tag: '<string>',
custom_metrics: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
custom_metric_tags: ['<string>'],
label: '<string>',
enable_phrase_latencies: true,
multichannel: false
})
};
fetch('https://api.getbluejay.ai/v1/evaluate', 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.getbluejay.ai/v1/evaluate",
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([
'agent_id' => '<string>',
'start_time_utc' => '2023-11-07T05:31:56Z',
'participants' => [
[
'role' => 'AGENT',
'name' => '<string>',
'spoke_first' => false,
'phone_number' => '<string>'
]
],
'recording_url' => '<string>',
'recording_base64' => '<string>',
'call_direction' => 'INBOUND',
'interface' => 'PHONE',
'transcript_url' => '<string>',
'transcript' => [
[
'start_offset_ms' => 123,
'end_offset_ms' => 123,
'utterance' => '<string>',
'filler_utterance' => true
]
],
'tool_calls' => [
[
'name' => '<string>',
'start_offset_ms' => 123,
'description' => '<string>',
'parameters' => [
],
'output' => null
]
],
'events' => [
[
'title' => '<string>',
'start_offset_ms' => 123,
'description' => '<string>',
'end_offset_ms' => 123,
'tags' => [
'<string>'
],
'metadata' => [
]
]
],
'tags' => [
'<string>'
],
'trace_id' => '<string>',
'created_at' => '2023-11-07T05:31:56Z',
'metadata' => [
],
'webhook_tag' => '<string>',
'custom_metrics' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'custom_metric_tags' => [
'<string>'
],
'label' => '<string>',
'enable_phrase_latencies' => true,
'multichannel' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getbluejay.ai/v1/evaluate"
payload := strings.NewReader("{\n \"agent_id\": \"<string>\",\n \"start_time_utc\": \"2023-11-07T05:31:56Z\",\n \"participants\": [\n {\n \"role\": \"AGENT\",\n \"name\": \"<string>\",\n \"spoke_first\": false,\n \"phone_number\": \"<string>\"\n }\n ],\n \"recording_url\": \"<string>\",\n \"recording_base64\": \"<string>\",\n \"call_direction\": \"INBOUND\",\n \"interface\": \"PHONE\",\n \"transcript_url\": \"<string>\",\n \"transcript\": [\n {\n \"start_offset_ms\": 123,\n \"end_offset_ms\": 123,\n \"utterance\": \"<string>\",\n \"filler_utterance\": true\n }\n ],\n \"tool_calls\": [\n {\n \"name\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"parameters\": {},\n \"output\": null\n }\n ],\n \"events\": [\n {\n \"title\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"end_offset_ms\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"trace_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"webhook_tag\": \"<string>\",\n \"custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metric_tags\": [\n \"<string>\"\n ],\n \"label\": \"<string>\",\n \"enable_phrase_latencies\": true,\n \"multichannel\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
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.getbluejay.ai/v1/evaluate")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"<string>\",\n \"start_time_utc\": \"2023-11-07T05:31:56Z\",\n \"participants\": [\n {\n \"role\": \"AGENT\",\n \"name\": \"<string>\",\n \"spoke_first\": false,\n \"phone_number\": \"<string>\"\n }\n ],\n \"recording_url\": \"<string>\",\n \"recording_base64\": \"<string>\",\n \"call_direction\": \"INBOUND\",\n \"interface\": \"PHONE\",\n \"transcript_url\": \"<string>\",\n \"transcript\": [\n {\n \"start_offset_ms\": 123,\n \"end_offset_ms\": 123,\n \"utterance\": \"<string>\",\n \"filler_utterance\": true\n }\n ],\n \"tool_calls\": [\n {\n \"name\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"parameters\": {},\n \"output\": null\n }\n ],\n \"events\": [\n {\n \"title\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"end_offset_ms\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"trace_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"webhook_tag\": \"<string>\",\n \"custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metric_tags\": [\n \"<string>\"\n ],\n \"label\": \"<string>\",\n \"enable_phrase_latencies\": true,\n \"multichannel\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v1/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"<string>\",\n \"start_time_utc\": \"2023-11-07T05:31:56Z\",\n \"participants\": [\n {\n \"role\": \"AGENT\",\n \"name\": \"<string>\",\n \"spoke_first\": false,\n \"phone_number\": \"<string>\"\n }\n ],\n \"recording_url\": \"<string>\",\n \"recording_base64\": \"<string>\",\n \"call_direction\": \"INBOUND\",\n \"interface\": \"PHONE\",\n \"transcript_url\": \"<string>\",\n \"transcript\": [\n {\n \"start_offset_ms\": 123,\n \"end_offset_ms\": 123,\n \"utterance\": \"<string>\",\n \"filler_utterance\": true\n }\n ],\n \"tool_calls\": [\n {\n \"name\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"parameters\": {},\n \"output\": null\n }\n ],\n \"events\": [\n {\n \"title\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"end_offset_ms\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"trace_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"webhook_tag\": \"<string>\",\n \"custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metric_tags\": [\n \"<string>\"\n ],\n \"label\": \"<string>\",\n \"enable_phrase_latencies\": true,\n \"multichannel\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"call_id": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Evaluate
Submit a call or chat for evaluation.
curl --request POST \
--url https://api.getbluejay.ai/v1/evaluate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"agent_id": "<string>",
"start_time_utc": "2023-11-07T05:31:56Z",
"participants": [
{
"role": "AGENT",
"name": "<string>",
"spoke_first": false,
"phone_number": "<string>"
}
],
"recording_url": "<string>",
"recording_base64": "<string>",
"call_direction": "INBOUND",
"interface": "PHONE",
"transcript_url": "<string>",
"transcript": [
{
"start_offset_ms": 123,
"end_offset_ms": 123,
"utterance": "<string>",
"filler_utterance": true
}
],
"tool_calls": [
{
"name": "<string>",
"start_offset_ms": 123,
"description": "<string>",
"parameters": {},
"output": null
}
],
"events": [
{
"title": "<string>",
"start_offset_ms": 123,
"description": "<string>",
"end_offset_ms": 123,
"tags": [
"<string>"
],
"metadata": {}
}
],
"tags": [
"<string>"
],
"trace_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"metadata": {},
"webhook_tag": "<string>",
"custom_metrics": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"custom_metric_tags": [
"<string>"
],
"label": "<string>",
"enable_phrase_latencies": true,
"multichannel": false
}
'import requests
url = "https://api.getbluejay.ai/v1/evaluate"
payload = {
"agent_id": "<string>",
"start_time_utc": "2023-11-07T05:31:56Z",
"participants": [
{
"role": "AGENT",
"name": "<string>",
"spoke_first": False,
"phone_number": "<string>"
}
],
"recording_url": "<string>",
"recording_base64": "<string>",
"call_direction": "INBOUND",
"interface": "PHONE",
"transcript_url": "<string>",
"transcript": [
{
"start_offset_ms": 123,
"end_offset_ms": 123,
"utterance": "<string>",
"filler_utterance": True
}
],
"tool_calls": [
{
"name": "<string>",
"start_offset_ms": 123,
"description": "<string>",
"parameters": {},
"output": None
}
],
"events": [
{
"title": "<string>",
"start_offset_ms": 123,
"description": "<string>",
"end_offset_ms": 123,
"tags": ["<string>"],
"metadata": {}
}
],
"tags": ["<string>"],
"trace_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"metadata": {},
"webhook_tag": "<string>",
"custom_metrics": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"custom_metric_tags": ["<string>"],
"label": "<string>",
"enable_phrase_latencies": True,
"multichannel": False
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
start_time_utc: '2023-11-07T05:31:56Z',
participants: [
{role: 'AGENT', name: '<string>', spoke_first: false, phone_number: '<string>'}
],
recording_url: '<string>',
recording_base64: '<string>',
call_direction: 'INBOUND',
interface: 'PHONE',
transcript_url: '<string>',
transcript: [
{
start_offset_ms: 123,
end_offset_ms: 123,
utterance: '<string>',
filler_utterance: true
}
],
tool_calls: [
{
name: '<string>',
start_offset_ms: 123,
description: '<string>',
parameters: {},
output: null
}
],
events: [
{
title: '<string>',
start_offset_ms: 123,
description: '<string>',
end_offset_ms: 123,
tags: ['<string>'],
metadata: {}
}
],
tags: ['<string>'],
trace_id: '<string>',
created_at: '2023-11-07T05:31:56Z',
metadata: {},
webhook_tag: '<string>',
custom_metrics: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
custom_metric_tags: ['<string>'],
label: '<string>',
enable_phrase_latencies: true,
multichannel: false
})
};
fetch('https://api.getbluejay.ai/v1/evaluate', 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.getbluejay.ai/v1/evaluate",
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([
'agent_id' => '<string>',
'start_time_utc' => '2023-11-07T05:31:56Z',
'participants' => [
[
'role' => 'AGENT',
'name' => '<string>',
'spoke_first' => false,
'phone_number' => '<string>'
]
],
'recording_url' => '<string>',
'recording_base64' => '<string>',
'call_direction' => 'INBOUND',
'interface' => 'PHONE',
'transcript_url' => '<string>',
'transcript' => [
[
'start_offset_ms' => 123,
'end_offset_ms' => 123,
'utterance' => '<string>',
'filler_utterance' => true
]
],
'tool_calls' => [
[
'name' => '<string>',
'start_offset_ms' => 123,
'description' => '<string>',
'parameters' => [
],
'output' => null
]
],
'events' => [
[
'title' => '<string>',
'start_offset_ms' => 123,
'description' => '<string>',
'end_offset_ms' => 123,
'tags' => [
'<string>'
],
'metadata' => [
]
]
],
'tags' => [
'<string>'
],
'trace_id' => '<string>',
'created_at' => '2023-11-07T05:31:56Z',
'metadata' => [
],
'webhook_tag' => '<string>',
'custom_metrics' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'custom_metric_tags' => [
'<string>'
],
'label' => '<string>',
'enable_phrase_latencies' => true,
'multichannel' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getbluejay.ai/v1/evaluate"
payload := strings.NewReader("{\n \"agent_id\": \"<string>\",\n \"start_time_utc\": \"2023-11-07T05:31:56Z\",\n \"participants\": [\n {\n \"role\": \"AGENT\",\n \"name\": \"<string>\",\n \"spoke_first\": false,\n \"phone_number\": \"<string>\"\n }\n ],\n \"recording_url\": \"<string>\",\n \"recording_base64\": \"<string>\",\n \"call_direction\": \"INBOUND\",\n \"interface\": \"PHONE\",\n \"transcript_url\": \"<string>\",\n \"transcript\": [\n {\n \"start_offset_ms\": 123,\n \"end_offset_ms\": 123,\n \"utterance\": \"<string>\",\n \"filler_utterance\": true\n }\n ],\n \"tool_calls\": [\n {\n \"name\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"parameters\": {},\n \"output\": null\n }\n ],\n \"events\": [\n {\n \"title\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"end_offset_ms\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"trace_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"webhook_tag\": \"<string>\",\n \"custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metric_tags\": [\n \"<string>\"\n ],\n \"label\": \"<string>\",\n \"enable_phrase_latencies\": true,\n \"multichannel\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
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.getbluejay.ai/v1/evaluate")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"<string>\",\n \"start_time_utc\": \"2023-11-07T05:31:56Z\",\n \"participants\": [\n {\n \"role\": \"AGENT\",\n \"name\": \"<string>\",\n \"spoke_first\": false,\n \"phone_number\": \"<string>\"\n }\n ],\n \"recording_url\": \"<string>\",\n \"recording_base64\": \"<string>\",\n \"call_direction\": \"INBOUND\",\n \"interface\": \"PHONE\",\n \"transcript_url\": \"<string>\",\n \"transcript\": [\n {\n \"start_offset_ms\": 123,\n \"end_offset_ms\": 123,\n \"utterance\": \"<string>\",\n \"filler_utterance\": true\n }\n ],\n \"tool_calls\": [\n {\n \"name\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"parameters\": {},\n \"output\": null\n }\n ],\n \"events\": [\n {\n \"title\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"end_offset_ms\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"trace_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"webhook_tag\": \"<string>\",\n \"custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metric_tags\": [\n \"<string>\"\n ],\n \"label\": \"<string>\",\n \"enable_phrase_latencies\": true,\n \"multichannel\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v1/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"<string>\",\n \"start_time_utc\": \"2023-11-07T05:31:56Z\",\n \"participants\": [\n {\n \"role\": \"AGENT\",\n \"name\": \"<string>\",\n \"spoke_first\": false,\n \"phone_number\": \"<string>\"\n }\n ],\n \"recording_url\": \"<string>\",\n \"recording_base64\": \"<string>\",\n \"call_direction\": \"INBOUND\",\n \"interface\": \"PHONE\",\n \"transcript_url\": \"<string>\",\n \"transcript\": [\n {\n \"start_offset_ms\": 123,\n \"end_offset_ms\": 123,\n \"utterance\": \"<string>\",\n \"filler_utterance\": true\n }\n ],\n \"tool_calls\": [\n {\n \"name\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"parameters\": {},\n \"output\": null\n }\n ],\n \"events\": [\n {\n \"title\": \"<string>\",\n \"start_offset_ms\": 123,\n \"description\": \"<string>\",\n \"end_offset_ms\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"trace_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"webhook_tag\": \"<string>\",\n \"custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metric_tags\": [\n \"<string>\"\n ],\n \"label\": \"<string>\",\n \"enable_phrase_latencies\": true,\n \"multichannel\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"call_id": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}# Bluejay — Testing & Monitoring Platform for Conversational AI Agents
You are a senior backend engineer integrating the Bluejay API. Think step-by-step: first understand the endpoint, then plan the integration, then implement with minimal changes.
## Evaluate — POST /v1/evaluate
> **What this endpoint does:** Submit a call or chat for evaluation. Returns an eval ID that can be used to track evaluation status.
**Endpoint:** POST `https://api.getbluejay.ai/v1/evaluate`
**Auth:** `X-API-Key` header
**Content-Type:** application/json
### Required Parameters
| Name | Type | Description |
|------|------|-------------|
| X-API-Key | string | API key required to authenticate requests. |
### Request Body
```json
{
"agent_id": "string",
"recording_url": "string",
"recording_base64": "string",
"start_time_utc": "2024-01-01T00:00:00Z",
"participants": [
{
"role": "AGENT",
"spoke_first": true,
"name": "string",
"phone_number": "string"
}
],
"call_direction": "INBOUND",
"interface": "PHONE",
"transcript_url": "string",
"transcript": [
{
"start_offset_ms": 123,
"end_offset_ms": 123,
"speaker": "AGENT",
"utterance": "string",
"filler_utterance": true
}
],
"tool_calls": [
{
"name": "example_name",
"start_offset_ms": 123,
"description": "string",
"parameters": {
"key": "value"
}
}
],
"events": [
{
"title": "string",
"start_offset_ms": 123,
"description": "string",
"end_offset_ms": 123,
"tags": [
"string"
],
"metadata": {
"key": "value"
}
}
],
"tags": [
"string"
],
"trace_id": "string",
"created_at": "string",
"metadata": {
"key": "value"
},
"webhook_tag": "string",
"custom_metrics": [
"string"
],
"custom_metric_tags": [
"string"
],
"label": "string",
"enable_phrase_latencies": true,
"conversation_ended_by": "AGENT",
"multichannel": true
}
```
### Example
**POST with body:**
```python
import requests
def evaluate(payload: dict, api_key: str) -> dict:
url = "https://api.getbluejay.ai/v1/evaluate"
headers = {"X-API-Key": api_key}
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
return response.json()
```
### Constraints
- Minimal changes — only add/change files needed for this integration.
- Match existing codebase patterns (naming, file structure, error handling).
- Include error handling for 422: Validation Error.
### Integration Checklist
Before writing code, verify:
1. Which module/service owns this API domain in the codebase?
2. What HTTP client and error-handling patterns does the project use?
3. Are there existing types/interfaces to extend?
Then implement the integration, export it, and confirm it compiles/passes lint.
metadata field can be referenced as dynamic variables in the custom metrics that run on this call.Headers
API key required to authenticate requests.
Body
- Call Request Using Bluejay Agent ID
- Call Request Using External Agent ID
ID of the agent associated with the call
When the call started, in UTC ([python] log: datetime.now(timezone.utc) at call start)
List of call participants
2 elementsShow child attributes
Show child attributes
URL to the recording file (supported formats: .mp3, .mp4, .wav, .m4a)
1 - 5000Base64 encoded recording file in data URL format (supported formats: .mp3, .mp4, .wav, .m4a)
Direction of the call from the Agent's perspective (INBOUND or OUTBOUND)
INBOUND, OUTBOUND Interface used for the call
PHONE, WEB URL to the transcript file (supported formats: .json)
1 - 5000Transcript of the call in text format
Show child attributes
Show child attributes
List of tool calls made during the call
Show child attributes
Show child attributes
List of events that occurred during the call
Show child attributes
Show child attributes
List of tags associated with the call
Trace ID of the call
When this request was created (defaults to now in UTC)
Additional metadata associated with the evaluation
Tag of the webhook to send the evaluation to
List of additional custom metrics to be used in the call
Specify one or more tags to include all custom metrics associated with those tags. This allows you to run groups of related custom metrics without listing each individually.
Label of the agent to use for the evaluation (determines which prompt and knowledge base to use and defaults to the production label if not provided)
Whether to enable phrase-level latency tracking for this call
Which participant role ended the conversation: 'USER' or 'AGENT'
AGENT, USER, DIGITAL_HUMAN, agent, digital_human Whether the participants of the call are on different audio channels