Runs API
Execute a run
POST /v1/runThe core endpoint — triggers an evaluation of your AI output against an eval suite.
Request body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
suite | string | Yes | — | Suite slug |
output | string | Yes | — | AI-generated output to evaluate |
input | object | No | {} | Input data for scorers |
trigger | string | No | "api" | Source: sdk, cli, github_action, dashboard, api |
trigger_meta | object | No | {} | Metadata (e.g., git SHA, PR number) |
async | boolean | No | false | Return immediately with pending run ID |
curl -X POST https://api.launchgate.ai/v1/run \
-H "Authorization: Bearer $LAUNCHGATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"suite": "rag-faithfulness",
"output": "The Eiffel Tower was built in 1889.",
"input": {
"context": "The Eiffel Tower was completed in 1889 for the World'\''s Fair.",
"query": "When was the Eiffel Tower built?"
}
}'Synchronous response 200 OK
{
"id": "run_abc123",
"status": "cleared",
"passed": true,
"total_cases": 3,
"passed_cases": 3,
"failed_cases": 0,
"pass_rate": 1.0,
"duration_ms": 842,
"scores": [
{
"case": "Contains source citation",
"passed": true,
"score": 1.0,
"threshold": 1.0,
"reason": "All required values found in output"
}
],
"failures": []
}Asynchronous response 202 Accepted
When async: true:
{
"id": "run_abc123",
"status": "pending",
"message": "Eval run enqueued. Poll GET /v1/runs/:runId for results."
}Each completed run counts as one usage unit against your plan’s monthly limit. See Billing & Usage.
Get run
GET /v1/runs/:runIdReturns the status and summary of a run. Use this to poll async runs.
Response
{
"data": {
"id": "run_abc123",
"suite_id": "uuid",
"status": "cleared",
"pass_rate": 1.0,
"total_cases": 3,
"passed_cases": 3,
"failed_cases": 0,
"duration_ms": 842,
"trigger": "sdk",
"trigger_meta": { "commitSha": "abc123" },
"created_at": "2026-04-07T12:00:00.000Z",
"completed_at": "2026-04-07T12:00:01.000Z"
}
}List runs for a suite
GET /v1/suites/:suiteId/runs?page=1&pageSize=20Returns paginated list of runs for a suite, ordered by most recent first.
Get run results
GET /v1/runs/:runId/resultsReturns detailed per-case results for a run.
Response
{
"data": [
{
"id": "uuid",
"run_id": "run_abc123",
"case_id": "uuid",
"case_name": "Contains source citation",
"passed": true,
"score": 1.0,
"threshold": 1.0,
"reason": "All required values found in output",
"scorer_output": {
"mode": "all",
"matches": [
{ "value": "source:", "found": true },
{ "value": "reference", "found": true }
],
"found_count": 2,
"total": 2
},
"duration_ms": 12
}
]
}scorer_output is scorer-specific debug data. Common shapes by type:
| Scorer | scorer_output fields |
|---|---|
exact_match | expected, actual, case_sensitive |
contains | mode, matches (per-value found/not-found), found_count, total |
regex | pattern, flags, should_match, matched, match_groups |
json_schema | valid, errors (on failure), parsed_output (on success) |
llm_judge | raw_response (full LLM API response) |
On scorer configuration errors (e.g. missing BYOK key) the field is { "error": "<error_code>" }.
Last updated on