Skip to main content
POST
/
v1
/
test-runs
/
single-turn
/
prompt
Trigger single-turn prompt test run
curl --request POST \
  --url https://api.getmaxim.ai/v1/test-runs/single-turn/prompt \
  --header 'Content-Type: application/json' \
  --header 'x-maxim-api-key: <api-key>' \
  --data '
{
  "workspaceId": "<string>",
  "datasetId": "<string>",
  "datasetSplitId": "<string>",
  "evaluators": [
    {
      "id": "<string>",
      "name": "<string>",
      "variableMapping": {}
    }
  ],
  "contextToEvaluate": [
    {
      "type": "DATASOURCE",
      "payload": "<string>"
    }
  ],
  "promptVersionId": "<string>",
  "promptVersionIds": [
    "<string>"
  ]
}
'
{
  "data": {
    "id": "<string>",
    "workspaceId": "<string>",
    "status": "<string>",
    "entityType": "<string>",
    "createdAt": "<string>",
    "entityId": "<string>"
  }
}

Authorizations

x-maxim-api-key
string
header
required

API key for authentication

Body

application/json

Payload for triggering a single-turn prompt test run or comparison run

workspaceId
string
required

Workspace ID where the test run will execute

datasetId
string
required

Dataset ID to use for the test run

datasetSplitId
string

Optional dataset split ID

evaluators
object[]

Array of evaluators with optional variable mapping to run on the test results.

contextToEvaluate
object[]

Context sources to include in evaluation

promptVersionId
string

Prompt version ID to run for single run

promptVersionIds
string[]

Prompt version IDs to run for comparison

Minimum array length: 2

Response

Single-turn prompt test run triggered successfully

data
object
required

Response from triggering a simulation