API reference
Base URL https://app.spanview.dev. JSON in and out. Times are UTC ISO 8601.
Authentication
Authorization: Bearer sv_live_…
Send traces
POST/v1/traces
Standard OTLP/HTTP (protobuf or JSON). Your exporter calls it.
Upload spans
POST/api/v1/ingest/json
| Field | Type |
|---|---|
payload | object, required — OTLP JSON |
project | string, default default |
source | string, default json_upload |
Returns {"run_ids": [string]}
List runs
GET/api/v1/runs
Query: project, status, limit (default 50, max 500).
Returns Run[]
Get a run
GET/api/v1/runs/{run_id}
Get the verdict
GET/api/v1/runs/{run_id}/diagnosis
Re-evaluate
POST/api/v1/runs/{run_id}/evaluate
Returns 202 {"evaluation_id": string, "status": string}
Compare runs
POST/api/v1/compare
| Field | Type |
|---|---|
run_a | string, required |
run_b | string, required |
Returns Comparison. Fetch again with GET /api/v1/comparisons/{id}.
Health
GET/api/v1/health
Returns {"status": "ok"}. No auth.
Errors
JSON with a detail field.
400 | Bad request |
401 | Missing or invalid API key |
404 | Not found |
413 | Over 10 MB |
429 | Limit reached (see Retry-After) |
Schemas
Run
| Field | Type |
|---|---|
id | string |
project | string |
trace_id | string |
started_at | datetime |
ended_at | datetime | null |
status | ready · evaluating · evaluated |
source | string |
Span
| Field | Type |
|---|---|
span_id | string |
parent_span_id | string | null |
sequence | int — step number |
kind | string — LLM, TOOL, … |
name | string |
started_at | datetime |
ended_at | datetime |
latency_ms | int |
status | ok · error |
status_message | string | null |
token_count_in | int | null |
token_count_out | int | null |
cost_usd | float | null |
model | string | null |
attributes | object |
events | array |
Verdict
| Field | Type |
|---|---|
id | string |
severity | none · info · warn · error |
headline | string |
summary | string |
likely_causes | string[] |
flagged_span_ids | string[] |
Step note
| Field | Type |
|---|---|
id | string |
span_id | string |
severity | none · info · warn · error |
category | string |
observation | string |
evidence | object |
Comparison
| Field | Type |
|---|---|
id | string |
run_a_id | string |
run_b_id | string |
created_at | datetime |
alignment | [int | null, int | null][] — step pairs |
diffs | object[] — per pair: match · change · insert · delete |
narrative | string | null |