Runs
HTTP API routes for runs.
| Route | Use | CLI equivalent |
|---|---|---|
GET /runs | List platform runs. | ax run list --json |
GET /runs/{id} | View a run request or one run. | ax run view --json |
POST /runs/{id}/cancel | Cancel queued or in-flight work. | ax run cancel |
POST /runs/{id}/query | SQL scoped to one run. | ax run query |
GET /runs/{id}/tests | List captured tests. | ax run view --tests |
GET /runs/{id}/tests/{name} | Get one captured test. | ax run view --test <name> |
Two id shapes: a run request id covers one submission; a composite run
id (<variant_id>::<hash>) names one run inside it and must be
percent-encoded in paths (claude%3A%3Abaseline%3A%3A01K...). Every route
takes org_id (required only when the key can see several orgs); it is not
repeated below. Parameters are optional unless marked required.
GET /api/v1/runs
List platform runs, one row per run.
curl -H "Authorization: Bearer $AX_API_KEY" \
"https://app.514.ax/api/v1/runs?experiment_id=my-first-experiment&status=completed,errored"| Parameter | What it does |
|---|---|
experiment_id | Scope to one experiment. |
status | Filter by queued, waiting_for_ci, running, completed, errored, canceled (repeatable or comma-separated). failed is a deprecated alias for errored. Unrecognized values are ignored. |
agent / model / product / environment / prompt / variant | Dimension filters (repeatable or comma-separated, e.g. ?agent=claude&agent=codex,cursor). |
triggered_by | Run-request creator ids. |
since | RFC 3339 floor on when the run's status last updated (status_updated_since is an alias). |
version_scope | Experiment version scope (experiment_version is an alias). |
test_aware | true or false (default false). Keep only runs classified as "test aware": the agent noticed it was being tested, or changed its behavior because of it. Run lists themselves are never narrowed this way. |
run_request_id | Scope to the runs of one run request id. |
limit | Max runs to return. |
GET /api/v1/runs/{id}
View a run request roll-up, or one run in detail. Ids containing :: are
treated as composite run ids; anything else as a run request id.
# Request roll-up
curl -H "Authorization: Bearer $AX_API_KEY" \
"https://app.514.ax/api/v1/runs/01KTA..."
# One run
curl -H "Authorization: Bearer $AX_API_KEY" \
"https://app.514.ax/api/v1/runs/claude%3A%3Abaseline%3A%3A01K..."
# One run's dialogue and reasoning, up to 591 turns
curl -H "Authorization: Bearer $AX_API_KEY" \
"https://app.514.ax/api/v1/runs/claude%3A%3Abaseline%3A%3A01K...?transcript=true&include=reasoning&limit=591"| Parameter | What it does |
|---|---|
transcript | Set to true to include the current published conversation. Composite run ids only. |
include | Additional transcript kinds (repeatable or comma-separated). The supported value is reasoning; dialogue is included by default. Requires transcript=true. |
limit | Maximum transcript turns. Defaults to 500, minimum 1, maximum 10,000. Requires transcript=true. |
The transcript object contains ordered turns with seq, nullable ts,
role, kind, and text. include_reasoning, limit, truncated, shown,
total, and skipped_malformed describe completeness. An available empty
conversation has no turns and transcriptStatus: "available"; unpublished
conversation facts return transcriptStatus: "unavailable" without an empty
transcript.
A run that recorded a time budget carries timeLimit with budgetSeconds (the
budget that applied), planCapSeconds (your plan's cloud-run cap at dispatch,
0 when uncapped or unknown), and hit (whether the run ended because it ran
out of time). The field is absent for runs dispatched before time limits were
recorded, which is distinct from a zero budget.
guidance is an array, empty unless the run ran out of time. Each entry carries
kind, title, message, actionLabel, actionUrl, planKey, and
suggestedMaxTimeSeconds. Render title and message as written: they are
composed per organization and per caller, and actionLabel and actionUrl are
empty when the caller may not act on the suggestion. A request roll-up also
carries timedOutCount, planLimitedCount, and its own request-level
guidance. See Cloud run time
limits.
Transcript and test payloads cannot be combined. Use the test routes below for captured tests.
POST /api/v1/runs/{id}/cancel
Cancel queued or in-flight jobs behind a run request. Run request ids only; a
composite run id returns 400 invalid_argument.
curl -X POST -H "Authorization: Bearer $AX_API_KEY" \
"https://app.514.ax/api/v1/runs/01KTA.../cancel"| Body field | What it does |
|---|---|
runIds | Cancel only these run UUIDs (run_ids also accepted). An empty body cancels every non-terminal run in the request. |
POST /api/v1/runs/{id}/query
Run read-only SQL scoped to one composite run id (percent-encoded in the path). The path id and authenticated org always win over body scope fields.
curl -X POST \
-H "Authorization: Bearer $AX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sql":"SELECT test_name, exit_code FROM test_analysis"}' \
"https://app.514.ax/api/v1/runs/claude%3A%3Abaseline%3A%3A01K.../query"| Body field | What it does |
|---|---|
sql | Required. Read-only ClickHouse SELECT. |
limit | Row limit, up to 10,000 (0 uses the default of 100). |
dryRun | Validate without executing. Not with saveInsight. |
saveInsight | Save as an insight: {heading, slug?, description?, labels?, force?} (save is an alias). |
The response uses the same query envelope as
POST /api/v1/experiments/{id}/query.
GET /api/v1/runs/{id}/tests
List captured test executions for a run request (tests across all member runs) or one composite run id.
| Parameter | What it does |
|---|---|
page_size / page_token | Pagination controls. |
Each test includes runId, testName, exitCode, durationMs,
stdoutTail, and stderrTail; the response carries nextPageToken.
GET /api/v1/runs/{id}/tests/{name}
Fetch one captured test by composite run id and test name (both
percent-encoded). Composite-run-only, because a test name can occur in several
runs within one request. Missing tests return 404.