Skip to main content
POST
/
tests
/
batch
Create multiple tests
curl --request POST \
  --url https://api.galtea.ai/tests/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tests": [
    {
      "productId": "prod_123",
      "name": "Quality Test",
      "type": "QUALITY",
      "specificationId": "spec_123",
      "groundTruthUri": "https://example.com/ground-truth.csv",
      "uri": "https://example.com/test.csv",
      "fewShot": "Q: What is 2+2? A: 4",
      "languageCode": "en",
      "variants": [
        "rag"
      ],
      "customVariantDescription": "Custom test variant",
      "strategies": [
        "original"
      ],
      "customUserPersona": "Business analyst",
      "maxTestCases": 100,
      "models": [
        "gpt-4"
      ],
      "sourceTestId": "test_123",
      "dataCatalogUri": "https://example.com/data-catalog.json",
      "metadata": {
        "key": "value"
      }
    }
  ]
}
'
[
  {
    "id": "test_123",
    "productId": "prod_123",
    "userId": "user_123",
    "name": "Quality Test",
    "type": "QUALITY",
    "groundTruthUri": "https://example.com/ground-truth.csv",
    "uri": "https://example.com/test.csv",
    "error": "<string>",
    "status": "SUCCESS",
    "fewShot": "Example few-shot learning data",
    "languageCode": "en",
    "variants": [
      "rag",
      "summarization"
    ],
    "customVariantDescription": "Custom variant description",
    "strategies": [
      "original"
    ],
    "customUserPersona": "Business analyst",
    "maxTestCases": 100,
    "models": [
      "gpt-4",
      "claude-3"
    ],
    "sourceTestId": "<string>",
    "dataCatalogUri": "https://example.com/data-catalog.json",
    "metadata": {
      "key": "value"
    },
    "specificationId": "spec_123",
    "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
tests
object[]
required

Response

Tests created successfully

id
string
Example:

"test_123"

productId
string | null
Example:

"prod_123"

userId
string | null
Example:

"user_123"

name
string
Example:

"Quality Test"

type
enum<string>
Available options:
QUALITY,
RED_TEAMING,
SCENARIOS
Example:

"QUALITY"

groundTruthUri
string | null
Example:

"https://example.com/ground-truth.csv"

uri
string | null
Example:

"https://example.com/test.csv"

error
string | null
status
enum<string>
Available options:
PENDING,
SUCCESS,
FAILED,
AUGMENTING
Example:

"SUCCESS"

fewShot
string | null

Optional few-shot examples (input/output pairs) used to guide test-case generation for QUALITY tests.

Example:

"Example few-shot learning data"

languageCode
string | null
Example:

"en"

variants
string[]

Test variants. QUALITY: rag, entity_extraction, summarization, classification, translation, correction, other. RED_TEAMING: data_leakage, financial_attacks, illegal_activities, misuse, toxicity, custom.

Example:
["rag", "summarization"]
customVariantDescription
string | null
Example:

"Custom variant description"

strategies
string[]

Generation strategies. "original" is the default for RED_TEAMING. At least one strategy is required for SCENARIOS tests.

Example:
["original"]
customUserPersona
string | null
Example:

"Business analyst"

maxTestCases
integer | null
Example:

100

models
string[]
Example:
["gpt-4", "claude-3"]
sourceTestId
string | null
dataCatalogUri
string | null
Example:

"https://example.com/data-catalog.json"

metadata
object
Example:
{ "key": "value" }
specificationId
string | null
Example:

"spec_123"

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