{"openapi":"3.1.0","info":{"title":"x402 Observability API","version":"2.0.0","description":"Pay-per-call agent trace/session observability summary.","x-guidance":"POST /trace (free) to log an event, then GET /trace/{sessionId}/summary (paid) for a computed rollup: calls, tokens, cost, error count, slowest call. You are charged only when the session actually has events — an unknown or empty sessionId returns 404 and costs nothing.","x-payment-policy":"NEVER CHARGED FOR AN UNDELIVERABLE ANSWER. The x402 middleware cancels settlement for any response >= 400, so every error below moves $0.00 and emits no payment-response header. An all-zeros summary for a session with no events is returned as 404, never as a billed 200."},"paths":{"/trace/{sessionId}/summary":{"get":{"operationId":"traceSummary","summary":"Computed session trace summary","tags":["Observability"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Computed rollup over at least one stored trace event. The only response you are charged for."},"402":{"description":"Payment Required"},"404":{"description":"NOT CHARGED. `session_not_found` — no trace events are stored for this sessionId, so every metric would be zero. POST /trace (free) first. `retryable:false`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_not_found"]},"message":{"type":"string"},"charged":{"type":"boolean","enum":[false]},"retryable":{"type":"boolean","enum":[false]},"sessionId":{"type":"string"},"totalCalls":{"type":"integer","enum":[0]}}}}}},"405":{"description":"NOT CHARGED. Wrong HTTP verb for this resource; see the Allow header."},"503":{"description":"NOT CHARGED. `trace_store_unavailable` — the trace store could not be read. `retryable:true`."}}}}}}