Skip to main content
POST
/
testCases
Create test case
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": "en",
  "userPersona": "Student",
  "scenario": "Educational quiz",
  "goal": "Test geographical knowledge",
  "stoppingCriterias": [
    "MAX_ITERATIONS",
    "GOAL_ACHIEVED"
  ],
  "maxIterations": 10,
  "isAugmented": false,
  "reviewedById": "user_456",
  "userScore": 5,
  "userScoreReason": "Accurate and complete",
  "creditsUsed": 1,
  "sourceTestCaseId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z"
}
'
{
  "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": "en",
  "userPersona": "Student",
  "scenario": "Educational quiz",
  "goal": "Test geographical knowledge",
  "stoppingCriterias": [
    "MAX_ITERATIONS",
    "GOAL_ACHIEVED"
  ],
  "maxIterations": 10,
  "isAugmented": false,
  "reviewedById": "user_456",
  "userScore": 5,
  "userScoreReason": "Accurate and complete",
  "creditsUsed": 1,
  "sourceTestCaseId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

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

application/json
id
string
Example:

"tc_123"

testId
string
Example:

"test_123"

userId
string | null
Example:

"user_123"

input
object

Structured input data. For plain text input, format is { user_message: "..." }

Example:
{
"user_message": "What is the capital of France?"
}
expectedOutput
string | null
Example:

"Paris"

expectedTools
string[]
Example:
["search", "calculator"]
context
object

Structured context data. For plain text context, format is { value: "..." }

Example:
{ "value": "Geography question" }
source
string | null
Example:

"manual"

sourceFile
string | null
confidence
number | null
Example:

0.95

confidenceReason
string | null
Example:

"High quality data"

variant
string | null
Example:

"VARIANT_1"

strategy
string | null
Example:

"STRATEGY_1"

languageCode
string | null
Example:

"en"

userPersona
string | null
Example:

"Student"

scenario
string | null
Example:

"Educational quiz"

goal
string | null
Example:

"Test geographical knowledge"

stoppingCriterias
string[]
Example:
["MAX_ITERATIONS", "GOAL_ACHIEVED"]
maxIterations
integer | null
Example:

10

isAugmented
boolean
Example:

false

reviewedById
string | null
Example:

"user_456"

userScore
integer | null
Example:

5

userScoreReason
string | null
Example:

"Accurate and complete"

creditsUsed
integer | null
Example:

1

sourceTestCaseId
string | null
createdAt
string<date-time>
deletedAt
string<date-time> | null

Response

Test case created successfully

id
string
Example:

"tc_123"

testId
string
Example:

"test_123"

userId
string | null
Example:

"user_123"

input
object

Structured input data. For plain text input, format is { user_message: "..." }

Example:
{
"user_message": "What is the capital of France?"
}
expectedOutput
string | null
Example:

"Paris"

expectedTools
string[]
Example:
["search", "calculator"]
context
object

Structured context data. For plain text context, format is { value: "..." }

Example:
{ "value": "Geography question" }
source
string | null
Example:

"manual"

sourceFile
string | null
confidence
number | null
Example:

0.95

confidenceReason
string | null
Example:

"High quality data"

variant
string | null
Example:

"VARIANT_1"

strategy
string | null
Example:

"STRATEGY_1"

languageCode
string | null
Example:

"en"

userPersona
string | null
Example:

"Student"

scenario
string | null
Example:

"Educational quiz"

goal
string | null
Example:

"Test geographical knowledge"

stoppingCriterias
string[]
Example:
["MAX_ITERATIONS", "GOAL_ACHIEVED"]
maxIterations
integer | null
Example:

10

isAugmented
boolean
Example:

false

reviewedById
string | null
Example:

"user_456"

userScore
integer | null
Example:

5

userScoreReason
string | null
Example:

"Accurate and complete"

creditsUsed
integer | null
Example:

1

sourceTestCaseId
string | null
createdAt
string<date-time>
deletedAt
string<date-time> | null