import Avido from 'avido';
const client = new Avido({
apiKey: process.env['AVIDO_API_KEY'], // This is the default and can be omitted
applicationID: process.env['AVIDO_APPLICATION_ID'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const trace of client.traces.list()) {
console.log(trace.id);
}import os
from avido import Avido
client = Avido(
api_key=os.environ.get("AVIDO_API_KEY"), # This is the default and can be omitted
application_id=os.environ.get("AVIDO_APPLICATION_ID"), # This is the default and can be omitted
)
page = client.traces.list()
page = page.data[0]
print(page.id)curl --request GET \
--url https://api.avidoai.com/v0/traces \
--header 'x-api-key: <api-key>' \
--header 'x-application-id: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.avidoai.com/v0/traces",
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>",
"x-application-id: <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.avidoai.com/v0/traces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-application-id", "<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.avidoai.com/v0/traces")
.header("x-api-key", "<api-key>")
.header("x-application-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avidoai.com/v0/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-application-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-01-05T12:34:56.789123Z",
"referenceId": "123e4567-e89b-12d3-a456-426614174000",
"metadata": {
"userId": "123",
"source": "chatbot"
},
"testId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalCost": 0.0023,
"totalPromptTokens": 150,
"totalCompletionTokens": 200,
"totalDurationMs": 1500,
"hasError": false,
"stepCount": 5,
"steps": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"traceId": "610adba1-7cc0-4fa7-9e2b-8bd2fdf281b2",
"timestamp": "2025-01-05T12:34:56.789123Z",
"type": "llm",
"status": "success",
"modelId": "gpt-4o-2024-08-06",
"event": "start",
"input": "Tell me a joke.",
"name": "Moderation",
"group": "inputModeration",
"params": {},
"metadata": {},
"parentId": "456e7890-e89b-12d3-a456-426614174001",
"endTime": "2025-01-05T12:34:57.123456Z",
"durationMs": 334,
"costAmount": 0.0035,
"statusCode": "200",
"error": "TimeoutError: Request timed out after 30s"
}
],
"evals": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"orgId": "org_123456",
"createdAt": "2024-01-05T12:34:56.789Z",
"modifiedAt": "2024-01-05T12:34:56.789Z",
"status": "COMPLETED",
"definition": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2024-01-05T12:34:56.789Z",
"modifiedAt": "2024-01-05T12:34:56.789Z",
"type": "NATURALNESS",
"name": "<string>",
"globalConfig": {
"criterion": "<string>"
},
"styleGuideId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"orgId": "org_123456",
"title": "Customer Support Bot",
"slug": "customer-support-bot",
"description": "AI assistant for customer support inquiries",
"context": "You are a helpful customer support assistant...",
"language": "en",
"type": "CHATBOT",
"environment": "DEV",
"humanAnnotationEnabled": false,
"createdAt": "2024-01-05T12:34:56.789Z",
"modifiedAt": "2024-01-05T12:34:56.789Z"
},
"topics": [
"456e4567-e89b-12d3-a456-426614174000"
]
},
"results": {
"coherence": 3,
"engagingness": 3,
"naturalness": 3,
"relevance": 3,
"clarity": 3,
"analysis": "<string>"
},
"score": 0.9,
"passed": true,
"message": "<string>"
}
]
}
],
"pagination": {
"skip": 0,
"limit": 25,
"total": 100,
"totalPages": 4,
"totalCount": 100
}
}{
"message": "Resource not found"
}{
"message": "Resource not found"
}{
"message": "Resource not found"
}{
"message": "Invalid request data",
"issues": [
{
"code": "invalid_string",
"message": "Invalid UUID",
"path": [
"id"
]
}
]
}{
"message": "Resource not found"
}List Traces
Retrieve traces with associated steps, filtered by application ID and optional date parameters.
import Avido from 'avido';
const client = new Avido({
apiKey: process.env['AVIDO_API_KEY'], // This is the default and can be omitted
applicationID: process.env['AVIDO_APPLICATION_ID'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const trace of client.traces.list()) {
console.log(trace.id);
}import os
from avido import Avido
client = Avido(
api_key=os.environ.get("AVIDO_API_KEY"), # This is the default and can be omitted
application_id=os.environ.get("AVIDO_APPLICATION_ID"), # This is the default and can be omitted
)
page = client.traces.list()
page = page.data[0]
print(page.id)curl --request GET \
--url https://api.avidoai.com/v0/traces \
--header 'x-api-key: <api-key>' \
--header 'x-application-id: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.avidoai.com/v0/traces",
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>",
"x-application-id: <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.avidoai.com/v0/traces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-application-id", "<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.avidoai.com/v0/traces")
.header("x-api-key", "<api-key>")
.header("x-application-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avidoai.com/v0/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-application-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-01-05T12:34:56.789123Z",
"referenceId": "123e4567-e89b-12d3-a456-426614174000",
"metadata": {
"userId": "123",
"source": "chatbot"
},
"testId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalCost": 0.0023,
"totalPromptTokens": 150,
"totalCompletionTokens": 200,
"totalDurationMs": 1500,
"hasError": false,
"stepCount": 5,
"steps": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"traceId": "610adba1-7cc0-4fa7-9e2b-8bd2fdf281b2",
"timestamp": "2025-01-05T12:34:56.789123Z",
"type": "llm",
"status": "success",
"modelId": "gpt-4o-2024-08-06",
"event": "start",
"input": "Tell me a joke.",
"name": "Moderation",
"group": "inputModeration",
"params": {},
"metadata": {},
"parentId": "456e7890-e89b-12d3-a456-426614174001",
"endTime": "2025-01-05T12:34:57.123456Z",
"durationMs": 334,
"costAmount": 0.0035,
"statusCode": "200",
"error": "TimeoutError: Request timed out after 30s"
}
],
"evals": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"orgId": "org_123456",
"createdAt": "2024-01-05T12:34:56.789Z",
"modifiedAt": "2024-01-05T12:34:56.789Z",
"status": "COMPLETED",
"definition": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2024-01-05T12:34:56.789Z",
"modifiedAt": "2024-01-05T12:34:56.789Z",
"type": "NATURALNESS",
"name": "<string>",
"globalConfig": {
"criterion": "<string>"
},
"styleGuideId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"orgId": "org_123456",
"title": "Customer Support Bot",
"slug": "customer-support-bot",
"description": "AI assistant for customer support inquiries",
"context": "You are a helpful customer support assistant...",
"language": "en",
"type": "CHATBOT",
"environment": "DEV",
"humanAnnotationEnabled": false,
"createdAt": "2024-01-05T12:34:56.789Z",
"modifiedAt": "2024-01-05T12:34:56.789Z"
},
"topics": [
"456e4567-e89b-12d3-a456-426614174000"
]
},
"results": {
"coherence": 3,
"engagingness": 3,
"naturalness": 3,
"relevance": 3,
"clarity": 3,
"analysis": "<string>"
},
"score": 0.9,
"passed": true,
"message": "<string>"
}
]
}
],
"pagination": {
"skip": 0,
"limit": 25,
"total": 100,
"totalPages": 4,
"totalCount": 100
}
}{
"message": "Resource not found"
}{
"message": "Resource not found"
}{
"message": "Resource not found"
}{
"message": "Invalid request data",
"issues": [
{
"code": "invalid_string",
"message": "Invalid UUID",
"path": [
"id"
]
}
]
}{
"message": "Resource not found"
}Authorizations
Your unique Avido API key
Your unique Avido Application ID
Query Parameters
Number of items to skip before starting to collect the result set.
0 <= x <= 90071992547409910
Number of items to include in the result set.
1 <= x <= 10025
Field to order the result set by.
createdAt, modifiedAt, timestamp, totalCost, totalDurationMs, stepCount, id "timestamp"
Order direction.
asc, desc "desc"
Filter traces by test ID
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"123e4567-e89b-12d3-a456-426614174000"
Filter traces by reference ID
"ref-12345"
Filter traces created after this date (inclusive).
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$"2024-01-01T00:00:00.000Z"
Filter traces created before this date (inclusive).
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$"2024-12-31T23:59:59.999Z"
Filter traces with total cost greater than or equal to this value.
x >= 00.01
Filter traces with total cost less than or equal to this value.
x >= 01
Filter traces with total duration (ms) greater than or equal to this value.
0 <= x <= 2147483647100
Filter traces with total duration (ms) less than or equal to this value.
0 <= x <= 21474836475000
Filter traces with or without errors.
true
Metadata key to filter on. Must be used together with metadataValue.
"userId"
Metadata value to filter on. Must be used together with metadataKey.
"user-123"
Full-text search across trace step content fields (input, output, toolInput, toolOutput, content, query, result).
"error in response"
Filter traces with eval score greater than or equal to this value.
0 <= x <= 10.5
Filter traces with eval score less than or equal to this value.
0 <= x <= 10.9