Skip to main content
POST
Generate dataset configuration from specifications

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
specificationIds
string[]
required

IDs of the specifications to generate dataset configs for

Minimum array length: 1
Example:
automaticCreation
boolean

When true, creates the datasets from the generated config and starts their test-case generation on the background worker.

Example:

false

maxTestCases
integer

How many test cases to generate per dataset. Defaults to 3. The upper limit is per test type and deployment-configured, and is enforced when the dataset is created (automaticCreation: true).

Required range: x > 0
Example:

30

groundTruthUri
string<uri>

Presigned upload URL of the knowledge base file, uploaded beforehand. Required for accuracy (QUALITY) specifications, ignored for the other test types.

dataCatalogUri
string<uri>

Presigned upload URL of the data catalog file, uploaded beforehand. Grounds the generated scenarios in real domain values instead of invented ones. Optional for behavior (SCENARIOS) specifications, ignored for the other test types. A call whose specifications are all accuracy or security drops the file and still succeeds.

languageCode
string

Language the generated test cases are written in, as a BCP-47 tag (es, es-ES) or a language name. The value is stored on the dataset as languageCode. Generated test text keeps the base language; the region subtag selects the regional variety in simulated user messages and voice synthesis. Optional. Omit it and the generator picks the language itself. The allowed set is the same for every test type, so one value covers every specification in the call.

Example:

"es-ES"

Response

Dataset configuration generated, and the datasets created when asked for

config
object[]
required

One generated dataset config per specification

tests
object[]

The created datasets, present only when automaticCreation was true. Each comes back PENDING, with its test-case generation running on the background worker.