curl --request POST \
--url https://api.galtea.ai/testCases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "tc_123",
"testId": "test_123",
"userId": "user_123",
"input": {
"user_message": "Summarize this contract",
"content": [
{
"type": "file",
"uri": "https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf",
"filename": "contrato-arrendamiento.pdf",
"mimeType": "application/pdf",
"sizeBytes": 1468006
}
]
},
"expectedOutput": "Paris",
"expectedTools": [
"search",
"calculator"
],
"context": {
"value": "Geography question"
},
"source": "manual",
"sourceFile": "<string>",
"confidence": 0.95,
"confidenceReason": "High quality data",
"variant": "VARIANT_1",
"strategy": "STRATEGY_1",
"languageCode": "es-MX",
"gender": "FEMALE",
"backgroundNoiseProfile": "street",
"backgroundNoiseLevel": "medium",
"userPersona": "Student",
"scenario": "Educational quiz",
"goal": "Test geographical knowledge",
"archetype": "data_grounded",
"specRelevance": "direct",
"stoppingCriterias": [
"MAX_ITERATIONS",
"GOAL_ACHIEVED"
],
"maxIterations": 10,
"isAugmented": false,
"reviewedById": "user_456",
"userScore": 5,
"userScoreReason": "Accurate and complete",
"creditsUsed": 1,
"sourceTestCaseId": "<string>",
"testCaseGroupId": "testCaseGroup_123",
"parentTestCaseId": "<string>",
"legacyAt": "2023-11-07T05:31:56Z",
"conversationHistory": [
{
"role": "user",
"content": "I want to open an account"
}
],
"seedSessionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.galtea.ai/testCases"
payload = {
"id": "tc_123",
"testId": "test_123",
"userId": "user_123",
"input": {
"user_message": "Summarize this contract",
"content": [
{
"type": "file",
"uri": "https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf",
"filename": "contrato-arrendamiento.pdf",
"mimeType": "application/pdf",
"sizeBytes": 1468006
}
]
},
"expectedOutput": "Paris",
"expectedTools": ["search", "calculator"],
"context": { "value": "Geography question" },
"source": "manual",
"sourceFile": "<string>",
"confidence": 0.95,
"confidenceReason": "High quality data",
"variant": "VARIANT_1",
"strategy": "STRATEGY_1",
"languageCode": "es-MX",
"gender": "FEMALE",
"backgroundNoiseProfile": "street",
"backgroundNoiseLevel": "medium",
"userPersona": "Student",
"scenario": "Educational quiz",
"goal": "Test geographical knowledge",
"archetype": "data_grounded",
"specRelevance": "direct",
"stoppingCriterias": ["MAX_ITERATIONS", "GOAL_ACHIEVED"],
"maxIterations": 10,
"isAugmented": False,
"reviewedById": "user_456",
"userScore": 5,
"userScoreReason": "Accurate and complete",
"creditsUsed": 1,
"sourceTestCaseId": "<string>",
"testCaseGroupId": "testCaseGroup_123",
"parentTestCaseId": "<string>",
"legacyAt": "2023-11-07T05:31:56Z",
"conversationHistory": [
{
"role": "user",
"content": "I want to open an account"
}
],
"seedSessionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
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({
id: 'tc_123',
testId: 'test_123',
userId: 'user_123',
input: {
user_message: 'Summarize this contract',
content: [
{
type: 'file',
uri: 'https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf',
filename: 'contrato-arrendamiento.pdf',
mimeType: 'application/pdf',
sizeBytes: 1468006
}
]
},
expectedOutput: 'Paris',
expectedTools: ['search', 'calculator'],
context: {value: 'Geography question'},
source: 'manual',
sourceFile: '<string>',
confidence: 0.95,
confidenceReason: 'High quality data',
variant: 'VARIANT_1',
strategy: 'STRATEGY_1',
languageCode: 'es-MX',
gender: 'FEMALE',
backgroundNoiseProfile: 'street',
backgroundNoiseLevel: 'medium',
userPersona: 'Student',
scenario: 'Educational quiz',
goal: 'Test geographical knowledge',
archetype: 'data_grounded',
specRelevance: 'direct',
stoppingCriterias: ['MAX_ITERATIONS', 'GOAL_ACHIEVED'],
maxIterations: 10,
isAugmented: false,
reviewedById: 'user_456',
userScore: 5,
userScoreReason: 'Accurate and complete',
creditsUsed: 1,
sourceTestCaseId: '<string>',
testCaseGroupId: 'testCaseGroup_123',
parentTestCaseId: '<string>',
legacyAt: '2023-11-07T05:31:56Z',
conversationHistory: [{role: 'user', content: 'I want to open an account'}],
seedSessionId: '<string>',
createdAt: '2023-11-07T05:31:56Z',
deletedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.galtea.ai/testCases', 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.galtea.ai/testCases",
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([
'id' => 'tc_123',
'testId' => 'test_123',
'userId' => 'user_123',
'input' => [
'user_message' => 'Summarize this contract',
'content' => [
[
'type' => 'file',
'uri' => 'https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf',
'filename' => 'contrato-arrendamiento.pdf',
'mimeType' => 'application/pdf',
'sizeBytes' => 1468006
]
]
],
'expectedOutput' => 'Paris',
'expectedTools' => [
'search',
'calculator'
],
'context' => [
'value' => 'Geography question'
],
'source' => 'manual',
'sourceFile' => '<string>',
'confidence' => 0.95,
'confidenceReason' => 'High quality data',
'variant' => 'VARIANT_1',
'strategy' => 'STRATEGY_1',
'languageCode' => 'es-MX',
'gender' => 'FEMALE',
'backgroundNoiseProfile' => 'street',
'backgroundNoiseLevel' => 'medium',
'userPersona' => 'Student',
'scenario' => 'Educational quiz',
'goal' => 'Test geographical knowledge',
'archetype' => 'data_grounded',
'specRelevance' => 'direct',
'stoppingCriterias' => [
'MAX_ITERATIONS',
'GOAL_ACHIEVED'
],
'maxIterations' => 10,
'isAugmented' => false,
'reviewedById' => 'user_456',
'userScore' => 5,
'userScoreReason' => 'Accurate and complete',
'creditsUsed' => 1,
'sourceTestCaseId' => '<string>',
'testCaseGroupId' => 'testCaseGroup_123',
'parentTestCaseId' => '<string>',
'legacyAt' => '2023-11-07T05:31:56Z',
'conversationHistory' => [
[
'role' => 'user',
'content' => 'I want to open an account'
]
],
'seedSessionId' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'deletedAt' => '2023-11-07T05:31:56Z'
]),
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.galtea.ai/testCases"
payload := strings.NewReader("{\n \"id\": \"tc_123\",\n \"testId\": \"test_123\",\n \"userId\": \"user_123\",\n \"input\": {\n \"user_message\": \"Summarize this contract\",\n \"content\": [\n {\n \"type\": \"file\",\n \"uri\": \"https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf\",\n \"filename\": \"contrato-arrendamiento.pdf\",\n \"mimeType\": \"application/pdf\",\n \"sizeBytes\": 1468006\n }\n ]\n },\n \"expectedOutput\": \"Paris\",\n \"expectedTools\": [\n \"search\",\n \"calculator\"\n ],\n \"context\": {\n \"value\": \"Geography question\"\n },\n \"source\": \"manual\",\n \"sourceFile\": \"<string>\",\n \"confidence\": 0.95,\n \"confidenceReason\": \"High quality data\",\n \"variant\": \"VARIANT_1\",\n \"strategy\": \"STRATEGY_1\",\n \"languageCode\": \"es-MX\",\n \"gender\": \"FEMALE\",\n \"backgroundNoiseProfile\": \"street\",\n \"backgroundNoiseLevel\": \"medium\",\n \"userPersona\": \"Student\",\n \"scenario\": \"Educational quiz\",\n \"goal\": \"Test geographical knowledge\",\n \"archetype\": \"data_grounded\",\n \"specRelevance\": \"direct\",\n \"stoppingCriterias\": [\n \"MAX_ITERATIONS\",\n \"GOAL_ACHIEVED\"\n ],\n \"maxIterations\": 10,\n \"isAugmented\": false,\n \"reviewedById\": \"user_456\",\n \"userScore\": 5,\n \"userScoreReason\": \"Accurate and complete\",\n \"creditsUsed\": 1,\n \"sourceTestCaseId\": \"<string>\",\n \"testCaseGroupId\": \"testCaseGroup_123\",\n \"parentTestCaseId\": \"<string>\",\n \"legacyAt\": \"2023-11-07T05:31:56Z\",\n \"conversationHistory\": [\n {\n \"role\": \"user\",\n \"content\": \"I want to open an account\"\n }\n ],\n \"seedSessionId\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\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.galtea.ai/testCases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"tc_123\",\n \"testId\": \"test_123\",\n \"userId\": \"user_123\",\n \"input\": {\n \"user_message\": \"Summarize this contract\",\n \"content\": [\n {\n \"type\": \"file\",\n \"uri\": \"https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf\",\n \"filename\": \"contrato-arrendamiento.pdf\",\n \"mimeType\": \"application/pdf\",\n \"sizeBytes\": 1468006\n }\n ]\n },\n \"expectedOutput\": \"Paris\",\n \"expectedTools\": [\n \"search\",\n \"calculator\"\n ],\n \"context\": {\n \"value\": \"Geography question\"\n },\n \"source\": \"manual\",\n \"sourceFile\": \"<string>\",\n \"confidence\": 0.95,\n \"confidenceReason\": \"High quality data\",\n \"variant\": \"VARIANT_1\",\n \"strategy\": \"STRATEGY_1\",\n \"languageCode\": \"es-MX\",\n \"gender\": \"FEMALE\",\n \"backgroundNoiseProfile\": \"street\",\n \"backgroundNoiseLevel\": \"medium\",\n \"userPersona\": \"Student\",\n \"scenario\": \"Educational quiz\",\n \"goal\": \"Test geographical knowledge\",\n \"archetype\": \"data_grounded\",\n \"specRelevance\": \"direct\",\n \"stoppingCriterias\": [\n \"MAX_ITERATIONS\",\n \"GOAL_ACHIEVED\"\n ],\n \"maxIterations\": 10,\n \"isAugmented\": false,\n \"reviewedById\": \"user_456\",\n \"userScore\": 5,\n \"userScoreReason\": \"Accurate and complete\",\n \"creditsUsed\": 1,\n \"sourceTestCaseId\": \"<string>\",\n \"testCaseGroupId\": \"testCaseGroup_123\",\n \"parentTestCaseId\": \"<string>\",\n \"legacyAt\": \"2023-11-07T05:31:56Z\",\n \"conversationHistory\": [\n {\n \"role\": \"user\",\n \"content\": \"I want to open an account\"\n }\n ],\n \"seedSessionId\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/testCases")
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 \"id\": \"tc_123\",\n \"testId\": \"test_123\",\n \"userId\": \"user_123\",\n \"input\": {\n \"user_message\": \"Summarize this contract\",\n \"content\": [\n {\n \"type\": \"file\",\n \"uri\": \"https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf\",\n \"filename\": \"contrato-arrendamiento.pdf\",\n \"mimeType\": \"application/pdf\",\n \"sizeBytes\": 1468006\n }\n ]\n },\n \"expectedOutput\": \"Paris\",\n \"expectedTools\": [\n \"search\",\n \"calculator\"\n ],\n \"context\": {\n \"value\": \"Geography question\"\n },\n \"source\": \"manual\",\n \"sourceFile\": \"<string>\",\n \"confidence\": 0.95,\n \"confidenceReason\": \"High quality data\",\n \"variant\": \"VARIANT_1\",\n \"strategy\": \"STRATEGY_1\",\n \"languageCode\": \"es-MX\",\n \"gender\": \"FEMALE\",\n \"backgroundNoiseProfile\": \"street\",\n \"backgroundNoiseLevel\": \"medium\",\n \"userPersona\": \"Student\",\n \"scenario\": \"Educational quiz\",\n \"goal\": \"Test geographical knowledge\",\n \"archetype\": \"data_grounded\",\n \"specRelevance\": \"direct\",\n \"stoppingCriterias\": [\n \"MAX_ITERATIONS\",\n \"GOAL_ACHIEVED\"\n ],\n \"maxIterations\": 10,\n \"isAugmented\": false,\n \"reviewedById\": \"user_456\",\n \"userScore\": 5,\n \"userScoreReason\": \"Accurate and complete\",\n \"creditsUsed\": 1,\n \"sourceTestCaseId\": \"<string>\",\n \"testCaseGroupId\": \"testCaseGroup_123\",\n \"parentTestCaseId\": \"<string>\",\n \"legacyAt\": \"2023-11-07T05:31:56Z\",\n \"conversationHistory\": [\n {\n \"role\": \"user\",\n \"content\": \"I want to open an account\"\n }\n ],\n \"seedSessionId\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "tc_123",
"testId": "test_123",
"userId": "user_123",
"input": {
"user_message": "Summarize this contract",
"content": [
{
"type": "file",
"uri": "https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf",
"filename": "contrato-arrendamiento.pdf",
"mimeType": "application/pdf",
"sizeBytes": 1468006
}
]
},
"expectedOutput": "Paris",
"expectedTools": [
"search",
"calculator"
],
"context": {
"value": "Geography question"
},
"source": "manual",
"sourceFile": "<string>",
"confidence": 0.95,
"confidenceReason": "High quality data",
"variant": "VARIANT_1",
"strategy": "STRATEGY_1",
"languageCode": "es-MX",
"gender": "FEMALE",
"backgroundNoiseProfile": "street",
"backgroundNoiseLevel": "medium",
"userPersona": "Student",
"scenario": "Educational quiz",
"goal": "Test geographical knowledge",
"archetype": "data_grounded",
"specRelevance": "direct",
"stoppingCriterias": [
"MAX_ITERATIONS",
"GOAL_ACHIEVED"
],
"maxIterations": 10,
"isAugmented": false,
"reviewedById": "user_456",
"userScore": 5,
"userScoreReason": "Accurate and complete",
"creditsUsed": 1,
"sourceTestCaseId": "<string>",
"testCaseGroupId": "testCaseGroup_123",
"parentTestCaseId": "<string>",
"legacyAt": "2023-11-07T05:31:56Z",
"seedSessionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Create test case
Create a new test case. See Datasets.
curl --request POST \
--url https://api.galtea.ai/testCases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "tc_123",
"testId": "test_123",
"userId": "user_123",
"input": {
"user_message": "Summarize this contract",
"content": [
{
"type": "file",
"uri": "https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf",
"filename": "contrato-arrendamiento.pdf",
"mimeType": "application/pdf",
"sizeBytes": 1468006
}
]
},
"expectedOutput": "Paris",
"expectedTools": [
"search",
"calculator"
],
"context": {
"value": "Geography question"
},
"source": "manual",
"sourceFile": "<string>",
"confidence": 0.95,
"confidenceReason": "High quality data",
"variant": "VARIANT_1",
"strategy": "STRATEGY_1",
"languageCode": "es-MX",
"gender": "FEMALE",
"backgroundNoiseProfile": "street",
"backgroundNoiseLevel": "medium",
"userPersona": "Student",
"scenario": "Educational quiz",
"goal": "Test geographical knowledge",
"archetype": "data_grounded",
"specRelevance": "direct",
"stoppingCriterias": [
"MAX_ITERATIONS",
"GOAL_ACHIEVED"
],
"maxIterations": 10,
"isAugmented": false,
"reviewedById": "user_456",
"userScore": 5,
"userScoreReason": "Accurate and complete",
"creditsUsed": 1,
"sourceTestCaseId": "<string>",
"testCaseGroupId": "testCaseGroup_123",
"parentTestCaseId": "<string>",
"legacyAt": "2023-11-07T05:31:56Z",
"conversationHistory": [
{
"role": "user",
"content": "I want to open an account"
}
],
"seedSessionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.galtea.ai/testCases"
payload = {
"id": "tc_123",
"testId": "test_123",
"userId": "user_123",
"input": {
"user_message": "Summarize this contract",
"content": [
{
"type": "file",
"uri": "https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf",
"filename": "contrato-arrendamiento.pdf",
"mimeType": "application/pdf",
"sizeBytes": 1468006
}
]
},
"expectedOutput": "Paris",
"expectedTools": ["search", "calculator"],
"context": { "value": "Geography question" },
"source": "manual",
"sourceFile": "<string>",
"confidence": 0.95,
"confidenceReason": "High quality data",
"variant": "VARIANT_1",
"strategy": "STRATEGY_1",
"languageCode": "es-MX",
"gender": "FEMALE",
"backgroundNoiseProfile": "street",
"backgroundNoiseLevel": "medium",
"userPersona": "Student",
"scenario": "Educational quiz",
"goal": "Test geographical knowledge",
"archetype": "data_grounded",
"specRelevance": "direct",
"stoppingCriterias": ["MAX_ITERATIONS", "GOAL_ACHIEVED"],
"maxIterations": 10,
"isAugmented": False,
"reviewedById": "user_456",
"userScore": 5,
"userScoreReason": "Accurate and complete",
"creditsUsed": 1,
"sourceTestCaseId": "<string>",
"testCaseGroupId": "testCaseGroup_123",
"parentTestCaseId": "<string>",
"legacyAt": "2023-11-07T05:31:56Z",
"conversationHistory": [
{
"role": "user",
"content": "I want to open an account"
}
],
"seedSessionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
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({
id: 'tc_123',
testId: 'test_123',
userId: 'user_123',
input: {
user_message: 'Summarize this contract',
content: [
{
type: 'file',
uri: 'https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf',
filename: 'contrato-arrendamiento.pdf',
mimeType: 'application/pdf',
sizeBytes: 1468006
}
]
},
expectedOutput: 'Paris',
expectedTools: ['search', 'calculator'],
context: {value: 'Geography question'},
source: 'manual',
sourceFile: '<string>',
confidence: 0.95,
confidenceReason: 'High quality data',
variant: 'VARIANT_1',
strategy: 'STRATEGY_1',
languageCode: 'es-MX',
gender: 'FEMALE',
backgroundNoiseProfile: 'street',
backgroundNoiseLevel: 'medium',
userPersona: 'Student',
scenario: 'Educational quiz',
goal: 'Test geographical knowledge',
archetype: 'data_grounded',
specRelevance: 'direct',
stoppingCriterias: ['MAX_ITERATIONS', 'GOAL_ACHIEVED'],
maxIterations: 10,
isAugmented: false,
reviewedById: 'user_456',
userScore: 5,
userScoreReason: 'Accurate and complete',
creditsUsed: 1,
sourceTestCaseId: '<string>',
testCaseGroupId: 'testCaseGroup_123',
parentTestCaseId: '<string>',
legacyAt: '2023-11-07T05:31:56Z',
conversationHistory: [{role: 'user', content: 'I want to open an account'}],
seedSessionId: '<string>',
createdAt: '2023-11-07T05:31:56Z',
deletedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.galtea.ai/testCases', 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.galtea.ai/testCases",
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([
'id' => 'tc_123',
'testId' => 'test_123',
'userId' => 'user_123',
'input' => [
'user_message' => 'Summarize this contract',
'content' => [
[
'type' => 'file',
'uri' => 'https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf',
'filename' => 'contrato-arrendamiento.pdf',
'mimeType' => 'application/pdf',
'sizeBytes' => 1468006
]
]
],
'expectedOutput' => 'Paris',
'expectedTools' => [
'search',
'calculator'
],
'context' => [
'value' => 'Geography question'
],
'source' => 'manual',
'sourceFile' => '<string>',
'confidence' => 0.95,
'confidenceReason' => 'High quality data',
'variant' => 'VARIANT_1',
'strategy' => 'STRATEGY_1',
'languageCode' => 'es-MX',
'gender' => 'FEMALE',
'backgroundNoiseProfile' => 'street',
'backgroundNoiseLevel' => 'medium',
'userPersona' => 'Student',
'scenario' => 'Educational quiz',
'goal' => 'Test geographical knowledge',
'archetype' => 'data_grounded',
'specRelevance' => 'direct',
'stoppingCriterias' => [
'MAX_ITERATIONS',
'GOAL_ACHIEVED'
],
'maxIterations' => 10,
'isAugmented' => false,
'reviewedById' => 'user_456',
'userScore' => 5,
'userScoreReason' => 'Accurate and complete',
'creditsUsed' => 1,
'sourceTestCaseId' => '<string>',
'testCaseGroupId' => 'testCaseGroup_123',
'parentTestCaseId' => '<string>',
'legacyAt' => '2023-11-07T05:31:56Z',
'conversationHistory' => [
[
'role' => 'user',
'content' => 'I want to open an account'
]
],
'seedSessionId' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'deletedAt' => '2023-11-07T05:31:56Z'
]),
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.galtea.ai/testCases"
payload := strings.NewReader("{\n \"id\": \"tc_123\",\n \"testId\": \"test_123\",\n \"userId\": \"user_123\",\n \"input\": {\n \"user_message\": \"Summarize this contract\",\n \"content\": [\n {\n \"type\": \"file\",\n \"uri\": \"https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf\",\n \"filename\": \"contrato-arrendamiento.pdf\",\n \"mimeType\": \"application/pdf\",\n \"sizeBytes\": 1468006\n }\n ]\n },\n \"expectedOutput\": \"Paris\",\n \"expectedTools\": [\n \"search\",\n \"calculator\"\n ],\n \"context\": {\n \"value\": \"Geography question\"\n },\n \"source\": \"manual\",\n \"sourceFile\": \"<string>\",\n \"confidence\": 0.95,\n \"confidenceReason\": \"High quality data\",\n \"variant\": \"VARIANT_1\",\n \"strategy\": \"STRATEGY_1\",\n \"languageCode\": \"es-MX\",\n \"gender\": \"FEMALE\",\n \"backgroundNoiseProfile\": \"street\",\n \"backgroundNoiseLevel\": \"medium\",\n \"userPersona\": \"Student\",\n \"scenario\": \"Educational quiz\",\n \"goal\": \"Test geographical knowledge\",\n \"archetype\": \"data_grounded\",\n \"specRelevance\": \"direct\",\n \"stoppingCriterias\": [\n \"MAX_ITERATIONS\",\n \"GOAL_ACHIEVED\"\n ],\n \"maxIterations\": 10,\n \"isAugmented\": false,\n \"reviewedById\": \"user_456\",\n \"userScore\": 5,\n \"userScoreReason\": \"Accurate and complete\",\n \"creditsUsed\": 1,\n \"sourceTestCaseId\": \"<string>\",\n \"testCaseGroupId\": \"testCaseGroup_123\",\n \"parentTestCaseId\": \"<string>\",\n \"legacyAt\": \"2023-11-07T05:31:56Z\",\n \"conversationHistory\": [\n {\n \"role\": \"user\",\n \"content\": \"I want to open an account\"\n }\n ],\n \"seedSessionId\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\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.galtea.ai/testCases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"tc_123\",\n \"testId\": \"test_123\",\n \"userId\": \"user_123\",\n \"input\": {\n \"user_message\": \"Summarize this contract\",\n \"content\": [\n {\n \"type\": \"file\",\n \"uri\": \"https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf\",\n \"filename\": \"contrato-arrendamiento.pdf\",\n \"mimeType\": \"application/pdf\",\n \"sizeBytes\": 1468006\n }\n ]\n },\n \"expectedOutput\": \"Paris\",\n \"expectedTools\": [\n \"search\",\n \"calculator\"\n ],\n \"context\": {\n \"value\": \"Geography question\"\n },\n \"source\": \"manual\",\n \"sourceFile\": \"<string>\",\n \"confidence\": 0.95,\n \"confidenceReason\": \"High quality data\",\n \"variant\": \"VARIANT_1\",\n \"strategy\": \"STRATEGY_1\",\n \"languageCode\": \"es-MX\",\n \"gender\": \"FEMALE\",\n \"backgroundNoiseProfile\": \"street\",\n \"backgroundNoiseLevel\": \"medium\",\n \"userPersona\": \"Student\",\n \"scenario\": \"Educational quiz\",\n \"goal\": \"Test geographical knowledge\",\n \"archetype\": \"data_grounded\",\n \"specRelevance\": \"direct\",\n \"stoppingCriterias\": [\n \"MAX_ITERATIONS\",\n \"GOAL_ACHIEVED\"\n ],\n \"maxIterations\": 10,\n \"isAugmented\": false,\n \"reviewedById\": \"user_456\",\n \"userScore\": 5,\n \"userScoreReason\": \"Accurate and complete\",\n \"creditsUsed\": 1,\n \"sourceTestCaseId\": \"<string>\",\n \"testCaseGroupId\": \"testCaseGroup_123\",\n \"parentTestCaseId\": \"<string>\",\n \"legacyAt\": \"2023-11-07T05:31:56Z\",\n \"conversationHistory\": [\n {\n \"role\": \"user\",\n \"content\": \"I want to open an account\"\n }\n ],\n \"seedSessionId\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/testCases")
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 \"id\": \"tc_123\",\n \"testId\": \"test_123\",\n \"userId\": \"user_123\",\n \"input\": {\n \"user_message\": \"Summarize this contract\",\n \"content\": [\n {\n \"type\": \"file\",\n \"uri\": \"https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf\",\n \"filename\": \"contrato-arrendamiento.pdf\",\n \"mimeType\": \"application/pdf\",\n \"sizeBytes\": 1468006\n }\n ]\n },\n \"expectedOutput\": \"Paris\",\n \"expectedTools\": [\n \"search\",\n \"calculator\"\n ],\n \"context\": {\n \"value\": \"Geography question\"\n },\n \"source\": \"manual\",\n \"sourceFile\": \"<string>\",\n \"confidence\": 0.95,\n \"confidenceReason\": \"High quality data\",\n \"variant\": \"VARIANT_1\",\n \"strategy\": \"STRATEGY_1\",\n \"languageCode\": \"es-MX\",\n \"gender\": \"FEMALE\",\n \"backgroundNoiseProfile\": \"street\",\n \"backgroundNoiseLevel\": \"medium\",\n \"userPersona\": \"Student\",\n \"scenario\": \"Educational quiz\",\n \"goal\": \"Test geographical knowledge\",\n \"archetype\": \"data_grounded\",\n \"specRelevance\": \"direct\",\n \"stoppingCriterias\": [\n \"MAX_ITERATIONS\",\n \"GOAL_ACHIEVED\"\n ],\n \"maxIterations\": 10,\n \"isAugmented\": false,\n \"reviewedById\": \"user_456\",\n \"userScore\": 5,\n \"userScoreReason\": \"Accurate and complete\",\n \"creditsUsed\": 1,\n \"sourceTestCaseId\": \"<string>\",\n \"testCaseGroupId\": \"testCaseGroup_123\",\n \"parentTestCaseId\": \"<string>\",\n \"legacyAt\": \"2023-11-07T05:31:56Z\",\n \"conversationHistory\": [\n {\n \"role\": \"user\",\n \"content\": \"I want to open an account\"\n }\n ],\n \"seedSessionId\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "tc_123",
"testId": "test_123",
"userId": "user_123",
"input": {
"user_message": "Summarize this contract",
"content": [
{
"type": "file",
"uri": "https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf",
"filename": "contrato-arrendamiento.pdf",
"mimeType": "application/pdf",
"sizeBytes": 1468006
}
]
},
"expectedOutput": "Paris",
"expectedTools": [
"search",
"calculator"
],
"context": {
"value": "Geography question"
},
"source": "manual",
"sourceFile": "<string>",
"confidence": 0.95,
"confidenceReason": "High quality data",
"variant": "VARIANT_1",
"strategy": "STRATEGY_1",
"languageCode": "es-MX",
"gender": "FEMALE",
"backgroundNoiseProfile": "street",
"backgroundNoiseLevel": "medium",
"userPersona": "Student",
"scenario": "Educational quiz",
"goal": "Test geographical knowledge",
"archetype": "data_grounded",
"specRelevance": "direct",
"stoppingCriterias": [
"MAX_ITERATIONS",
"GOAL_ACHIEVED"
],
"maxIterations": 10,
"isAugmented": false,
"reviewedById": "user_456",
"userScore": 5,
"userScoreReason": "Accurate and complete",
"creditsUsed": 1,
"sourceTestCaseId": "<string>",
"testCaseGroupId": "testCaseGroup_123",
"parentTestCaseId": "<string>",
"legacyAt": "2023-11-07T05:31:56Z",
"seedSessionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Authorizations
API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....
Body
"tc_123"
"test_123"
"user_123"
Structured input data. For plain text input, format is { user_message: "..." }. Uploaded files ride a content array of parts, each { type: "file", uri, filename, mimeType }, beside an optional user_message. A file part is a Galtea file when its uri names a Galtea storage key (files/<organization>/<32 hex>.<extension>); every other element is stored as sent. For a Galtea file, mimeType is filled from the stored object when omitted, and filename is filled only where the storage records it: AWS does, Azure Blob does not, so send filename on an Azure deployment. Every Galtea file part is returned with a server-measured sizeBytes; a value sent for it is ignored.
{
"user_message": "Summarize this contract",
"content": [
{
"type": "file",
"uri": "https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf",
"filename": "contrato-arrendamiento.pdf",
"mimeType": "application/pdf",
"sizeBytes": 1468006
}
]
}
"Paris"
["search", "calculator"]
Structured context data. For plain text context, format is { value: "..." }
{ "value": "Geography question" }
"manual"
0.95
"High quality data"
"VARIANT_1"
"STRATEGY_1"
BCP-47 language tag (e.g. en, es-MX). The region subtag selects the regional variety in simulated user messages and voice synthesis; generated test text keeps the base language. The value is stored as the full tag. A bare code for ca, de, es, eu, fr, gl, it, nl or pt defaults to the European variety of that language, in simulated user messages only (pt -> pt-PT); an explicit region always overrides it, and neither voice synthesis nor the stored value is affected.
"es-MX"
Persona-derived gender ("MALE"/"FEMALE") for the male/female synthesized caller voice in phone (voice) evaluations. A voice pinned for the call's locale takes precedence. Ignored by text evaluations.
MALE, FEMALE "FEMALE"
Background noise mixed into the simulated caller audio during a voice test. Clip-backed (office, street, car) or synthetic (white, pink). Null means off; set together with backgroundNoiseLevel.
office, street, car, white, pink "street"
How loud the background noise is relative to the caller speech. Null means off; set together with backgroundNoiseProfile.
light, medium, heavy "medium"
"Student"
"Educational quiz"
"Test geographical knowledge"
"data_grounded"
"direct"
["MAX_ITERATIONS", "GOAL_ACHIEVED"]
10
false
"user_456"
5
"Accurate and complete"
1
Revision family key shared by every revision of this test case.
"testCaseGroup_123"
The revision this row was forked from; null for a family root.
Set when this revision was superseded by a newer one; null for the active head.
Predefined conversation for this SCENARIOS test case. The API stores it as a seed session and returns that session id in seedSessionId. Write-only: the array itself is never echoed back, read the predefined conversation through the seed session. Sending it again replaces the predefined conversation; an identical array changes nothing. Omit the field to leave the predefined conversation untouched; null is rejected. Cannot be sent together with seedSessionId, which is the other way to give this test case a conversation.
Show child attributes
Show child attributes
Read and write mean different things here, and the two ids are never the same session. On a response it is the seed session holding this test case predefined conversation, or null when it has none. On a request it is the SOURCE session to copy, which must be a session of this test product. The API answers with the id of the copy it made, never with the id you sent. Omit it, send null, or send back the id the response gave you, and the predefined conversation stays as it is. There is no way to remove a predefined conversation. Cannot be sent together with conversationHistory, the other way to give this test case a conversation.
Response
Test case created successfully
"tc_123"
"test_123"
"user_123"
Structured input data. For plain text input, format is { user_message: "..." }. Uploaded files ride a content array of parts, each { type: "file", uri, filename, mimeType }, beside an optional user_message. A file part is a Galtea file when its uri names a Galtea storage key (files/<organization>/<32 hex>.<extension>); every other element is stored as sent. For a Galtea file, mimeType is filled from the stored object when omitted, and filename is filled only where the storage records it: AWS does, Azure Blob does not, so send filename on an Azure deployment. Every Galtea file part is returned with a server-measured sizeBytes; a value sent for it is ignored.
{
"user_message": "Summarize this contract",
"content": [
{
"type": "file",
"uri": "https://files.galtea.ai/files/org_123/2f6c0a9e41b84d7f9c3e5a1b2d4f6e80.pdf",
"filename": "contrato-arrendamiento.pdf",
"mimeType": "application/pdf",
"sizeBytes": 1468006
}
]
}
"Paris"
["search", "calculator"]
Structured context data. For plain text context, format is { value: "..." }
{ "value": "Geography question" }
"manual"
0.95
"High quality data"
"VARIANT_1"
"STRATEGY_1"
BCP-47 language tag (e.g. en, es-MX). The region subtag selects the regional variety in simulated user messages and voice synthesis; generated test text keeps the base language. The value is stored as the full tag. A bare code for ca, de, es, eu, fr, gl, it, nl or pt defaults to the European variety of that language, in simulated user messages only (pt -> pt-PT); an explicit region always overrides it, and neither voice synthesis nor the stored value is affected.
"es-MX"
Persona-derived gender ("MALE"/"FEMALE") for the male/female synthesized caller voice in phone (voice) evaluations. A voice pinned for the call's locale takes precedence. Ignored by text evaluations.
MALE, FEMALE "FEMALE"
Background noise mixed into the simulated caller audio during a voice test. Clip-backed (office, street, car) or synthetic (white, pink). Null means off; set together with backgroundNoiseLevel.
office, street, car, white, pink "street"
How loud the background noise is relative to the caller speech. Null means off; set together with backgroundNoiseProfile.
light, medium, heavy "medium"
"Student"
"Educational quiz"
"Test geographical knowledge"
"data_grounded"
"direct"
["MAX_ITERATIONS", "GOAL_ACHIEVED"]
10
false
"user_456"
5
"Accurate and complete"
1
Revision family key shared by every revision of this test case.
"testCaseGroup_123"
The revision this row was forked from; null for a family root.
Set when this revision was superseded by a newer one; null for the active head.
Read and write mean different things here, and the two ids are never the same session. On a response it is the seed session holding this test case predefined conversation, or null when it has none. On a request it is the SOURCE session to copy, which must be a session of this test product. The API answers with the id of the copy it made, never with the id you sent. Omit it, send null, or send back the id the response gave you, and the predefined conversation stays as it is. There is no way to remove a predefined conversation. Cannot be sent together with conversationHistory, the other way to give this test case a conversation.