Search documentation

Search the Fumadocs-backed documentation index.

Runs

HTTP API routes for runs.

RouteUseCLI equivalent
GET /runsList platform runs.ax run list --json
GET /runs/{id}View a run request or one run.ax run view --json
POST /runs/{id}/cancelCancel queued or in-flight work.ax run cancel
POST /runs/{id}/querySQL scoped to one run.ax run query
GET /runs/{id}/testsList 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,failed"
ParameterWhat it does
experiment_idScope to one experiment.
statusFilter by queued, waiting-for-ci, running, completed, failed, canceled (repeatable or comma-separated).
agent / model / product / environment / prompt / variantDimension filters (repeatable or comma-separated, e.g. ?agent=claude&agent=codex,cursor).
triggered_byRun-request creator ids.
sinceRFC 3339 floor on when the run's status last updated (status_updated_since is an alias).
version_scopeExperiment version scope (experiment_version is an alias).
limitMax 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..."

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 fieldWhat it does
runIdsCancel 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 tests"}' \
  "https://app.514.ax/api/v1/runs/claude%3A%3Abaseline%3A%3A01K.../query"
Body fieldWhat it does
sqlRequired. Read-only ClickHouse SELECT.
limitRow limit, up to 1,000 (0 uses the default of 100).
dryRunValidate without executing. Not with saveInsight.
saveInsightSave 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.

ParameterWhat it does
page_size / page_tokenPagination 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.