{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Ailabra Agent Profit Ledger","version":"1.0.5","description":"Deterministic profit and cash-flow infrastructure for autonomous agents. Wallet balance is not profit. The service distinguishes revenue, expenses, refunds, transaction fees, owner capital, withdrawals, and internal transfers. Results are not audited statements, tax accounts, or financial advice.","x-ailabra-versions":{"serviceVersion":"1.0.5","gitCommit":"60a209b","buildTimestamp":"2026-07-29T11:44:29Z","calculationSchemaVersion":"2","calculationEngineVersion":"2.0.0","analysisVersion":"2.0.0","currentSignedReportSchemaVersion":"3","supportedSignedReportSchemaVersions":["1","2","3"],"economicEventSchemaVersion":"1","x402ProtocolVersion":2}},"servers":[{"url":"https://x402.ailabra.org"}],"tags":[{"name":"Discovery"},{"name":"Reports"},{"name":"x402"},{"name":"Workspaces"},{"name":"MCP"}],"paths":{"/":{"get":{"operationId":"getLanding","summary":"Get product landing information","description":"Content negotiation is deterministic: application/json returns the machine contract, text/html returns the browser landing page, text/markdown returns machine-readable prose, and a missing or */* Accept header defaults to HTML. Unsupported explicit media types return HTTP 406.","tags":["Discovery"],"responses":{"200":{"description":"Product landing representation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Landing"},"example":{"x402Enabled":true,"protocolVersion":2,"product":"synthetic","version":"synthetic","serviceVersion":"1.0.5","gitCommit":"synthetic","buildTimestamp":"2026-07-28T12:00:00Z","calculationSchemaVersion":"2","calculationEngineVersion":"2.0.0","analysisVersion":"2.0.0","currentSignedReportSchemaVersion":"3","supportedSignedReportSchemaVersions":["1","2","3"],"economicEventSchemaVersion":"1","x402ProtocolVersion":2,"runtimeEnvironment":"production","paymentMode":"mainnet","testnet":false,"network":"eip155:8453","assetSymbol":"USDC","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetDecimals":6,"eip712Name":"synthetic","eip712Version":"synthetic","problem":"Wallet balance is not profit.","usage":{"docs":"synthetic","pricing":"synthetic","sampleReport":"synthetic"}}},"text/html":{"schema":{"type":"string"},"example":"synthetic"},"text/markdown":{"schema":{"type":"string"},"example":"synthetic"}},"headers":{"Vary":{"description":"Representation selection varies by the Accept request header.","schema":{"type":"string","const":"Accept"}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"406":{"description":"Requested representation is unsupported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/health":{"get":{"operationId":"getHealth","summary":"Get service and database health","description":"Get service and database health. No payment or account is required.","tags":["Discovery"],"responses":{"200":{"description":"Get service and database health","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["status","service","version","serviceVersion","gitCommit","buildTimestamp","calculationSchemaVersion","calculationEngineVersion","analysisVersion","currentSignedReportSchemaVersion","supportedSignedReportSchemaVersions","economicEventSchemaVersion","x402ProtocolVersion","environment","runtimeEnvironment","paymentMode","testnet","network","assetSymbol","asset","assetDecimals","eip712Name","eip712Version","database","payments","timestamp"],"properties":{"status":{"type":"string"},"service":{"type":"string"},"version":{"const":"1.0.5","deprecated":true,"description":"Deprecated alias of serviceVersion; retained for compatibility."},"serviceVersion":{"const":"1.0.5"},"gitCommit":{"type":"string","minLength":1},"buildTimestamp":{"type":"string","format":"date-time"},"calculationSchemaVersion":{"const":"2"},"calculationEngineVersion":{"const":"2.0.0"},"analysisVersion":{"const":"2.0.0"},"currentSignedReportSchemaVersion":{"const":"3"},"supportedSignedReportSchemaVersions":{"type":"array","const":["1","2","3"]},"economicEventSchemaVersion":{"const":"1"},"x402ProtocolVersion":{"const":2},"environment":{"type":"string"},"runtimeEnvironment":{"type":"string","enum":["development","test","production"]},"paymentMode":{"type":"string","enum":["testnet","mainnet"]},"testnet":{"type":"boolean"},"network":{"type":"string"},"assetSymbol":{"const":"USDC"},"asset":{"type":"string"},"assetDecimals":{"type":"integer","const":6},"eip712Name":{"type":"string","minLength":1},"eip712Version":{"type":"string","minLength":1},"database":{"type":"string"},"payments":{"type":"object","additionalProperties":false,"required":["status","network","chainId","assetSymbol","assetAddress","assetDecimals","eip712DomainVerified","eip712Name","eip712Version","contractDomainSeparator","derivedDomainSeparator","facilitatorSupported","checkedAt"],"properties":{"status":{"const":"ok"},"network":{"type":"string"},"chainId":{"type":"integer"},"assetSymbol":{"const":"USDC"},"assetAddress":{"type":"string"},"assetDecimals":{"type":"integer"},"eip712DomainVerified":{"const":true},"eip712Name":{"type":"string"},"eip712Version":{"type":"string"},"contractDomainSeparator":{"type":"string"},"derivedDomainSeparator":{"type":"string"},"facilitatorSupported":{"const":true},"checkedAt":{"type":"string"}}},"timestamp":{"type":"string","format":"date-time"}}},"example":{"status":"synthetic","service":"synthetic","version":"1.0.5","serviceVersion":"1.0.5","gitCommit":"synthetic","buildTimestamp":"2026-07-28T12:00:00Z","calculationSchemaVersion":"2","calculationEngineVersion":"2.0.0","analysisVersion":"2.0.0","currentSignedReportSchemaVersion":"3","supportedSignedReportSchemaVersions":["1","2","3"],"economicEventSchemaVersion":"1","x402ProtocolVersion":2,"environment":"synthetic","runtimeEnvironment":"production","paymentMode":"mainnet","testnet":false,"network":"eip155:8453","assetSymbol":"USDC","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetDecimals":6,"eip712Name":"synthetic","eip712Version":"synthetic","database":"synthetic","payments":{"status":"ok","network":"synthetic","chainId":0,"assetSymbol":"USDC","assetAddress":"synthetic","assetDecimals":0,"eip712DomainVerified":true,"eip712Name":"synthetic","eip712Version":"synthetic","contractDomainSeparator":"synthetic","derivedDomainSeparator":"synthetic","facilitatorSupported":true,"checkedAt":"synthetic"},"timestamp":"2026-07-28T12:00:00Z"}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/capabilities":{"get":{"operationId":"getCapabilities","summary":"Get machine-readable capabilities","description":"Get machine-readable capabilities. No payment or account is required.","tags":["Discovery"],"responses":{"200":{"description":"Get machine-readable capabilities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Capabilities"},"example":{"product":"synthetic","version":"1.0.5","serviceVersion":"1.0.5","gitCommit":"synthetic","buildTimestamp":"2026-07-28T12:00:00Z","calculationSchemaVersion":"2","calculationEngineVersion":"2.0.0","analysisVersion":"2.0.0","currentSignedReportSchemaVersion":"3","supportedSignedReportSchemaVersions":["1","2","3"],"economicEventSchemaVersion":"1","x402ProtocolVersion":2,"runtimeEnvironment":"production","paymentMode":"mainnet","testnet":false,"network":"eip155:8453","assetSymbol":"USDC","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetDecimals":6,"eip712Name":"synthetic","eip712Version":"synthetic","protocols":{},"operations":[],"currencies":{"modeWithoutRates":"separate_totals","explicitCallerRates":true},"evidenceLevels":[],"custody":false}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/pricing":{"get":{"operationId":"getPricing","summary":"Get configured USDC prices, quotas, and retention","description":"Get configured USDC prices, quotas, and retention. No payment or account is required.","tags":["Discovery"],"responses":{"200":{"description":"Get configured USDC prices, quotas, and retention","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["serviceVersion","gitCommit","buildTimestamp","calculationSchemaVersion","calculationEngineVersion","analysisVersion","currentSignedReportSchemaVersion","supportedSignedReportSchemaVersions","economicEventSchemaVersion","x402ProtocolVersion","runtimeEnvironment","paymentMode","testnet","network","assetSymbol","asset","assetDecimals","eip712Name","eip712Version","operations"],"properties":{"serviceVersion":{"const":"1.0.5"},"gitCommit":{"type":"string","minLength":1},"buildTimestamp":{"type":"string","format":"date-time"},"calculationSchemaVersion":{"const":"2"},"calculationEngineVersion":{"const":"2.0.0"},"analysisVersion":{"const":"2.0.0"},"currentSignedReportSchemaVersion":{"const":"3"},"supportedSignedReportSchemaVersions":{"type":"array","const":["1","2","3"]},"economicEventSchemaVersion":{"const":"1"},"x402ProtocolVersion":{"const":2},"runtimeEnvironment":{"type":"string","enum":["development","test","production"]},"paymentMode":{"type":"string","enum":["testnet","mainnet"]},"testnet":{"type":"boolean"},"network":{"type":"string"},"assetSymbol":{"const":"USDC"},"asset":{"type":"string"},"assetDecimals":{"type":"integer","const":6},"eip712Name":{"type":"string","minLength":1},"eip712Version":{"type":"string","minLength":1},"operations":{"type":"object","additionalProperties":{"type":"object","additionalProperties":false,"required":["price"],"properties":{"price":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]+)? USDC$"},"retention":{"type":"string"},"maxEvents":{"type":"integer"},"retentionDays":{"type":"integer"},"eventLimit":{"type":"integer"},"calculationLimit":{"type":"integer"},"addsRetentionDays":{"type":"integer"},"addsEvents":{"type":"integer"}}}}}},"example":{"serviceVersion":"1.0.5","gitCommit":"synthetic","buildTimestamp":"2026-07-28T12:00:00Z","calculationSchemaVersion":"2","calculationEngineVersion":"2.0.0","analysisVersion":"2.0.0","currentSignedReportSchemaVersion":"3","supportedSignedReportSchemaVersions":["1","2","3"],"economicEventSchemaVersion":"1","x402ProtocolVersion":2,"runtimeEnvironment":"production","paymentMode":"mainnet","testnet":false,"network":"eip155:8453","assetSymbol":"USDC","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetDecimals":6,"eip712Name":"synthetic","eip712Version":"synthetic","operations":{}}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/examples":{"get":{"operationId":"getExamples","summary":"Get executable synthetic integration examples","description":"Get executable synthetic integration examples. No payment or account is required.","tags":["Discovery"],"responses":{"200":{"description":"Get executable synthetic integration examples","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["synthetic","serviceVersion","gitCommit","buildTimestamp","calculationSchemaVersion","calculationEngineVersion","analysisVersion","currentSignedReportSchemaVersion","supportedSignedReportSchemaVersions","economicEventSchemaVersion","x402ProtocolVersion","runtimeEnvironment","paymentMode","testnet","network","assetSymbol","asset","assetDecimals","eip712Name","eip712Version","warning","minimal","realisticAutonomousAgent"],"properties":{"synthetic":{"const":true},"serviceVersion":{"const":"1.0.5"},"gitCommit":{"type":"string","minLength":1},"buildTimestamp":{"type":"string","format":"date-time"},"calculationSchemaVersion":{"const":"2"},"calculationEngineVersion":{"const":"2.0.0"},"analysisVersion":{"const":"2.0.0"},"currentSignedReportSchemaVersion":{"const":"3"},"supportedSignedReportSchemaVersions":{"type":"array","const":["1","2","3"]},"economicEventSchemaVersion":{"const":"1"},"x402ProtocolVersion":{"const":2},"runtimeEnvironment":{"type":"string","enum":["development","test","production"]},"paymentMode":{"type":"string","enum":["testnet","mainnet"]},"testnet":{"type":"boolean"},"network":{"type":"string"},"assetSymbol":{"const":"USDC"},"asset":{"type":"string"},"assetDecimals":{"type":"integer","const":6},"eip712Name":{"type":"string","minLength":1},"eip712Version":{"type":"string","minLength":1},"warning":{"type":"string"},"minimal":{"type":"object","additionalProperties":true},"realisticAutonomousAgent":{"type":"object","additionalProperties":true}}},"example":{"synthetic":true,"serviceVersion":"1.0.5","gitCommit":"synthetic","buildTimestamp":"2026-07-28T12:00:00Z","calculationSchemaVersion":"2","calculationEngineVersion":"2.0.0","analysisVersion":"2.0.0","currentSignedReportSchemaVersion":"3","supportedSignedReportSchemaVersions":["1","2","3"],"economicEventSchemaVersion":"1","x402ProtocolVersion":2,"runtimeEnvironment":"production","paymentMode":"mainnet","testnet":false,"network":"eip155:8453","assetSymbol":"USDC","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetDecimals":6,"eip712Name":"synthetic","eip712Version":"synthetic","warning":"synthetic","minimal":{},"realisticAutonomousAgent":{}}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/schemas/economic-event":{"get":{"operationId":"getEconomicEventSchema","summary":"Get economic-event JSON Schema","description":"Returns the current application/schema+json contract. source.name identifies the originating ledger or integration and participates in duplicate detection with externalId. No payment or account is required.","tags":["Discovery"],"responses":{"200":{"description":"Current economic-event JSON Schema.","content":{"application/schema+json":{"schema":{"type":"object","additionalProperties":false,"required":["$schema","$id","title","type","required","properties"],"properties":{"$schema":{"type":"string","format":"uri"},"$id":{"type":"string","format":"uri"},"title":{"type":"string"},"type":{"const":"object"},"additionalProperties":{"type":"boolean"},"required":{"type":"array","items":{"type":"string"}},"properties":{"type":"object","additionalProperties":true}}},"example":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://x402.ailabra.org/api/v1/schemas/economic-event","title":"Ailabra Economic Event v1","type":"object","additionalProperties":false,"required":["schemaVersion","externalId","occurredAt","kind","direction","amount","currency","category","source"],"properties":{"schemaVersion":{"const":"1"},"externalId":{"type":"string","minLength":1,"maxLength":160},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["revenue","expense","refund","fee","transfer","capital","withdrawal","asset_purchase","asset_sale","adjustment"]},"direction":{"type":"string","enum":["inflow","outflow"]},"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"},"currency":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"category":{"type":"string","minLength":1,"maxLength":120},"source":{"type":"object","additionalProperties":false,"required":["name","type","verification"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Identifies the originating ledger or integration and participates in duplicate detection with externalId."},"type":{"type":"string"},"verification":{"type":"string","enum":["self_reported","receipt_supplied","receipt_verified","onchain_verified","system_observed"]},"reference":{"type":"string"}}},"agentId":{"type":"string"},"ventureId":{"type":"string"},"experimentId":{"type":"string"},"customerId":{"type":"string"},"productId":{"type":"string"},"relatedEventId":{"type":"string"},"transactionHash":{"type":"string"},"x402PaymentId":{"type":"string"},"assetPolicy":{"type":"string","enum":["expense","exclude"]},"adjustment":{"type":"object","required":["reason","profitTreatment"],"properties":{"reason":{"type":"string"},"profitTreatment":{"type":"string","enum":["revenue","cost","exclude"]}}},"metadata":{"type":"object"}}}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/sample-report":{"get":{"operationId":"getSampleReport","summary":"Get clearly labelled synthetic signed report","description":"Content negotiation is deterministic: application/json returns the complete signed sample, text/html returns a report viewer, text/markdown returns a concise verification summary, and a missing or */* Accept header defaults to HTML. Unsupported explicit media types return HTTP 406.","tags":["Reports"],"responses":{"200":{"description":"Synthetic sample report representation","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["synthetic","warning","calculation","signedReport","verificationEndpoint"],"properties":{"synthetic":{"const":true},"warning":{"type":"string"},"calculation":{"$ref":"#/components/schemas/CalculationResult"},"signedReport":{"$ref":"#/components/schemas/CurrentSignedReportSchema3"},"verificationEndpoint":{"type":"string"}}},"example":{"synthetic":true,"warning":"synthetic","calculation":{"schemaVersion":"2","calculationEngineVersion":"2.0.0","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"currentCashBalances":{},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByCategory":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"customerEconomics":{},"ventureEconomics":{},"experimentEconomics":{},"unattributedCosts":{}},"burnRateByCurrency":{},"runwayByCurrency":{},"dataCoverage":{"revenueByEvidencePercent":{},"expensesByEvidencePercent":{},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}},"signedReport":{"schemaVersion":"3","calculationVersion":"2.0.0","reportId":"rpt_synthetic","reportTimestamp":"2026-07-28T12:00:00Z","workspaceId":"synthetic","coveredPeriod":{},"calculation":{"schemaVersion":"2","calculationEngineVersion":"2.0.0","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"currentCashBalances":{},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByCategory":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"customerEconomics":{},"ventureEconomics":{},"experimentEconomics":{},"unattributedCosts":{}},"burnRateByCurrency":{},"runwayByCurrency":{},"dataCoverage":{"revenueByEvidencePercent":{},"expensesByEvidencePercent":{},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}},"evidenceStatement":"synthetic","publicKeyId":"synthetic","resultHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","signature":"synthetic","signatureAlgorithm":"Ed25519","visibility":"private"},"verificationEndpoint":"synthetic"}},"text/html":{"schema":{"type":"string"},"example":"synthetic"},"text/markdown":{"schema":{"type":"string"},"example":"synthetic"}},"headers":{"Vary":{"description":"Representation selection varies by the Accept request header.","schema":{"type":"string","const":"Accept"}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"406":{"description":"Requested representation is unsupported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/signing-keys":{"get":{"operationId":"listSigningKeys","summary":"List report verification public keys","description":"List report verification public keys. No payment or account is required.","tags":["Reports"],"responses":{"200":{"description":"List report verification public keys","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["keys"],"properties":{"keys":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","algorithm","publicKeyPem","active"],"properties":{"id":{"type":"string"},"algorithm":{"const":"Ed25519"},"publicKeyPem":{"type":"string"},"active":{"type":"boolean"}}}}}},"example":{"keys":[]}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/reports/verify":{"post":{"operationId":"verifyReport","summary":"Verify a signed report","description":"Verifies historical signed-report schemas 1 and 2 and current signed-report schema 3. Cryptographically verifies the SHA-256 result hash and Ed25519 signature; input is not persisted. New attestations emit schema 3 only.","tags":["Reports"],"responses":{"200":{"description":"Verification result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportVerificationResult"},"example":{"valid":false,"reportSchemaVersion":"synthetic","publicKeyId":"synthetic"}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportVerificationRequest"},"example":{"schemaVersion":"3","calculationVersion":"2.0.0","reportId":"rpt_synthetic","reportTimestamp":"2026-07-28T12:00:00Z","workspaceId":"synthetic","coveredPeriod":{},"calculation":{"schemaVersion":"2","calculationEngineVersion":"2.0.0","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"currentCashBalances":{},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByCategory":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"customerEconomics":{},"ventureEconomics":{},"experimentEconomics":{},"unattributedCosts":{}},"burnRateByCurrency":{},"runwayByCurrency":{},"dataCoverage":{"revenueByEvidencePercent":{},"expensesByEvidencePercent":{},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}},"evidenceStatement":"synthetic","publicKeyId":"synthetic","resultHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","signature":"synthetic","signatureAlgorithm":"Ed25519","visibility":"private"},"examples":{"currentSchema3":{"summary":"Current signed-report schema 3 (default for new attestations)","value":{"schemaVersion":"3","calculationVersion":"2.0.0","reportId":"rpt_synthetic","reportTimestamp":"2026-07-28T12:00:00Z","workspaceId":"synthetic","coveredPeriod":{},"calculation":{"schemaVersion":"2","calculationEngineVersion":"2.0.0","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"currentCashBalances":{},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByCategory":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"customerEconomics":{},"ventureEconomics":{},"experimentEconomics":{},"unattributedCosts":{}},"burnRateByCurrency":{},"runwayByCurrency":{},"dataCoverage":{"revenueByEvidencePercent":{},"expensesByEvidencePercent":{},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}},"evidenceStatement":"synthetic","publicKeyId":"synthetic","resultHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","signature":"synthetic","signatureAlgorithm":"Ed25519","visibility":"private"}},"historicalSchema1":{"summary":"Historical signed-report schema 1","value":{"schemaVersion":"1","calculationVersion":"synthetic","reportId":"rpt_synthetic","reportTimestamp":"2026-07-28T12:00:00Z","workspaceId":"synthetic","coveredPeriod":{},"calculation":{"schemaVersion":"1","calculationEngineVersion":"synthetic","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"experimentReturnOnSpend":{}},"burnRate":{"value":"1","status":"available"},"runway":{"value":"1","status":"available"},"dataCoverage":{"revenueByEvidencePercent":{"self_reported":"1","receipt_supplied":"1","receipt_verified":"1","onchain_verified":"1","system_observed":"1"},"expensesByEvidencePercent":{"self_reported":"1","receipt_supplied":"1","receipt_verified":"1","onchain_verified":"1","system_observed":"1"},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}},"evidenceStatement":"synthetic","publicKeyId":"synthetic","resultHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","signature":"synthetic","signatureAlgorithm":"Ed25519","visibility":"private"}},"historicalSchema2":{"summary":"Historical signed-report schema 2","value":{"schemaVersion":"2","calculationVersion":"synthetic","reportId":"rpt_synthetic","reportTimestamp":"2026-07-28T12:00:00Z","workspaceId":"synthetic","coveredPeriod":{},"calculation":{"schemaVersion":"1","calculationEngineVersion":"synthetic","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"experimentReturnOnSpend":{}},"burnRate":{"value":"1","status":"available"},"runway":{"value":"1","status":"available"},"dataCoverage":{"revenueByEvidencePercent":{"self_reported":"1","receipt_supplied":"1","receipt_verified":"1","onchain_verified":"1","system_observed":"1"},"expensesByEvidencePercent":{"self_reported":"1","receipt_supplied":"1","receipt_verified":"1","onchain_verified":"1","system_observed":"1"},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}},"evidenceStatement":"synthetic","publicKeyId":"synthetic","resultHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","signature":"synthetic","signatureAlgorithm":"Ed25519","visibility":"private"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Retries require normal x402 replay protection; business idempotency is stated in the operation description."}},"/api/v1/payment-info":{"get":{"operationId":"getPaymentInfo","summary":"Get non-secret payment configuration","description":"Get non-secret payment configuration. No payment or account is required.","tags":["Discovery"],"responses":{"200":{"description":"Get non-secret payment configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentInfo"},"example":{"serviceVersion":"1.0.5","gitCommit":"synthetic","buildTimestamp":"2026-07-28T12:00:00Z","calculationSchemaVersion":"2","calculationEngineVersion":"2.0.0","analysisVersion":"2.0.0","currentSignedReportSchemaVersion":"3","supportedSignedReportSchemaVersions":["1","2","3"],"economicEventSchemaVersion":"1","x402ProtocolVersion":2,"protocolVersion":2,"runtimeEnvironment":"production","paymentMode":"mainnet","testnet":false,"network":"eip155:8453","assetSymbol":"USDC","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetDecimals":6,"eip712Name":"synthetic","eip712Version":"synthetic","prices":{},"price":"synthetic","facilitatorType":"synthetic","paidResourceUrl":"https://x402.ailabra.org/synthetic","payTo":"synthetic"}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/paid/hello":{"get":{"operationId":"getPaidHello","summary":"Call compatibility payment endpoint","description":"Returns a compatibility greeting after settlement. An unpaid request returns HTTP 402 with x402 v2 requirements. A compatible client authorizes the payment and retries the normal application request; the protected response is returned only after verification and settlement. Price: 0.01 USDC on eip155:8453, paid in native USDC.","tags":["x402"],"responses":{"200":{"description":"Paid greeting","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","message","service","network","requestId","timestamp"],"properties":{"success":{"const":true},"message":{"type":"string"},"service":{"type":"string"},"network":{"type":"string"},"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"example":{"success":true,"message":"synthetic","service":"synthetic","network":"synthetic","requestId":"synthetic","timestamp":"2026-07-28T12:00:00Z"}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"402":{"description":"x402 v2 payment required. The PAYMENT-REQUIRED header contains the base64-encoded PaymentRequired payload; the body may be an empty JSON object.","headers":{"PAYMENT-REQUIRED":{"required":true,"description":"Base64-encoded x402 v2 PaymentRequired JSON.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"maxProperties":0},"example":{}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-x402":{"price":"0.01 USDC","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","eip712Name":"USD Coin","eip712Version":"2"},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/x402/profit/calculate":{"post":{"operationId":"calculateProfit","summary":"Calculate deterministic profit and cash flow","description":"Raw stateless events are not retained. Duplicate scope is source.name + externalId within the request. An unpaid request returns HTTP 402 with x402 v2 requirements. A compatible client authorizes the payment and retries the normal application request; the protected response is returned only after verification and settlement. Price: 0.01 USDC on eip155:8453, paid in native USDC.","tags":["x402"],"responses":{"200":{"description":"Payment settled and operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculationResult"},"example":{"schemaVersion":"2","calculationEngineVersion":"2.0.0","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"currentCashBalances":{},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByCategory":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"customerEconomics":{},"ventureEconomics":{},"experimentEconomics":{},"unattributedCosts":{}},"burnRateByCurrency":{},"runwayByCurrency":{},"dataCoverage":{"revenueByEvidencePercent":{},"expensesByEvidencePercent":{},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"402":{"description":"x402 v2 payment required. The PAYMENT-REQUIRED header contains the base64-encoded PaymentRequired payload; the body may be an empty JSON object.","headers":{"PAYMENT-REQUIRED":{"required":true,"description":"Base64-encoded x402 v2 PaymentRequired JSON.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"maxProperties":0},"example":{}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculationRequest"},"example":{"events":[{"schemaVersion":"1","externalId":"invoice_123","occurredAt":"2026-07-28T12:00:00Z","kind":"revenue","direction":"inflow","amount":"12.50","currency":"USDC","agentId":"agent_sales_1","ventureId":"venture_directory","experimentId":"experiment_reddit_1","customerId":"customer_42","category":"customer_revenue","source":{"name":"synthetic_x402_import","type":"x402_receipt","verification":"receipt_verified","reference":"safe-reference"},"metadata":{"product":"report"}}]}}}},"x-x402":{"protocolVersion":2,"price":"0.01 USDC","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","eip712Name":"USD Coin","eip712Version":"2"},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Retries require normal x402 replay protection; business idempotency is stated in the operation description."}},"/api/v1/x402/profit/analyze":{"post":{"operationId":"analyzeProfit","summary":"Analyze operational profitability","description":"Returns deterministic findings without an LLM or investment recommendations. Raw events are not retained. An unpaid request returns HTTP 402 with x402 v2 requirements. A compatible client authorizes the payment and retries the normal application request; the protected response is returned only after verification and settlement. Price: 0.05 USDC on eip155:8453, paid in native USDC.","tags":["x402"],"responses":{"200":{"description":"Payment settled and operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisResult"},"example":{"schemaVersion":"2","calculationEngineVersion":"2.0.0","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"currentCashBalances":{},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByCategory":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"customerEconomics":{},"ventureEconomics":{},"experimentEconomics":{},"unattributedCosts":{}},"burnRateByCurrency":{},"runwayByCurrency":{},"dataCoverage":{"revenueByEvidencePercent":{},"expensesByEvidencePercent":{},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{},"analysisVersion":"2.0.0","analysisByCurrency":{},"findings":[],"disclaimer":"synthetic"}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"402":{"description":"x402 v2 payment required. The PAYMENT-REQUIRED header contains the base64-encoded PaymentRequired payload; the body may be an empty JSON object.","headers":{"PAYMENT-REQUIRED":{"required":true,"description":"Base64-encoded x402 v2 PaymentRequired JSON.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"maxProperties":0},"example":{}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculationRequest"},"example":{"events":[{"schemaVersion":"1","externalId":"invoice_123","occurredAt":"2026-07-28T12:00:00Z","kind":"revenue","direction":"inflow","amount":"12.50","currency":"USDC","agentId":"agent_sales_1","ventureId":"venture_directory","experimentId":"experiment_reddit_1","customerId":"customer_42","category":"customer_revenue","source":{"name":"synthetic_x402_import","type":"x402_receipt","verification":"receipt_verified","reference":"safe-reference"},"metadata":{"product":"report"}}]}}}},"x-x402":{"protocolVersion":2,"price":"0.05 USDC","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","eip712Name":"USD Coin","eip712Version":"2"},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Retries require normal x402 replay protection; business idempotency is stated in the operation description."}},"/api/v1/x402/profit/attest":{"post":{"operationId":"attestProfit","summary":"Create signed operational report","description":"Persists the signed report, but not raw stateless events. Result is signed and is not an independent audit. An unpaid request returns HTTP 402 with x402 v2 requirements. A compatible client authorizes the payment and retries the normal application request; the protected response is returned only after verification and settlement. Price: 0.25 USDC on eip155:8453, paid in native USDC.","tags":["x402"],"responses":{"200":{"description":"Payment settled and operation completed.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["report","reportUrl","jsonUrl","evidenceManifest"],"properties":{"report":{"$ref":"#/components/schemas/CurrentSignedReportSchema3"},"reportUrl":{"type":"string","format":"uri"},"jsonUrl":{"type":"string","format":"uri"},"evidenceManifest":{"type":"object","additionalProperties":false,"required":["resultHash","eventCount"],"properties":{"resultHash":{"type":"string"},"eventCount":{"type":"integer"}}}}},"example":{"report":{"schemaVersion":"3","calculationVersion":"2.0.0","reportId":"rpt_synthetic","reportTimestamp":"2026-07-28T12:00:00Z","workspaceId":"synthetic","coveredPeriod":{},"calculation":{"schemaVersion":"2","calculationEngineVersion":"2.0.0","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"currentCashBalances":{},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByCategory":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"customerEconomics":{},"ventureEconomics":{},"experimentEconomics":{},"unattributedCosts":{}},"burnRateByCurrency":{},"runwayByCurrency":{},"dataCoverage":{"revenueByEvidencePercent":{},"expensesByEvidencePercent":{},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}},"evidenceStatement":"synthetic","publicKeyId":"synthetic","resultHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","signature":"synthetic","signatureAlgorithm":"Ed25519","visibility":"private"},"reportUrl":"https://x402.ailabra.org/synthetic","jsonUrl":"https://x402.ailabra.org/synthetic","evidenceManifest":{"resultHash":"synthetic","eventCount":0}}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"402":{"description":"x402 v2 payment required. The PAYMENT-REQUIRED header contains the base64-encoded PaymentRequired payload; the body may be an empty JSON object.","headers":{"PAYMENT-REQUIRED":{"required":true,"description":"Base64-encoded x402 v2 PaymentRequired JSON.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"maxProperties":0},"example":{}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestationRequest"},"example":{"events":[{"schemaVersion":"1","externalId":"invoice_123","occurredAt":"2026-07-28T12:00:00Z","kind":"revenue","direction":"inflow","amount":"12.50","currency":"USDC","agentId":"agent_sales_1","ventureId":"venture_directory","experimentId":"experiment_reddit_1","customerId":"customer_42","category":"customer_revenue","source":{"name":"synthetic_x402_import","type":"x402_receipt","verification":"receipt_verified","reference":"safe-reference"},"metadata":{"product":"report"}}]}}}},"x-x402":{"protocolVersion":2,"price":"0.25 USDC","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","eip712Name":"USD Coin","eip712Version":"2"},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Retries require normal x402 replay protection; business idempotency is stated in the operation description."}},"/api/v1/x402/workspaces":{"post":{"operationId":"createWorkspace","summary":"Create capability-scoped workspace","description":"Persists workspace events for 30 days. Capability tokens are returned once and only hashes are stored. An unpaid request returns HTTP 402 with x402 v2 requirements. A compatible client authorizes the payment and retries the normal application request; the protected response is returned only after verification and settlement. Price: 0.25 USDC on eip155:8453, paid in native USDC.","tags":["x402"],"responses":{"201":{"description":"Payment settled and operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreationResult"},"example":{"workspaceId":"ws_synthetic","tokens":{"admin":"synthetic","write":"synthetic","read":"synthetic"},"quota":{"retentionDays":0,"eventLimit":0,"calculationLimit":0,"reportsIncluded":0},"expiresAt":"2026-07-28T12:00:00Z","documentation":"https://x402.ailabra.org/synthetic","warning":"synthetic"}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"402":{"description":"x402 v2 payment required. The PAYMENT-REQUIRED header contains the base64-encoded PaymentRequired payload; the body may be an empty JSON object.","headers":{"PAYMENT-REQUIRED":{"required":true,"description":"Base64-encoded x402 v2 PaymentRequired JSON.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"maxProperties":0},"example":{}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreationRequest"},"example":{}}}},"x-x402":{"protocolVersion":2,"price":"0.25 USDC","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","eip712Name":"USD Coin","eip712Version":"2"},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Retries require normal x402 replay protection; business idempotency is stated in the operation description."}},"/api/v1/x402/workspaces/{workspaceId}/extend":{"post":{"operationId":"extendWorkspace","summary":"Extend workspace quota and retention","description":"Requires admin capability. Extension is persisted and idempotent payment replay is rejected. An unpaid request returns HTTP 402 with x402 v2 requirements. A compatible client authorizes the payment and retries the normal application request; the protected response is returned only after verification and settlement. Price: 0.10 USDC on eip155:8453, paid in native USDC.","tags":["x402"],"responses":{"200":{"description":"Payment settled and operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceExtensionResult"},"example":{"extended":false,"addedRetentionDays":0,"addedEvents":0}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"402":{"description":"x402 v2 payment required. The PAYMENT-REQUIRED header contains the base64-encoded PaymentRequired payload; the body may be an empty JSON object.","headers":{"PAYMENT-REQUIRED":{"required":true,"description":"Base64-encoded x402 v2 PaymentRequired JSON.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"maxProperties":0},"example":{}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceExtensionRequest"},"example":{}}}},"x-x402":{"protocolVersion":2,"price":"0.10 USDC","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","eip712Name":"USD Coin","eip712Version":"2"},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."}],"security":[{"capabilityBearer":[]}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Retries require normal x402 replay protection; business idempotency is stated in the operation description."}},"/api/v1/workspaces/{workspaceId}/events":{"post":{"operationId":"recordWorkspaceEvent","summary":"Record one economic event","description":"Requires write or admin capability. Idempotency scope is workspace + source.name + externalId. Duplicates are returned as duplicates and not inserted.","tags":["Workspaces"],"responses":{"201":{"description":"Event recorded or identified as duplicate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventWriteResult"},"example":{"inserted":0,"duplicates":0,"total":0}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."}],"security":[{"capabilityBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EconomicEvent"},"example":{"schemaVersion":"1","externalId":"invoice_123","occurredAt":"2026-07-28T12:00:00Z","kind":"revenue","direction":"inflow","amount":"12.50","currency":"USDC","agentId":"agent_sales_1","ventureId":"venture_directory","experimentId":"experiment_reddit_1","customerId":"customer_42","category":"customer_revenue","source":{"name":"synthetic_x402_import","type":"x402_receipt","verification":"receipt_verified","reference":"safe-reference"},"metadata":{"product":"report"}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Retries require normal x402 replay protection; business idempotency is stated in the operation description."},"get":{"operationId":"listWorkspaceEvents","summary":"List workspace events","description":"Requires read or admin capability. Supports cursor pagination and filters; events persist until expiry or deletion.","tags":["Workspaces"],"responses":{"200":{"description":"Event page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedEventResponse"},"example":{"events":[],"nextCursor":"synthetic"}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"agentId","in":"query","required":false,"schema":{"type":"string"}},{"name":"ventureId","in":"query","required":false,"schema":{"type":"string"}},{"name":"experimentId","in":"query","required":false,"schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":250,"default":100}}],"security":[{"capabilityBearer":[]}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/workspaces/{workspaceId}/events/batch":{"post":{"operationId":"recordWorkspaceEventBatch","summary":"Record an economic-event batch","description":"Requires write or admin capability. Maximum 1,000 events; each event uses workspace/source/externalId idempotency.","tags":["Workspaces"],"responses":{"201":{"description":"Batch ingestion result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventWriteResult"},"example":{"inserted":0,"duplicates":0,"total":0}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."}],"security":[{"capabilityBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EconomicEventBatch"},"example":{"events":[{"schemaVersion":"1","externalId":"invoice_123","occurredAt":"2026-07-28T12:00:00Z","kind":"revenue","direction":"inflow","amount":"12.50","currency":"USDC","agentId":"agent_sales_1","ventureId":"venture_directory","experimentId":"experiment_reddit_1","customerId":"customer_42","category":"customer_revenue","source":{"name":"synthetic_x402_import","type":"x402_receipt","verification":"receipt_verified","reference":"safe-reference"},"metadata":{"product":"report"}}]}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Retries require normal x402 replay protection; business idempotency is stated in the operation description."}},"/api/v1/workspaces/{workspaceId}/imports/x402":{"post":{"operationId":"importWorkspaceX402Receipt","summary":"Import an x402 receipt","description":"Requires write or admin capability. Receipt evidence is never upgraded if on-chain verification fails.","tags":["Workspaces"],"responses":{"201":{"description":"Normalized and persisted event","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{}},"example":{}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."}],"security":[{"capabilityBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["side","network","asset","amount","transactionHash","paymentId","resource"],"properties":{"side":{"enum":["seller","buyer"]},"network":{"type":"string"},"asset":{"type":"string"},"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"transactionHash":{"type":"string"},"paymentId":{"type":"string"},"resource":{"type":"string"}}},"example":{"side":"seller","network":"synthetic","asset":"synthetic","amount":"1","transactionHash":"synthetic","paymentId":"synthetic","resource":"synthetic"}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Retries require normal x402 replay protection; business idempotency is stated in the operation description."}},"/api/v1/workspaces/{workspaceId}/profit":{"get":{"operationId":"getWorkspaceProfit","summary":"Get workspace profit","description":"Requires read or admin capability, consumes one calculation quota, and uses persisted events.","tags":["Workspaces"],"responses":{"200":{"description":"Deterministic workspace calculation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculationResult"},"example":{"schemaVersion":"2","calculationEngineVersion":"2.0.0","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"currentCashBalances":{},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByCategory":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"customerEconomics":{},"ventureEconomics":{},"experimentEconomics":{},"unattributedCosts":{}},"burnRateByCurrency":{},"runwayByCurrency":{},"dataCoverage":{"revenueByEvidencePercent":{},"expensesByEvidencePercent":{},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."},{"name":"baseCurrency","in":"query","required":false,"schema":{"type":"string"}}],"security":[{"capabilityBearer":[]}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/workspaces/{workspaceId}/cash-flow":{"get":{"operationId":"getWorkspaceCashFlow","summary":"Get workspace cash-flow","description":"Requires read or admin capability, consumes one calculation quota, and uses persisted events.","tags":["Workspaces"],"responses":{"200":{"description":"Deterministic workspace calculation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculationResult"},"example":{"schemaVersion":"2","calculationEngineVersion":"2.0.0","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"currentCashBalances":{},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByCategory":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"customerEconomics":{},"ventureEconomics":{},"experimentEconomics":{},"unattributedCosts":{}},"burnRateByCurrency":{},"runwayByCurrency":{},"dataCoverage":{"revenueByEvidencePercent":{},"expensesByEvidencePercent":{},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."},{"name":"baseCurrency","in":"query","required":false,"schema":{"type":"string"}}],"security":[{"capabilityBearer":[]}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/workspaces/{workspaceId}/agents":{"get":{"operationId":"listWorkspaceAgents","summary":"List workspace agents","description":"Requires read or admin capability.","tags":["Workspaces"],"responses":{"200":{"description":"agents identifiers","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["agents"],"properties":{"agents":{"type":"array","items":{"type":"string"}}}},"example":{"agents":[]}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."}],"security":[{"capabilityBearer":[]}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/workspaces/{workspaceId}/ventures":{"get":{"operationId":"listWorkspaceVentures","summary":"List workspace ventures","description":"Requires read or admin capability.","tags":["Workspaces"],"responses":{"200":{"description":"ventures identifiers","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["ventures"],"properties":{"ventures":{"type":"array","items":{"type":"string"}}}},"example":{"ventures":[]}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."}],"security":[{"capabilityBearer":[]}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/workspaces/{workspaceId}/experiments":{"get":{"operationId":"listWorkspaceExperiments","summary":"List workspace experiments","description":"Requires read or admin capability.","tags":["Workspaces"],"responses":{"200":{"description":"experiments identifiers","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["experiments"],"properties":{"experiments":{"type":"array","items":{"type":"string"}}}},"example":{"experiments":[]}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."}],"security":[{"capabilityBearer":[]}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/workspaces/{workspaceId}/data-quality":{"get":{"operationId":"getWorkspaceDataQuality","summary":"Get workspace evidence and data quality","description":"Requires read or admin capability. Does not upgrade evidence classifications.","tags":["Workspaces"],"responses":{"200":{"description":"Data quality result","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["dataCoverage","warnings","duplicateEventCount"],"properties":{"dataCoverage":{"$ref":"#/components/schemas/DataCoverage"},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/CalculationWarning"}},"duplicateEventCount":{"type":"integer"}}},"example":{"dataCoverage":{"revenueByEvidencePercent":{"self_reported":"1","receipt_supplied":"1","receipt_verified":"1","onchain_verified":"1","system_observed":"1"},"expensesByEvidencePercent":{"self_reported":"1","receipt_supplied":"1","receipt_verified":"1","onchain_verified":"1","system_observed":"1"},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"warnings":[],"duplicateEventCount":0}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."}],"security":[{"capabilityBearer":[]}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/workspaces/{workspaceId}/reports":{"post":{"operationId":"createWorkspaceReport","summary":"Create signed workspace report","description":"Requires admin capability. Uses one included report and one calculation quota; report persists with capability-protected access.","tags":["Workspaces","Reports"],"responses":{"201":{"description":"Signed report created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["report","reportUrl","jsonUrl"],"properties":{"report":{"$ref":"#/components/schemas/CurrentSignedReportSchema3"},"reportUrl":{"type":"string"},"jsonUrl":{"type":"string"}}},"example":{"report":{"schemaVersion":"3","calculationVersion":"2.0.0","reportId":"rpt_synthetic","reportTimestamp":"2026-07-28T12:00:00Z","workspaceId":"synthetic","coveredPeriod":{},"calculation":{"schemaVersion":"2","calculationEngineVersion":"2.0.0","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"currentCashBalances":{},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByCategory":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"customerEconomics":{},"ventureEconomics":{},"experimentEconomics":{},"unattributedCosts":{}},"burnRateByCurrency":{},"runwayByCurrency":{},"dataCoverage":{"revenueByEvidencePercent":{},"expensesByEvidencePercent":{},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}},"evidenceStatement":"synthetic","publicKeyId":"synthetic","resultHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","signature":"synthetic","signatureAlgorithm":"Ed25519","visibility":"private"},"reportUrl":"synthetic","jsonUrl":"synthetic"}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."}],"security":[{"capabilityBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{"public":{"type":"boolean","default":false}}},"example":{"public":false}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Retries require normal x402 replay protection; business idempotency is stated in the operation description."}},"/api/v1/workspaces/{workspaceId}/export":{"get":{"operationId":"exportWorkspace","summary":"Export workspace events","description":"Requires read or admin capability. Returns the caller's persisted events for portability.","tags":["Workspaces"],"responses":{"200":{"description":"Workspace export","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["schemaVersion","workspaceId","exportedAt","events"],"properties":{"schemaVersion":{"const":"1"},"workspaceId":{"type":"string"},"exportedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"$ref":"#/components/schemas/EconomicEvent"}}}},"example":{"schemaVersion":"1","workspaceId":"synthetic","exportedAt":"2026-07-28T12:00:00Z","events":[]}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."}],"security":[{"capabilityBearer":[]}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/api/v1/workspaces/{workspaceId}":{"delete":{"operationId":"deleteWorkspace","summary":"Securely delete workspace","description":"Requires admin capability. Cascades persisted events, tokens, quotas, calculations, and private reports. This is not reversible.","tags":["Workspaces"],"responses":{"204":{"description":"Workspace deleted; no response body."},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^ws_"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","pattern":"^Bearer apl_"},"description":"Capability-scoped bearer token returned once during workspace creation."}],"security":[{"capabilityBearer":[]}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/reports/{reportId}":{"get":{"operationId":"viewReport","summary":"View capability-protected report","description":"Requires the one-time report access token unless the report is public.","tags":["Reports"],"responses":{"200":{"description":"HTML report viewer with signature status and key ID","content":{"text/html":{"schema":{"type":"string"},"example":"synthetic"}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}},{"name":"access_token","in":"query","required":false,"schema":{"type":"string"}}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/reports/{reportId}.json":{"get":{"operationId":"downloadReportJson","summary":"Download signed report JSON","description":"Requires report access token unless public.","tags":["Reports"],"responses":{"200":{"description":"Signed report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedReport"},"example":{"schemaVersion":"3","calculationVersion":"2.0.0","reportId":"rpt_synthetic","reportTimestamp":"2026-07-28T12:00:00Z","workspaceId":"synthetic","coveredPeriod":{},"calculation":{"schemaVersion":"2","calculationEngineVersion":"2.0.0","calculatedAt":"2026-07-28T12:00:00Z","inputEventCount":0,"acceptedEventCount":0,"rejectedEventCount":0,"duplicateEventCount":0,"profitAffectingEventCount":0,"profitExcludedEventCount":0,"cashFlowAffectingEventCount":0,"cashFlowExcludedEventCount":0,"currencyPolicy":{"mode":"separate_totals","baseCurrency":"USDC","rates":[]},"currentCashBalances":{},"totals":{},"breakdowns":{"spendByAgent":{},"spendByVenture":{},"spendByCategory":{},"spendByExperiment":{},"revenueByVenture":{},"revenueByCustomer":{},"profitByVenture":{},"customerEconomics":{},"ventureEconomics":{},"experimentEconomics":{},"unattributedCosts":{}},"burnRateByCurrency":{},"runwayByCurrency":{},"dataCoverage":{"revenueByEvidencePercent":{},"expensesByEvidencePercent":{},"missingCostCategories":[],"unsupportedClaims":[],"unmatchedTransfers":[],"duplicateExternalIds":[],"conflictingEvents":[],"unverifiedBlockchainReferences":[]},"profitExcludedEvents":[],"rejectedEvents":[],"warnings":[],"formulas":{}},"evidenceStatement":"synthetic","publicKeyId":"synthetic","resultHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","signature":"synthetic","signatureAlgorithm":"Ed25519","visibility":"private"}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}},{"name":"access_token","in":"query","required":false,"schema":{"type":"string"}}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/mcp":{"post":{"operationId":"handleMcp","summary":"Use MCP Streamable HTTP transport","description":"MCP protocol endpoint. Tool discovery identifies paid tools, prices, retention, schemas, and capability requirements.","tags":["MCP"],"responses":{"200":{"description":"MCP JSON-RPC response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{}},"example":{}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["jsonrpc","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{},"method":{"type":"string"},"params":{"type":"object","additionalProperties":true}}},"example":{"jsonrpc":"2.0","method":"synthetic"}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Retries require normal x402 replay protection; business idempotency is stated in the operation description."}},"/docs":{"get":{"operationId":"getDocumentation","summary":"Get human and Markdown API documentation","description":"Content-negotiated public documentation. Prefer application/json endpoints for machine integration.","tags":["Discovery"],"responses":{"200":{"description":"HTML or Markdown documentation","content":{"text/html":{"schema":{"type":"string"},"example":"synthetic"},"text/markdown":{"schema":{"type":"string"},"example":"synthetic"}},"headers":{"Vary":{"description":"Representation selection varies by the Accept request header.","schema":{"type":"string","const":"Accept"}}}},"406":{"description":"Requested representation is unsupported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/llms.txt":{"get":{"operationId":"getLlmsSummary","summary":"Get concise agent documentation","description":"Public plain-text machine documentation with purpose, prices, endpoints, retention, and limitations.","tags":["Discovery"],"responses":{"200":{"description":"Agent documentation","content":{"text/plain":{"schema":{"type":"string"},"example":"synthetic"}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/llms-full.txt":{"get":{"operationId":"getLlmsFull","summary":"Get extended agent documentation","description":"Extended plain-text machine documentation with schemas, examples, and privacy behavior.","tags":["Discovery"],"responses":{"200":{"description":"Extended agent documentation","content":{"text/plain":{"schema":{"type":"string"},"example":"synthetic"}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/.well-known/mcp.json":{"get":{"operationId":"getMcpDiscovery","summary":"Get MCP well-known discovery metadata","description":"Get MCP well-known discovery metadata. No payment or account is required.","tags":["Discovery"],"responses":{"200":{"description":"Get MCP well-known discovery metadata","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["mcpVersion","name","transport","capabilities"],"properties":{"mcpVersion":{"type":"string"},"name":{"type":"string"},"transport":{"type":"object","additionalProperties":false,"required":["type","url"],"properties":{"type":{"const":"streamable-http"},"url":{"type":"string","format":"uri"}}},"capabilities":{"type":"object","additionalProperties":true}}},"example":{"mcpVersion":"synthetic","name":"synthetic","transport":{"type":"streamable-http","url":"https://x402.ailabra.org/synthetic"},"capabilities":{}}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/.well-known/agent.json":{"get":{"operationId":"getAgentDiscovery","summary":"Get agent discovery metadata","description":"Get agent discovery metadata. No payment or account is required.","tags":["Discovery"],"responses":{"200":{"description":"Get agent discovery metadata","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name","description","url","version","serviceVersion","gitCommit","buildTimestamp","calculationSchemaVersion","calculationEngineVersion","analysisVersion","currentSignedReportSchemaVersion","supportedSignedReportSchemaVersions","economicEventSchemaVersion","x402ProtocolVersion","runtimeEnvironment","paymentMode","testnet","network","assetSymbol","asset","assetDecimals","eip712Name","eip712Version","protocols","mcp","openapi","payment"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"url":{"type":"string","format":"uri"},"version":{"type":"string"},"serviceVersion":{"const":"1.0.5"},"gitCommit":{"type":"string","minLength":1},"buildTimestamp":{"type":"string","format":"date-time"},"calculationSchemaVersion":{"const":"2"},"calculationEngineVersion":{"const":"2.0.0"},"analysisVersion":{"const":"2.0.0"},"currentSignedReportSchemaVersion":{"const":"3"},"supportedSignedReportSchemaVersions":{"type":"array","const":["1","2","3"]},"economicEventSchemaVersion":{"const":"1"},"x402ProtocolVersion":{"const":2},"runtimeEnvironment":{"type":"string","enum":["development","test","production"]},"paymentMode":{"type":"string","enum":["testnet","mainnet"]},"testnet":{"type":"boolean"},"network":{"type":"string"},"assetSymbol":{"const":"USDC"},"asset":{"type":"string"},"assetDecimals":{"type":"integer","const":6},"eip712Name":{"type":"string","minLength":1},"eip712Version":{"type":"string","minLength":1},"protocols":{"type":"array","items":{"type":"string"}},"mcp":{"type":"string","format":"uri"},"openapi":{"type":"string","format":"uri"},"payment":{"type":"object","additionalProperties":false,"required":["network","currency","assetAddress","eip712Name","eip712Version"],"properties":{"network":{"type":"string"},"currency":{"const":"USDC"},"assetAddress":{"type":"string"},"eip712Name":{"type":"string"},"eip712Version":{"type":"string"}}}}},"example":{"name":"synthetic","description":"synthetic","url":"https://x402.ailabra.org/synthetic","version":"synthetic","serviceVersion":"1.0.5","gitCommit":"synthetic","buildTimestamp":"2026-07-28T12:00:00Z","calculationSchemaVersion":"2","calculationEngineVersion":"2.0.0","analysisVersion":"2.0.0","currentSignedReportSchemaVersion":"3","supportedSignedReportSchemaVersions":["1","2","3"],"economicEventSchemaVersion":"1","x402ProtocolVersion":2,"runtimeEnvironment":"production","paymentMode":"mainnet","testnet":false,"network":"eip155:8453","assetSymbol":"USDC","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetDecimals":6,"eip712Name":"synthetic","eip712Version":"synthetic","protocols":[],"mcp":"https://x402.ailabra.org/synthetic","openapi":"https://x402.ailabra.org/synthetic","payment":{"network":"synthetic","currency":"USDC","assetAddress":"synthetic","eip712Name":"synthetic","eip712Version":"synthetic"}}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/.well-known/agent-card.json":{"get":{"operationId":"getAgentCard","summary":"Get compatible agent-card alias","description":"Get compatible agent-card alias. No payment or account is required.","tags":["Discovery"],"responses":{"200":{"description":"Get compatible agent-card alias","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name","description","url","version","serviceVersion","gitCommit","buildTimestamp","calculationSchemaVersion","calculationEngineVersion","analysisVersion","currentSignedReportSchemaVersion","supportedSignedReportSchemaVersions","economicEventSchemaVersion","x402ProtocolVersion","runtimeEnvironment","paymentMode","testnet","network","assetSymbol","asset","assetDecimals","eip712Name","eip712Version","protocols","mcp","openapi","payment"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"url":{"type":"string","format":"uri"},"version":{"type":"string"},"serviceVersion":{"const":"1.0.5"},"gitCommit":{"type":"string","minLength":1},"buildTimestamp":{"type":"string","format":"date-time"},"calculationSchemaVersion":{"const":"2"},"calculationEngineVersion":{"const":"2.0.0"},"analysisVersion":{"const":"2.0.0"},"currentSignedReportSchemaVersion":{"const":"3"},"supportedSignedReportSchemaVersions":{"type":"array","const":["1","2","3"]},"economicEventSchemaVersion":{"const":"1"},"x402ProtocolVersion":{"const":2},"runtimeEnvironment":{"type":"string","enum":["development","test","production"]},"paymentMode":{"type":"string","enum":["testnet","mainnet"]},"testnet":{"type":"boolean"},"network":{"type":"string"},"assetSymbol":{"const":"USDC"},"asset":{"type":"string"},"assetDecimals":{"type":"integer","const":6},"eip712Name":{"type":"string","minLength":1},"eip712Version":{"type":"string","minLength":1},"protocols":{"type":"array","items":{"type":"string"}},"mcp":{"type":"string","format":"uri"},"openapi":{"type":"string","format":"uri"},"payment":{"type":"object","additionalProperties":false,"required":["network","currency","assetAddress","eip712Name","eip712Version"],"properties":{"network":{"type":"string"},"currency":{"const":"USDC"},"assetAddress":{"type":"string"},"eip712Name":{"type":"string"},"eip712Version":{"type":"string"}}}}},"example":{"name":"synthetic","description":"synthetic","url":"https://x402.ailabra.org/synthetic","version":"synthetic","serviceVersion":"1.0.5","gitCommit":"synthetic","buildTimestamp":"2026-07-28T12:00:00Z","calculationSchemaVersion":"2","calculationEngineVersion":"2.0.0","analysisVersion":"2.0.0","currentSignedReportSchemaVersion":"3","supportedSignedReportSchemaVersions":["1","2","3"],"economicEventSchemaVersion":"1","x402ProtocolVersion":2,"runtimeEnvironment":"production","paymentMode":"mainnet","testnet":false,"network":"eip155:8453","assetSymbol":"USDC","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","assetDecimals":6,"eip712Name":"synthetic","eip712Version":"synthetic","protocols":[],"mcp":"https://x402.ailabra.org/synthetic","openapi":"https://x402.ailabra.org/synthetic","payment":{"network":"synthetic","currency":"USDC","assetAddress":"synthetic","eip712Name":"synthetic","eip712Version":"synthetic"}}}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/privacy":{"get":{"operationId":"getPrivacy","summary":"Get privacy and retention policy","description":"Documents stateless non-retention, workspace expiry/deletion, and minimal logging.","tags":["Discovery"],"responses":{"200":{"description":"Privacy Markdown","content":{"text/markdown":{"schema":{"type":"string"},"example":"synthetic"}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/security":{"get":{"operationId":"getSecurity","summary":"Get security summary","description":"Documents capability hashing, report signing, limitations, and vulnerability reporting.","tags":["Discovery"],"responses":{"200":{"description":"Security Markdown","content":{"text/markdown":{"schema":{"type":"string"},"example":"synthetic"}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/guides/{slug}":{"get":{"operationId":"getGuide","summary":"Get first-party technical guide","description":"Returns a documented guide in HTML or Markdown. Unknown slugs return a structured 404.","tags":["Discovery"],"responses":{"200":{"description":"Guide","content":{"text/html":{"schema":{"type":"string"},"example":"synthetic"},"text/markdown":{"schema":{"type":"string"},"example":"synthetic"}}},"400":{"description":"Invalid JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"404":{"description":"Resource not found or capability denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"409":{"description":"Duplicate, replay, expiry, or quota conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"422":{"description":"Schema or currency-policy validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}},"500":{"description":"Internal service error; no stack trace is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredApiError"},"example":{"error":{"code":"synthetic","message":"synthetic","requestId":"synthetic"}}}}}},"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/robots.txt":{"get":{"operationId":"getRobots","summary":"Get crawler policy","description":"Public crawler and content-use signals.","tags":["Discovery"],"responses":{"200":{"description":"Robots policy","content":{"text/plain":{"schema":{"type":"string"},"example":"synthetic"}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}},"/sitemap.xml":{"get":{"operationId":"getSitemap","summary":"Get public sitemap","description":"Public product and documentation sitemap.","tags":["Discovery"],"responses":{"200":{"description":"Sitemap XML","content":{"application/xml":{"schema":{"type":"string"},"example":"synthetic"}}}},"x-retention":"No raw request data is retained unless the operation description explicitly states persistence.","x-idempotency":"Idempotent HTTP operation."}}},"components":{"securitySchemes":{"capabilityBearer":{"type":"http","scheme":"bearer","bearerFormat":"apl_<high-entropy-token>","description":"Capability token; only its SHA-256 hash is stored."}},"schemas":{"Landing":{"type":"object","additionalProperties":false,"required":["x402Enabled","protocolVersion","product","version","serviceVersion","gitCommit","buildTimestamp","calculationSchemaVersion","calculationEngineVersion","analysisVersion","currentSignedReportSchemaVersion","supportedSignedReportSchemaVersions","economicEventSchemaVersion","x402ProtocolVersion","runtimeEnvironment","paymentMode","testnet","network","assetSymbol","asset","assetDecimals","eip712Name","eip712Version","problem","usage"],"properties":{"x402Enabled":{"const":true},"protocolVersion":{"const":2},"product":{"type":"string"},"version":{"type":"string"},"serviceVersion":{"const":"1.0.5"},"gitCommit":{"type":"string","minLength":1},"buildTimestamp":{"type":"string","format":"date-time"},"calculationSchemaVersion":{"const":"2"},"calculationEngineVersion":{"const":"2.0.0"},"analysisVersion":{"const":"2.0.0"},"currentSignedReportSchemaVersion":{"const":"3"},"supportedSignedReportSchemaVersions":{"type":"array","const":["1","2","3"]},"economicEventSchemaVersion":{"const":"1"},"x402ProtocolVersion":{"const":2},"runtimeEnvironment":{"type":"string","enum":["development","test","production"]},"paymentMode":{"type":"string","enum":["testnet","mainnet"]},"testnet":{"type":"boolean"},"network":{"type":"string"},"assetSymbol":{"const":"USDC"},"asset":{"type":"string"},"assetDecimals":{"type":"integer","const":6},"eip712Name":{"type":"string","minLength":1},"eip712Version":{"type":"string","minLength":1},"protocols":{"type":"object","additionalProperties":true},"operations":{"type":"array","items":{"type":"string"}},"currencies":{"type":"object","additionalProperties":true},"evidenceLevels":{"type":"array","items":{"type":"string","enum":["self_reported","receipt_supplied","receipt_verified","onchain_verified","system_observed"]}},"custody":{"const":false},"problem":{"const":"Wallet balance is not profit."},"usage":{"type":"object","additionalProperties":false,"required":["docs","pricing","sampleReport"],"properties":{"docs":{"type":"string"},"pricing":{"type":"string"},"sampleReport":{"type":"string"}}}}},"Capabilities":{"type":"object","additionalProperties":false,"required":["product","version","serviceVersion","gitCommit","buildTimestamp","calculationSchemaVersion","calculationEngineVersion","analysisVersion","currentSignedReportSchemaVersion","supportedSignedReportSchemaVersions","economicEventSchemaVersion","x402ProtocolVersion","runtimeEnvironment","paymentMode","testnet","network","assetSymbol","asset","assetDecimals","eip712Name","eip712Version","protocols","operations","currencies","evidenceLevels","custody"],"properties":{"product":{"type":"string"},"version":{"const":"1.0.5"},"serviceVersion":{"const":"1.0.5"},"gitCommit":{"type":"string","minLength":1},"buildTimestamp":{"type":"string","format":"date-time"},"calculationSchemaVersion":{"const":"2"},"calculationEngineVersion":{"const":"2.0.0"},"analysisVersion":{"const":"2.0.0"},"currentSignedReportSchemaVersion":{"const":"3"},"supportedSignedReportSchemaVersions":{"type":"array","const":["1","2","3"]},"economicEventSchemaVersion":{"const":"1"},"x402ProtocolVersion":{"const":2},"runtimeEnvironment":{"type":"string","enum":["development","test","production"]},"paymentMode":{"type":"string","enum":["testnet","mainnet"]},"testnet":{"type":"boolean"},"network":{"type":"string"},"assetSymbol":{"const":"USDC"},"asset":{"type":"string"},"assetDecimals":{"type":"integer","const":6},"eip712Name":{"type":"string","minLength":1},"eip712Version":{"type":"string","minLength":1},"protocols":{"type":"object","additionalProperties":true},"operations":{"type":"array","items":{"type":"string"}},"currencies":{"type":"object","additionalProperties":false,"required":["modeWithoutRates","explicitCallerRates"],"properties":{"modeWithoutRates":{"const":"separate_totals"},"explicitCallerRates":{"const":true}}},"evidenceLevels":{"type":"array","items":{"type":"string","enum":["self_reported","receipt_supplied","receipt_verified","onchain_verified","system_observed"]}},"custody":{"const":false}}},"SourceEvidence":{"type":"object","additionalProperties":false,"required":["name","type","verification"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","minLength":1,"maxLength":80},"verification":{"type":"string","enum":["self_reported","receipt_supplied","receipt_verified","onchain_verified","system_observed"]},"reference":{"type":"string","maxLength":500}}},"EconomicEvent":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://x402.ailabra.org/api/v1/schemas/economic-event","title":"Ailabra Economic Event v1","type":"object","additionalProperties":false,"required":["schemaVersion","externalId","occurredAt","kind","direction","amount","currency","category","source"],"properties":{"schemaVersion":{"const":"1"},"externalId":{"type":"string","minLength":1,"maxLength":160},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["revenue","expense","refund","fee","transfer","capital","withdrawal","asset_purchase","asset_sale","adjustment"],"description":"Economic kind; interpreted together with direction."},"direction":{"type":"string","enum":["inflow","outflow"]},"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Positive exact decimal string. JSON numbers and binary floating point are rejected."},"currency":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"category":{"type":"string","minLength":1,"maxLength":120},"source":{"$ref":"#/components/schemas/SourceEvidence"},"agentId":{"type":"string"},"ventureId":{"type":"string"},"experimentId":{"type":"string"},"customerId":{"type":"string"},"productId":{"type":"string"},"relatedEventId":{"type":"string"},"transactionHash":{"type":"string"},"x402PaymentId":{"type":"string"},"assetPolicy":{"type":"string","enum":["expense","exclude"]},"adjustment":{"type":"object","required":["reason","profitTreatment"],"properties":{"reason":{"type":"string"},"profitTreatment":{"type":"string","enum":["revenue","cost","exclude"]}}},"metadata":{"type":"object","description":"Intentionally extensible safe structured metadata.","additionalProperties":true}},"description":"Version-1 economic event. Amount is a positive decimal string. Kind and direction determine treatment. Transfers do not affect consolidated profit; capital is not revenue; withdrawals are not operating expenses. USDC remains USDC and is never silently relabelled USD. Workspace idempotency scope is workspace + source.name + externalId.","example":{"schemaVersion":"1","externalId":"invoice_123","occurredAt":"2026-07-28T12:00:00Z","kind":"revenue","direction":"inflow","amount":"12.50","currency":"USDC","agentId":"agent_sales_1","ventureId":"venture_directory","experimentId":"experiment_reddit_1","customerId":"customer_42","category":"customer_revenue","source":{"name":"synthetic_x402_import","type":"x402_receipt","verification":"receipt_verified","reference":"safe-reference"},"metadata":{"product":"report"}}},"EconomicEventBatch":{"type":"object","additionalProperties":false,"required":["events"],"properties":{"events":{"type":"array","minItems":1,"maxItems":1000,"items":{"$ref":"#/components/schemas/EconomicEvent"}}}},"ExchangeRate":{"type":"object","additionalProperties":false,"required":["from","to","rate","source","effectiveAt"],"properties":{"from":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"to":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"rate":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Positive multiplier from source to target currency."},"source":{"type":"string","minLength":1,"maxLength":160},"effectiveAt":{"type":"string","format":"date-time"}}},"CurrencyPolicy":{"type":"object","additionalProperties":false,"required":["mode","baseCurrency","rates"],"properties":{"mode":{"type":"string","enum":["separate_totals","explicit_conversion"]},"baseCurrency":{"oneOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},{"type":"null"}]},"rates":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeRate"}}}},"CalculationRequest":{"type":"object","additionalProperties":false,"required":["events"],"properties":{"events":{"type":"array","minItems":1,"maxItems":1000,"items":{"$ref":"#/components/schemas/EconomicEvent"}},"baseCurrency":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"exchangeRates":{"type":"array","maxItems":100,"default":[],"items":{"$ref":"#/components/schemas/ExchangeRate"}},"currentCashBalance":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Legacy single balance; valid only for one input currency or explicit base-currency conversion.","deprecated":true},"currentCashBalances":{"type":"object","description":"Exact caller-reported balances keyed by currency.","additionalProperties":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."}}}},"ProfitSummary":{"type":"object","additionalProperties":false,"required":["grossRevenue","revenueRefunds","netRevenue","directCosts","operatingCosts","transactionFees","advertisingCosts","llmCosts","computeHostingCosts","totalCosts","netOperatingProfit","profitMargin"],"properties":{"grossRevenue":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"revenueRefunds":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"netRevenue":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"directCosts":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"operatingCosts":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"transactionFees":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"advertisingCosts":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"llmCosts":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"computeHostingCosts":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"totalCosts":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"netOperatingProfit":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"cashInflows":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"cashOutflows":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"netCashFlow":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"ownerCapital":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"ownerWithdrawals":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"profitMargin":{"type":"object","additionalProperties":false,"required":["value","status"],"properties":{"value":{"oneOf":[{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},{"type":"null"}]},"status":{"type":"string","enum":["available","insufficient_data"]},"unit":{"type":"string"},"period":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}}},"CashFlowSummary":{"type":"object","additionalProperties":false,"required":["cashInflows","cashOutflows","netCashFlow","ownerCapital","ownerWithdrawals"],"properties":{"cashInflows":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"cashOutflows":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"netCashFlow":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"ownerCapital":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"ownerWithdrawals":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."}}},"CategoryBreakdown":{"type":"object","additionalProperties":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."}},"AgentBreakdown":{"type":"object","additionalProperties":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."}},"VentureBreakdown":{"type":"object","additionalProperties":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."}},"ExperimentBreakdown":{"type":"object","additionalProperties":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."}},"EvidenceCoverage":{"type":"object","additionalProperties":false,"required":["self_reported","receipt_supplied","receipt_verified","onchain_verified","system_observed"],"properties":{"self_reported":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Percentage from 0 to 100."},"receipt_supplied":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Percentage from 0 to 100."},"receipt_verified":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Percentage from 0 to 100."},"onchain_verified":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Percentage from 0 to 100."},"system_observed":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Percentage from 0 to 100."}}},"DataCoverage":{"type":"object","additionalProperties":false,"required":["revenueByEvidencePercent","expensesByEvidencePercent","missingCostCategories","unsupportedClaims","unmatchedTransfers","duplicateExternalIds","conflictingEvents","unverifiedBlockchainReferences"],"properties":{"revenueByEvidencePercent":{"$ref":"#/components/schemas/EvidenceCoverage"},"expensesByEvidencePercent":{"$ref":"#/components/schemas/EvidenceCoverage"},"missingCostCategories":{"type":"array","items":{"type":"string"}},"unsupportedClaims":{"type":"array","items":{"type":"string"}},"unmatchedTransfers":{"type":"array","items":{"type":"string"}},"duplicateExternalIds":{"type":"array","items":{"type":"string"}},"conflictingEvents":{"type":"array","items":{"type":"string"}},"unverifiedBlockchainReferences":{"type":"array","items":{"type":"string"}}}},"CalculationWarning":{"type":"string","minLength":1},"CalculationResult":{"type":"object","additionalProperties":false,"required":["schemaVersion","calculationEngineVersion","calculatedAt","inputEventCount","acceptedEventCount","rejectedEventCount","duplicateEventCount","profitAffectingEventCount","profitExcludedEventCount","cashFlowAffectingEventCount","cashFlowExcludedEventCount","currencyPolicy","currentCashBalances","totals","breakdowns","burnRateByCurrency","runwayByCurrency","dataCoverage","profitExcludedEvents","rejectedEvents","warnings","formulas"],"properties":{"schemaVersion":{"const":"2"},"calculationEngineVersion":{"const":"2.0.0"},"calculatedAt":{"type":"string","format":"date-time"},"inputEventCount":{"type":"integer","minimum":0},"acceptedEventCount":{"type":"integer","minimum":0},"rejectedEventCount":{"type":"integer","minimum":0},"duplicateEventCount":{"type":"integer","minimum":0},"profitAffectingEventCount":{"type":"integer","minimum":0},"profitExcludedEventCount":{"type":"integer","minimum":0},"cashFlowAffectingEventCount":{"type":"integer","minimum":0},"cashFlowExcludedEventCount":{"type":"integer","minimum":0},"currencyPolicy":{"$ref":"#/components/schemas/CurrencyPolicy"},"currentCashBalances":{"type":"object","additionalProperties":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."}},"totals":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ProfitSummary"}},"breakdowns":{"type":"object","additionalProperties":false,"required":["spendByAgent","spendByVenture","spendByCategory","spendByExperiment","revenueByVenture","revenueByCustomer","profitByVenture","customerEconomics","ventureEconomics","experimentEconomics","unattributedCosts"],"properties":{"spendByAgent":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"spendByVenture":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"spendByCategory":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"spendByExperiment":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"revenueByVenture":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"revenueByCustomer":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"profitByVenture":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"customerEconomics":{"$ref":"#/components/schemas/CurrencyCustomerEconomics"},"ventureEconomics":{"$ref":"#/components/schemas/CurrencyVentureEconomics"},"experimentEconomics":{"$ref":"#/components/schemas/CurrencyExperimentEconomics"},"unattributedCosts":{"type":"object","additionalProperties":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."}}}},"burnRateByCurrency":{"$ref":"#/components/schemas/CurrencyMetricMap"},"runwayByCurrency":{"$ref":"#/components/schemas/CurrencyMetricMap"},"dataCoverage":{"$ref":"#/components/schemas/DataCoverageV2"},"profitExcludedEvents":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["externalId","reason"],"properties":{"externalId":{"type":"string"},"reason":{"type":"string"}}}},"rejectedEvents":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["externalId","reason"],"properties":{"externalId":{"type":"string"},"reason":{"type":"string"}}}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/CalculationWarning"}},"formulas":{"type":"object","additionalProperties":{"type":"string"}}}},"AnalysisFinding":{"type":"object","additionalProperties":false,"required":["code","severity","message","currency","entityType","entityId","metrics"],"properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning"]},"message":{"type":"string"},"currency":{"type":"string"},"entityType":{"type":"string","enum":["experiment","venture","customer","category"]},"entityId":{"type":"string"},"metrics":{"oneOf":[{"type":"object","additionalProperties":false,"required":["netRevenue","attributedCosts","netContribution","returnOnSpendPercent"],"properties":{"netRevenue":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"attributedCosts":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"netContribution":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"returnOnSpendPercent":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."}}},{"type":"object","additionalProperties":false,"required":["amount"],"properties":{"amount":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."}}}]}}},"AnalysisResult":{"type":"object","additionalProperties":false,"required":["schemaVersion","calculationEngineVersion","calculatedAt","inputEventCount","acceptedEventCount","rejectedEventCount","duplicateEventCount","profitAffectingEventCount","profitExcludedEventCount","cashFlowAffectingEventCount","cashFlowExcludedEventCount","currencyPolicy","currentCashBalances","totals","breakdowns","burnRateByCurrency","runwayByCurrency","dataCoverage","profitExcludedEvents","rejectedEvents","warnings","formulas","analysisVersion","analysisByCurrency","findings","disclaimer"],"properties":{"schemaVersion":{"const":"2"},"calculationEngineVersion":{"const":"2.0.0"},"calculatedAt":{"type":"string","format":"date-time"},"inputEventCount":{"type":"integer","minimum":0},"acceptedEventCount":{"type":"integer","minimum":0},"rejectedEventCount":{"type":"integer","minimum":0},"duplicateEventCount":{"type":"integer","minimum":0},"profitAffectingEventCount":{"type":"integer","minimum":0},"profitExcludedEventCount":{"type":"integer","minimum":0},"cashFlowAffectingEventCount":{"type":"integer","minimum":0},"cashFlowExcludedEventCount":{"type":"integer","minimum":0},"currencyPolicy":{"$ref":"#/components/schemas/CurrencyPolicy"},"currentCashBalances":{"type":"object","additionalProperties":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."}},"totals":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ProfitSummary"}},"breakdowns":{"type":"object","additionalProperties":false,"required":["spendByAgent","spendByVenture","spendByCategory","spendByExperiment","revenueByVenture","revenueByCustomer","profitByVenture","customerEconomics","ventureEconomics","experimentEconomics","unattributedCosts"],"properties":{"spendByAgent":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"spendByVenture":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"spendByCategory":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"spendByExperiment":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"revenueByVenture":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"revenueByCustomer":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"profitByVenture":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"customerEconomics":{"$ref":"#/components/schemas/CurrencyCustomerEconomics"},"ventureEconomics":{"$ref":"#/components/schemas/CurrencyVentureEconomics"},"experimentEconomics":{"$ref":"#/components/schemas/CurrencyExperimentEconomics"},"unattributedCosts":{"type":"object","additionalProperties":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."}}}},"burnRateByCurrency":{"$ref":"#/components/schemas/CurrencyMetricMap"},"runwayByCurrency":{"$ref":"#/components/schemas/CurrencyMetricMap"},"dataCoverage":{"$ref":"#/components/schemas/DataCoverageV2"},"profitExcludedEvents":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["externalId","reason"],"properties":{"externalId":{"type":"string"},"reason":{"type":"string"}}}},"rejectedEvents":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["externalId","reason"],"properties":{"externalId":{"type":"string"},"reason":{"type":"string"}}}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/CalculationWarning"}},"formulas":{"type":"object","additionalProperties":{"type":"string"}},"analysisVersion":{"const":"2.0.0"},"analysisByCurrency":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AnalysisCurrencySummary"}},"findings":{"type":"array","items":{"$ref":"#/components/schemas/AnalysisFinding"}},"disclaimer":{"type":"string"}}},"AttestationRequest":{"type":"object","additionalProperties":false,"required":["events"],"properties":{"events":{"type":"array","minItems":1,"maxItems":1000,"items":{"$ref":"#/components/schemas/EconomicEvent"}},"baseCurrency":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"exchangeRates":{"type":"array","maxItems":100,"default":[],"items":{"$ref":"#/components/schemas/ExchangeRate"}},"currentCashBalance":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Legacy single balance; valid only for one input currency or explicit base-currency conversion.","deprecated":true},"currentCashBalances":{"type":"object","description":"Exact caller-reported balances keyed by currency.","additionalProperties":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."}},"public":{"type":"boolean","default":false}}},"SignatureMetadata":{"type":"object","additionalProperties":false,"required":["signatureAlgorithm","resultHash","signature","publicKeyId"],"properties":{"signatureAlgorithm":{"const":"Ed25519"},"resultHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"signature":{"type":"string","minLength":80},"publicKeyId":{"type":"string"}}},"SignedReport":{"oneOf":[{"$ref":"#/components/schemas/CurrentSignedReportSchema3"},{"$ref":"#/components/schemas/HistoricalSignedReportSchema1"},{"$ref":"#/components/schemas/HistoricalSignedReportSchema2"}],"discriminator":{"propertyName":"schemaVersion","mapping":{"1":"#/components/schemas/HistoricalSignedReportSchema1","2":"#/components/schemas/HistoricalSignedReportSchema2","3":"#/components/schemas/CurrentSignedReportSchema3"}}},"ReportVerificationRequest":{"oneOf":[{"$ref":"#/components/schemas/CurrentSignedReportSchema3"},{"$ref":"#/components/schemas/HistoricalSignedReportSchema1"},{"$ref":"#/components/schemas/HistoricalSignedReportSchema2"}],"discriminator":{"propertyName":"schemaVersion","mapping":{"1":"#/components/schemas/HistoricalSignedReportSchema1","2":"#/components/schemas/HistoricalSignedReportSchema2","3":"#/components/schemas/CurrentSignedReportSchema3"}}},"ReportVerificationResult":{"type":"object","additionalProperties":false,"required":["valid","reportSchemaVersion","publicKeyId"],"properties":{"valid":{"type":"boolean"},"hashValid":{"type":"boolean"},"signatureValid":{"type":"boolean"},"reason":{"type":"string"},"reportSchemaVersion":{"type":"string"},"publicKeyId":{"type":"string"}}},"WorkspaceCreationRequest":{"type":"object","additionalProperties":false,"required":[],"properties":{}},"CapabilityTokenResult":{"type":"object","additionalProperties":false,"required":["admin","write","read"],"properties":{"admin":{"type":"string","writeOnly":true},"write":{"type":"string","writeOnly":true},"read":{"type":"string","writeOnly":true}}},"WorkspaceQuota":{"type":"object","additionalProperties":false,"required":["retentionDays","eventLimit","calculationLimit","reportsIncluded"],"properties":{"retentionDays":{"type":"integer"},"eventLimit":{"type":"integer"},"calculationLimit":{"type":"integer"},"reportsIncluded":{"type":"integer"}}},"WorkspaceCreationResult":{"type":"object","additionalProperties":false,"required":["workspaceId","tokens","quota","expiresAt","documentation","warning"],"properties":{"workspaceId":{"type":"string","pattern":"^ws_"},"tokens":{"$ref":"#/components/schemas/CapabilityTokenResult"},"quota":{"$ref":"#/components/schemas/WorkspaceQuota"},"expiresAt":{"type":"string","format":"date-time"},"documentation":{"type":"string","format":"uri"},"warning":{"type":"string"}}},"WorkspaceExtensionRequest":{"type":"object","additionalProperties":false,"required":[],"properties":{}},"WorkspaceExtensionResult":{"type":"object","additionalProperties":false,"required":["extended","addedRetentionDays","addedEvents"],"properties":{"extended":{"type":"boolean"},"addedRetentionDays":{"type":"integer"},"addedEvents":{"type":"integer"}}},"EventWriteResult":{"type":"object","additionalProperties":false,"required":["inserted","duplicates","total"],"properties":{"inserted":{"type":"integer"},"duplicates":{"type":"integer"},"total":{"type":"integer"}}},"PaginatedEventResponse":{"type":"object","additionalProperties":false,"required":["events","nextCursor"],"properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/EconomicEvent"}},"nextCursor":{"oneOf":[{"type":"string"},{"type":"null"}]}}},"PaymentInfo":{"type":"object","additionalProperties":false,"required":["serviceVersion","gitCommit","buildTimestamp","calculationSchemaVersion","calculationEngineVersion","analysisVersion","currentSignedReportSchemaVersion","supportedSignedReportSchemaVersions","economicEventSchemaVersion","x402ProtocolVersion","protocolVersion","runtimeEnvironment","paymentMode","testnet","network","assetSymbol","asset","assetDecimals","eip712Name","eip712Version","prices","price","facilitatorType","paidResourceUrl","payTo"],"properties":{"serviceVersion":{"const":"1.0.5"},"gitCommit":{"type":"string","minLength":1},"buildTimestamp":{"type":"string","format":"date-time"},"calculationSchemaVersion":{"const":"2"},"calculationEngineVersion":{"const":"2.0.0"},"analysisVersion":{"const":"2.0.0"},"currentSignedReportSchemaVersion":{"const":"3"},"supportedSignedReportSchemaVersions":{"type":"array","const":["1","2","3"]},"economicEventSchemaVersion":{"const":"1"},"x402ProtocolVersion":{"const":2},"protocolVersion":{"const":2},"runtimeEnvironment":{"type":"string","enum":["development","test","production"]},"paymentMode":{"type":"string","enum":["testnet","mainnet"]},"testnet":{"type":"boolean"},"network":{"type":"string"},"assetSymbol":{"const":"USDC"},"asset":{"type":"string"},"assetDecimals":{"type":"integer","const":6},"eip712Name":{"type":"string","minLength":1},"eip712Version":{"type":"string","minLength":1},"prices":{"type":"object","additionalProperties":{"type":"string"}},"price":{"type":"string"},"facilitatorType":{"type":"string"},"paidResourceUrl":{"type":"string","format":"uri"},"payTo":{"type":"string"}}},"StructuredApiError":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}},"X402PaymentError":{"type":"object","additionalProperties":false,"required":["x402Version","error","resource","accepts"],"properties":{"x402Version":{"const":2},"error":{"type":"string"},"resource":{"type":"object","additionalProperties":false,"required":["url","description","mimeType"],"properties":{"url":{"type":"string","format":"uri"},"description":{"type":"string"},"mimeType":{"type":"string"}}},"accepts":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["scheme","network","amount","asset","payTo"],"properties":{"scheme":{"const":"exact"},"network":{"type":"string"},"amount":{"type":"string"},"asset":{"type":"string"},"payTo":{"type":"string"}}}},"extensions":{"type":"object","additionalProperties":true}}},"RateLimitError":{"$ref":"#/components/schemas/StructuredApiError"},"ValidationError":{"$ref":"#/components/schemas/StructuredApiError"},"CalculationResultV1":{"type":"object","additionalProperties":false,"required":["schemaVersion","calculationEngineVersion","calculatedAt","inputEventCount","acceptedEventCount","rejectedEventCount","duplicateEventCount","profitAffectingEventCount","profitExcludedEventCount","cashFlowAffectingEventCount","cashFlowExcludedEventCount","currencyPolicy","totals","breakdowns","burnRate","runway","dataCoverage","profitExcludedEvents","rejectedEvents","warnings","formulas"],"properties":{"schemaVersion":{"const":"1"},"calculationEngineVersion":{"type":"string","minLength":1},"calculatedAt":{"type":"string","format":"date-time"},"inputEventCount":{"type":"integer","minimum":0},"acceptedEventCount":{"type":"integer","minimum":0},"rejectedEventCount":{"type":"integer","minimum":0},"duplicateEventCount":{"type":"integer","minimum":0},"profitAffectingEventCount":{"type":"integer","minimum":0},"profitExcludedEventCount":{"type":"integer","minimum":0},"cashFlowAffectingEventCount":{"type":"integer","minimum":0},"cashFlowExcludedEventCount":{"type":"integer","minimum":0},"currencyPolicy":{"$ref":"#/components/schemas/CurrencyPolicy"},"totals":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ProfitSummary"}},"breakdowns":{"type":"object","additionalProperties":false,"required":["spendByAgent","spendByVenture","spendByExperiment","revenueByVenture","revenueByCustomer","profitByVenture","experimentReturnOnSpend"],"properties":{"spendByAgent":{"$ref":"#/components/schemas/AgentBreakdown"},"spendByVenture":{"$ref":"#/components/schemas/VentureBreakdown"},"spendByExperiment":{"$ref":"#/components/schemas/ExperimentBreakdown"},"revenueByVenture":{"$ref":"#/components/schemas/VentureBreakdown"},"revenueByCustomer":{"type":"object","additionalProperties":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."}},"profitByVenture":{"type":"object","additionalProperties":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."}},"experimentReturnOnSpend":{"type":"object","additionalProperties":{"type":"object","additionalProperties":false,"required":["value","status"],"properties":{"value":{"oneOf":[{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},{"type":"null"}]},"status":{"type":"string","enum":["available","insufficient_data"]},"unit":{"type":"string"},"period":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}}}},"burnRate":{"type":"object","additionalProperties":false,"required":["value","status"],"properties":{"value":{"oneOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},{"type":"null"}]},"status":{"type":"string","enum":["available","insufficient_data"]},"unit":{"type":"string"},"period":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}},"runway":{"type":"object","additionalProperties":false,"required":["value","status"],"properties":{"value":{"oneOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},{"type":"null"}]},"status":{"type":"string","enum":["available","insufficient_data"]},"unit":{"type":"string"},"period":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}},"dataCoverage":{"$ref":"#/components/schemas/DataCoverage"},"profitExcludedEvents":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["externalId","reason"],"properties":{"externalId":{"type":"string"},"reason":{"type":"string"}}}},"rejectedEvents":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["externalId","reason"],"properties":{"externalId":{"type":"string"},"reason":{"type":"string"}}}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/CalculationWarning"}},"formulas":{"type":"object","additionalProperties":{"type":"string"}}}},"CustomerEconomics":{"type":"object","additionalProperties":false,"required":["grossRevenue","refunds","netRevenue","revenueEventCount","refundEventCount"],"properties":{"grossRevenue":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"refunds":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"netRevenue":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"revenueEventCount":{"type":"integer","minimum":0},"refundEventCount":{"type":"integer","minimum":0}}},"VentureEconomics":{"type":"object","additionalProperties":false,"required":["grossRevenue","refunds","netRevenue","attributedCosts","netContribution","returnOnSpend","revenueEventCount","refundEventCount","costEventCount","status"],"properties":{"grossRevenue":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"refunds":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"netRevenue":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"revenueEventCount":{"type":"integer","minimum":0},"refundEventCount":{"type":"integer","minimum":0},"attributedCosts":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"netContribution":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"returnOnSpend":{"type":"object","additionalProperties":false,"required":["value","status"],"properties":{"value":{"oneOf":[{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},{"type":"null"}]},"status":{"type":"string","enum":["available","insufficient_data"]},"unit":{"type":"string"},"period":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}},"costEventCount":{"type":"integer","minimum":0},"status":{"type":"string","enum":["complete","zero_attributed_costs"]}}},"ExperimentEconomics":{"type":"object","additionalProperties":false,"required":["grossRevenue","refunds","netRevenue","attributedCosts","netContribution","returnOnSpend","revenueEventCount","refundEventCount","costEventCount","status"],"properties":{"grossRevenue":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"refunds":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},"netRevenue":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"revenueEventCount":{"type":"integer","minimum":0},"refundEventCount":{"type":"integer","minimum":0},"attributedCosts":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"netContribution":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"returnOnSpend":{"type":"object","additionalProperties":false,"required":["value","status"],"properties":{"value":{"oneOf":[{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},{"type":"null"}]},"status":{"type":"string","enum":["available","insufficient_data"]},"unit":{"type":"string"},"period":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}},"costEventCount":{"type":"integer","minimum":0},"status":{"type":"string","enum":["complete","zero_attributed_costs"]}}},"CurrencyMoneyBreakdown":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."}}},"CurrencyCustomerEconomics":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomerEconomics"}}},"CurrencyVentureEconomics":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/VentureEconomics"}}},"CurrencyExperimentEconomics":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ExperimentEconomics"}}},"CurrencyMetricMap":{"type":"object","additionalProperties":{"type":"object","additionalProperties":false,"required":["value","status"],"properties":{"value":{"oneOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."},{"type":"null"}]},"status":{"type":"string","enum":["available","insufficient_data"]},"unit":{"type":"string"},"period":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"CurrencyEvidenceCoverage":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EvidenceCoverage"}},"DataCoverageV2":{"type":"object","additionalProperties":false,"required":["revenueByEvidencePercent","expensesByEvidencePercent","missingCostCategories","unsupportedClaims","unmatchedTransfers","duplicateExternalIds","conflictingEvents","unverifiedBlockchainReferences"],"properties":{"revenueByEvidencePercent":{"$ref":"#/components/schemas/CurrencyEvidenceCoverage"},"expensesByEvidencePercent":{"$ref":"#/components/schemas/CurrencyEvidenceCoverage"},"missingCostCategories":{"type":"array","items":{"type":"string"}},"unsupportedClaims":{"type":"array","items":{"type":"string"}},"unmatchedTransfers":{"type":"array","items":{"type":"string"}},"duplicateExternalIds":{"type":"array","items":{"type":"string"}},"conflictingEvents":{"type":"array","items":{"type":"string"}},"unverifiedBlockchainReferences":{"type":"array","items":{"type":"string"}}}},"CalculationResultV2":{"type":"object","additionalProperties":false,"required":["schemaVersion","calculationEngineVersion","calculatedAt","inputEventCount","acceptedEventCount","rejectedEventCount","duplicateEventCount","profitAffectingEventCount","profitExcludedEventCount","cashFlowAffectingEventCount","cashFlowExcludedEventCount","currencyPolicy","currentCashBalances","totals","breakdowns","burnRateByCurrency","runwayByCurrency","dataCoverage","profitExcludedEvents","rejectedEvents","warnings","formulas"],"properties":{"schemaVersion":{"const":"2"},"calculationEngineVersion":{"const":"2.0.0"},"calculatedAt":{"type":"string","format":"date-time"},"inputEventCount":{"type":"integer","minimum":0},"acceptedEventCount":{"type":"integer","minimum":0},"rejectedEventCount":{"type":"integer","minimum":0},"duplicateEventCount":{"type":"integer","minimum":0},"profitAffectingEventCount":{"type":"integer","minimum":0},"profitExcludedEventCount":{"type":"integer","minimum":0},"cashFlowAffectingEventCount":{"type":"integer","minimum":0},"cashFlowExcludedEventCount":{"type":"integer","minimum":0},"currencyPolicy":{"$ref":"#/components/schemas/CurrencyPolicy"},"currentCashBalances":{"type":"object","additionalProperties":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact non-negative decimal string; never binary floating point."}},"totals":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ProfitSummary"}},"breakdowns":{"type":"object","additionalProperties":false,"required":["spendByAgent","spendByVenture","spendByCategory","spendByExperiment","revenueByVenture","revenueByCustomer","profitByVenture","customerEconomics","ventureEconomics","experimentEconomics","unattributedCosts"],"properties":{"spendByAgent":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"spendByVenture":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"spendByCategory":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"spendByExperiment":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"revenueByVenture":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"revenueByCustomer":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"profitByVenture":{"$ref":"#/components/schemas/CurrencyMoneyBreakdown"},"customerEconomics":{"$ref":"#/components/schemas/CurrencyCustomerEconomics"},"ventureEconomics":{"$ref":"#/components/schemas/CurrencyVentureEconomics"},"experimentEconomics":{"$ref":"#/components/schemas/CurrencyExperimentEconomics"},"unattributedCosts":{"type":"object","additionalProperties":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."}}}},"burnRateByCurrency":{"$ref":"#/components/schemas/CurrencyMetricMap"},"runwayByCurrency":{"$ref":"#/components/schemas/CurrencyMetricMap"},"dataCoverage":{"$ref":"#/components/schemas/DataCoverageV2"},"profitExcludedEvents":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["externalId","reason"],"properties":{"externalId":{"type":"string"},"reason":{"type":"string"}}}},"rejectedEvents":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["externalId","reason"],"properties":{"externalId":{"type":"string"},"reason":{"type":"string"}}}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/CalculationWarning"}},"formulas":{"type":"object","additionalProperties":{"type":"string"}}}},"HistoricalSignedReportSchema1":{"type":"object","additionalProperties":false,"required":["schemaVersion","calculationVersion","reportId","reportTimestamp","workspaceId","coveredPeriod","calculation","evidenceStatement","publicKeyId","resultHash","signature","signatureAlgorithm","visibility"],"properties":{"schemaVersion":{"const":"1"},"calculationVersion":{"type":"string"},"reportId":{"type":"string","pattern":"^rpt_"},"reportTimestamp":{"type":"string","format":"date-time"},"workspaceId":{"oneOf":[{"type":"string"},{"type":"null"}]},"coveredPeriod":{"oneOf":[{"type":"object"},{"type":"null"}]},"calculation":{"$ref":"#/components/schemas/CalculationResultV1"},"evidenceStatement":{"type":"string"},"publicKeyId":{"type":"string"},"resultHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"signature":{"type":"string"},"signatureAlgorithm":{"const":"Ed25519"},"visibility":{"type":"string","enum":["private","public"]}}},"HistoricalSignedReportSchema2":{"type":"object","additionalProperties":false,"required":["schemaVersion","calculationVersion","reportId","reportTimestamp","workspaceId","coveredPeriod","calculation","evidenceStatement","publicKeyId","resultHash","signature","signatureAlgorithm","visibility"],"properties":{"schemaVersion":{"const":"2"},"calculationVersion":{"type":"string"},"reportId":{"type":"string","pattern":"^rpt_"},"reportTimestamp":{"type":"string","format":"date-time"},"workspaceId":{"oneOf":[{"type":"string"},{"type":"null"}]},"coveredPeriod":{"oneOf":[{"type":"object"},{"type":"null"}]},"calculation":{"$ref":"#/components/schemas/CalculationResultV1"},"evidenceStatement":{"type":"string"},"publicKeyId":{"type":"string"},"resultHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"signature":{"type":"string"},"signatureAlgorithm":{"const":"Ed25519"},"visibility":{"type":"string","enum":["private","public"]}}},"CurrentSignedReportSchema3":{"type":"object","additionalProperties":false,"required":["schemaVersion","calculationVersion","reportId","reportTimestamp","workspaceId","coveredPeriod","calculation","evidenceStatement","publicKeyId","resultHash","signature","signatureAlgorithm","visibility"],"properties":{"schemaVersion":{"const":"3"},"calculationVersion":{"const":"2.0.0"},"reportId":{"type":"string","pattern":"^rpt_"},"reportTimestamp":{"type":"string","format":"date-time"},"workspaceId":{"oneOf":[{"type":"string"},{"type":"null"}]},"coveredPeriod":{"oneOf":[{"type":"object"},{"type":"null"}]},"calculation":{"$ref":"#/components/schemas/CalculationResultV2"},"evidenceStatement":{"type":"string"},"publicKeyId":{"type":"string"},"resultHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"signature":{"type":"string"},"signatureAlgorithm":{"const":"Ed25519"},"visibility":{"type":"string","enum":["private","public"]}}},"AnalysisCurrencySummary":{"type":"object","additionalProperties":false,"required":["largestCostCategory","largestCostAgent","largestRevenueCustomer","largestRevenueVenture","profitableExperiments","unprofitableExperiments","experimentsSpendingWithoutRevenue","experimentsReceivingRevenueWithoutAttributedSpend","experimentsWithRefunds","unattributedCostAmount","costConcentrationPercent","revenueConcentrationPercent","missingAttribution","dataQualityWarnings","missingCostCategories"],"properties":{"largestCostCategory":{"oneOf":[{"type":"null"},{"type":"array","prefixItems":[{"type":"string"},{"oneOf":[{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},{"$ref":"#/components/schemas/CustomerEconomics"},{"$ref":"#/components/schemas/VentureEconomics"}]}],"minItems":2,"maxItems":2}]},"largestCostAgent":{"oneOf":[{"type":"null"},{"type":"array","prefixItems":[{"type":"string"},{"oneOf":[{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},{"$ref":"#/components/schemas/CustomerEconomics"},{"$ref":"#/components/schemas/VentureEconomics"}]}],"minItems":2,"maxItems":2}]},"largestRevenueCustomer":{"oneOf":[{"type":"null"},{"type":"array","prefixItems":[{"type":"string"},{"oneOf":[{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},{"$ref":"#/components/schemas/CustomerEconomics"},{"$ref":"#/components/schemas/VentureEconomics"}]}],"minItems":2,"maxItems":2}]},"largestRevenueVenture":{"oneOf":[{"type":"null"},{"type":"array","prefixItems":[{"type":"string"},{"oneOf":[{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},{"$ref":"#/components/schemas/CustomerEconomics"},{"$ref":"#/components/schemas/VentureEconomics"}]}],"minItems":2,"maxItems":2}]},"profitableExperiments":{"type":"array","items":{"type":"string"}},"unprofitableExperiments":{"type":"array","items":{"type":"string"}},"experimentsSpendingWithoutRevenue":{"type":"array","items":{"type":"string"}},"experimentsReceivingRevenueWithoutAttributedSpend":{"type":"array","items":{"type":"string"}},"experimentsWithRefunds":{"type":"array","items":{"type":"string"}},"unattributedCostAmount":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},"costConcentrationPercent":{"type":"object","additionalProperties":false,"required":["value","status"],"properties":{"value":{"oneOf":[{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},{"type":"null"}]},"status":{"type":"string","enum":["available","insufficient_data"]},"unit":{"type":"string"},"period":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}},"revenueConcentrationPercent":{"type":"object","additionalProperties":false,"required":["value","status"],"properties":{"value":{"oneOf":[{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Exact signed decimal string; never binary floating point."},{"type":"null"}]},"status":{"type":"string","enum":["available","insufficient_data"]},"unit":{"type":"string"},"period":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}},"missingAttribution":{"type":"boolean"},"dataQualityWarnings":{"type":"array","items":{"type":"string"}},"missingCostCategories":{"type":"array","items":{"type":"string"}}}}}},"x-product":{"serviceVersion":"1.0.5","gitCommit":"60a209b","buildTimestamp":"2026-07-29T11:44:29Z","calculationSchemaVersion":"2","calculationEngineVersion":"2.0.0","analysisVersion":"2.0.0","currentSignedReportSchemaVersion":"3","supportedSignedReportSchemaVersions":["1","2","3"],"economicEventSchemaVersion":"1","x402ProtocolVersion":2,"asset":"USDC","network":"eip155:8453","retentionDays":30,"eventLimit":1000,"calculationLimit":100}}