SOIT Docs
API Reference

Runs, Tasks, and Observe API

API surface for SOIT runtime state, task tracking, trace inspection, cost reconciliation, observe views, and ledger exports.

Runs, tasks, and observe APIs expose runtime state and execution evidence from the runtime ledger.

Prefixes

/api/v1/runs
/api/v1/tasks
/api/v1/observe
/api/v1/exports

Runs endpoints

MethodPathPurpose
GET/List runs with filters and pagination, including source and api_key_id
GET/{run_id}Run detail with steps, artifacts, costs
GET/{run_id}/evidenceThe run's evidence bundle as a deterministic zip; digest in X-SOIT-Evidence-SHA256
GET/{run_id}/streamLive run event stream
GET/trace/{trace_id}All runs for a trace
GET/steps, /steps/metricsRun steps and step metric summaries
GET/auditsGateway audit log entries
GET/costs/summary, /costs/by-day / by-subject / by-mode / by-provider / by-modelCost attribution rollups, filterable by source and api_key_id
GET/costs/entriesCost entries oldest first, paged with page_token and page_size (at most 500); until is inclusive. New in v1.6.0: the filters and row fields below
GET/costs/reconciliationNew in v1.6.0: the ledger's side of a bill check for the half-open window [since, until), with optional group_by
GET/exportExport run data

Cost reconciliation

New in v1.6.0. /costs/entries and /costs/reconciliation take the same filters. Workspace readers can call both, as they can the other /costs reads.

Query parameterFilters by
since, untilWhen the entry was written
run_idOne run
api_key_idThe run's API key
user_idThe run's member or service principal
sourceThe run's source, platform or gateway
model_ref, provider_slug, tool_refThe entry's model, provider, or tool
source_port, operationThe kernel port that recorded the entry (such as llm or tools) and its operation (such as chat, embed, or invoke)
currencyThe entry's currency
pricing_statuspriced, estimated, free, or unpriced
upstream_id, upstream_request_idThe provider's response id or request id

Each /costs/entries row adds its run's api_key_id, user_id, and run_source, its pricing_status, its unpriced_reason when unpriced, and the provider's upstream_id and upstream_request_id when the provider gave them.

/costs/reconciliation answers:

FieldMeaning
since, untilThe window, [since, until)
entry_count, status_countsEntries in the window, and per pricing status
amountsPriced total per currency, estimated amounts included; currencies are never added together
estimated_amountsThe part of amounts computed from estimated usage
unpriced_reasonsUnpriced entries per reason; they are never counted as zero
group_by, groups, groups_truncatedWith group_by (model, provider, tool, api_key, user, source, operation, or day), one row per value and currency with entry_count, amount, estimated_count, unpriced_count, and total_tokens; unpriced entries form a row of their own; at most 500 rows
external_reconciliationAlways not_performed: the provider's bill is not read

See Checking costs against a bill.

Tasks endpoints

MethodPathPurpose
GET/List tasks with pagination
GET/workbench, /workbench/itemsTask queue views for the UI
GET/{task_id} (+ /handling)Task detail and handling state
POST/{task_id}/cancel / /resume / /retryTask control

Observe endpoints

MethodPathPurpose
GET/dashboardWorkspace observe dashboard
POST / GET/approvals (+ /{approval_id})Open and list approval requests; filter by status, run_id, task_id
POST/approvals/{approval_id}/resolveDecide a request: approved, rejected, or canceled, with an optional note
POST/approvals/{approval_id}/delegateHand a pending request to another member who can decide
GET/approvals/{approval_id}/decisionsThe request's history: decisions, closings, and delegations
POST / GET/feedbackFeedback records
GET/runs/{run_id}/replayAssembled replay evidence for one run

Approvals

A request carries status (pending, approved, rejected, canceled, or expired), assignee_user_ids, assignee_roles, expires_at, and, for the caller, can_decide, can_cancel, and assigned_to_me, worked out by the rules the server enforces.

StatusWhen
403The caller may not decide, cancel, or delegate this request
409The request is already closed with a different decision, or is past its deadline

New in v1.7.0: assignees, deadlines, /delegate, /decisions, the expired status, and the per-caller fields. See Approvals.

Exports endpoints

MethodPathPurpose
GET/{kind}Stream one kind of ledger record (runs, steps, costs, audit, events) created in [since, until), with format=jsonl or csv

Notes

  • Cost rollups (by-subject, by-model, by-provider) power workspace cost attribution without external billing exports.
  • The replay endpoint returns the same assembled timeline the run detail page renders.
  • Evidence bundles and ledger exports (since v1.3.0) use the versioned ledger contract. Exports cover at most 92 days per request, take a workspace owner or admin, carry the contract version in X-SOIT-Ledger-Schema, and are written to the audit ledger as ledger.exported. See Evidence and Exports.
  • New in v1.6.0: the ledger contract is version 1.1, whose cost records may carry the optional upstream_id and upstream_request_id.
  • Since v1.5.0, each run on GET / and GET /{run_id} carries cost_amount and cost_currency: the sum of its priced cost entries in their currency, or null when nothing was priced or the entries span more than one currency.

On this page