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": "What is the capital of France?"
},
"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",
"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": "What is the capital of France?" },
"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",
"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: 'What is the capital of France?'},
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',
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' => 'What is the capital of France?'
],
'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',
'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\": \"What is the capital of France?\"\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 \"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\": \"What is the capital of France?\"\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 \"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\": \"What is the capital of France?\"\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 \"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": "What is the capital of France?"
},
"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",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}{
"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": "What is the capital of France?"
},
"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",
"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": "What is the capital of France?" },
"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",
"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: 'What is the capital of France?'},
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',
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' => 'What is the capital of France?'
],
'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',
'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\": \"What is the capital of France?\"\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 \"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\": \"What is the capital of France?\"\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 \"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\": \"What is the capital of France?\"\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 \"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": "What is the capital of France?"
},
"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",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}{
"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: "..." }
{
"user_message": "What is the capital of France?"
}
"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.
"es-MX"
Persona-derived gender ("MALE"/"FEMALE") for the male/female synthesized caller voice in phone (voice) evaluations. Stored only for now (not consumed yet). 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.
Response
Test case created successfully
"tc_123"
"test_123"
"user_123"
Structured input data. For plain text input, format is { user_message: "..." }
{
"user_message": "What is the capital of France?"
}
"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.
"es-MX"
Persona-derived gender ("MALE"/"FEMALE") for the male/female synthesized caller voice in phone (voice) evaluations. Stored only for now (not consumed yet). 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.