{
  "openapi": "3.1.0",
  "info": {
    "title": "InferenceView Public Observation API",
    "version": "1.0.0",
    "description": "Free, read-only Tempo finalized RPC observations. Not a comprehensive agent-commerce feed. Exact amounts are decimal strings. Scores describe available evidence, not honesty or task success. Current supported score stages: 1 and 2. Paid plans and machine payment settlement are not enabled. Cost and change observations are public. Private outcome intake requires producer authentication; see /docs/outcomes.md.",
    "termsOfService": "https://inferenceview.com/terms"
  },
  "servers": [
    {
      "url": "https://inferenceview.com"
    }
  ],
  "security": [],
  "paths": {
    "/api/status": {
      "get": {
        "operationId": "getSourceStatus",
        "summary": "Inspect source freshness and bounded coverage",
        "responses": {
          "200": {
            "description": "Observed data; missing fields do not establish zero activity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; back off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; retry with exponential backoff",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/coverage": {
      "get": {
        "operationId": "getCoverage",
        "summary": "Read continuous observed block intervals",
        "responses": {
          "200": {
            "description": "Observed data; missing fields do not establish zero activity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Coverage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; back off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; retry with exponential backoff",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/transactions": {
      "get": {
        "operationId": "listTransactions",
        "summary": "List observed Tempo transactions",
        "responses": {
          "200": {
            "description": "Observed data; missing fields do not establish zero activity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; back off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; retry with exponential backoff",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "description": "Inclusive UTC Unix seconds",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "until",
            "in": "query",
            "description": "Exclusive UTC Unix seconds; fix for stable pagination",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Wallet, hash, symbol or venue; alphanumeric and : . _ - spaces, up to 140 characters",
            "schema": {
              "type": "string",
              "maxLength": 140
            }
          },
          {
            "name": "asset",
            "in": "query",
            "description": "Token contract recommended; symbol also supported",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exchange",
            "in": "query",
            "description": "Exact venue name or unknown",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "execution",
            "in": "query",
            "description": "Execution result",
            "schema": {
              "type": "string",
              "enum": [
                "success",
                "failed",
                "unknown"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0
            }
          }
        ]
      }
    },
    "/api/metrics": {
      "get": {
        "operationId": "getMetrics",
        "summary": "Aggregate up to 50,000 latest matching observations",
        "responses": {
          "200": {
            "description": "Observed data; missing fields do not establish zero activity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Metrics"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; back off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; retry with exponential backoff",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "description": "Inclusive UTC Unix seconds",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "until",
            "in": "query",
            "description": "Exclusive UTC Unix seconds; fix for stable pagination",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Wallet, hash, symbol or venue; alphanumeric and : . _ - spaces, up to 140 characters",
            "schema": {
              "type": "string",
              "maxLength": 140
            }
          },
          {
            "name": "asset",
            "in": "query",
            "description": "Token contract recommended; symbol also supported",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exchange",
            "in": "query",
            "description": "Exact venue name or unknown",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "execution",
            "in": "query",
            "description": "Execution result",
            "schema": {
              "type": "string",
              "enum": [
                "success",
                "failed",
                "unknown"
              ]
            }
          }
        ]
      }
    },
    "/api/transactions/{hash}": {
      "get": {
        "operationId": "getTransactionEvidence",
        "summary": "Inspect full evidence for a retained transaction",
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Observed data; missing fields do not establish zero activity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; back off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; retry with exponential backoff",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not observed in this archive; not proof of nonexistence",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/export": {
      "get": {
        "operationId": "exportTransactionsCsv",
        "summary": "Download the newest 10,000 matching observations as CSV",
        "description": "The export cap is 10,000. Offset is ignored. Full integrity stages and raw evidence are in JSON endpoints.",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "description": "Inclusive UTC Unix seconds",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "until",
            "in": "query",
            "description": "Exclusive UTC Unix seconds; fix for stable pagination",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Wallet, hash, symbol or venue; alphanumeric and : . _ - spaces, up to 140 characters",
            "schema": {
              "type": "string",
              "maxLength": 140
            }
          },
          {
            "name": "asset",
            "in": "query",
            "description": "Token contract recommended; symbol also supported",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exchange",
            "in": "query",
            "description": "Exact venue name or unknown",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "execution",
            "in": "query",
            "description": "Execution result",
            "schema": {
              "type": "string",
              "enum": [
                "success",
                "failed",
                "unknown"
              ]
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Invalid query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; back off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; retry with exponential backoff",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "CSV observations, newest first",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/providers": {
      "get": {
        "operationId": "searchProviders",
        "summary": "Search source-attributed provider listings",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "network",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "check",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 20000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provider listings, dated endpoint checks, source freshness and pagination"
          }
        }
      }
    },
    "/api/providers/{domain}": {
      "get": {
        "operationId": "getProvider",
        "summary": "Inspect provider profile and dated evidence",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provider profile; domain control does not prove wallet control"
          },
          "404": {
            "description": "Provider not listed"
          }
        }
      }
    },
    "/api/intelligence/status": {
      "get": {
        "operationId": "intelligence_status",
        "summary": "Collection health, coverage and archive verification",
        "description": "Source observations only. Unknown fields remain null. Advertised prices and endpoint checks do not establish task outcomes.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Versioned intelligence observations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "503": {
            "description": "Collection temporarily unavailable"
          }
        }
      }
    },
    "/api/intelligence/offers": {
      "get": {
        "operationId": "intelligence_offers",
        "summary": "Advertised service payment options",
        "description": "Source observations only. Unknown fields remain null. Advertised prices and endpoint checks do not establish task outcomes.",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "name": "since",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "until",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Versioned intelligence observations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "503": {
            "description": "Collection temporarily unavailable"
          }
        }
      }
    },
    "/api/intelligence/changes": {
      "get": {
        "operationId": "intelligence_changes",
        "summary": "Dated source changes",
        "description": "Source observations only. Unknown fields remain null. Advertised prices and endpoint checks do not establish task outcomes.",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "name": "since",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "until",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Versioned intelligence observations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "503": {
            "description": "Collection temporarily unavailable"
          }
        }
      }
    },
    "/api/intelligence/history": {
      "get": {
        "operationId": "intelligence_history",
        "summary": "Provider observation history; domain or service_id required",
        "description": "Source observations only. Unknown fields remain null. Advertised prices and endpoint checks do not establish task outcomes.",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "name": "since",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "until",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Versioned intelligence observations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "503": {
            "description": "Collection temporarily unavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "Integrity": {
        "type": "object",
        "required": [
          "score",
          "maximum",
          "version",
          "stages",
          "scope"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 5
          },
          "maximum": {
            "type": "integer",
            "const": 5
          },
          "status": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "evaluated_at": {
            "type": "string",
            "format": "date-time"
          },
          "scope": {
            "type": "string"
          },
          "independent_consensus_verified": {
            "type": "boolean"
          },
          "stages": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "level",
                "label",
                "status",
                "reason"
              ],
              "properties": {
                "level": {
                  "type": "integer"
                },
                "label": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pass",
                    "fail",
                    "unknown"
                  ]
                },
                "reason": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Transaction": {
        "type": "object",
        "required": [
          "hash",
          "time",
          "height",
          "integrity"
        ],
        "properties": {
          "sender": {
            "type": [
              "string",
              "null"
            ]
          },
          "recipient": {
            "type": [
              "string",
              "null"
            ]
          },
          "asset": {
            "type": [
              "string",
              "null"
            ]
          },
          "asset_contract": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "nominal": {
            "type": [
              "string",
              "null"
            ]
          },
          "fee": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange": {
            "type": [
              "string",
              "null"
            ]
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": [
              "string",
              "null"
            ]
          },
          "hash": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{64}$"
          },
          "chain_id": {
            "type": "integer",
            "const": 4217
          },
          "time": {
            "type": "integer",
            "description": "UTC Unix seconds reported by the source block."
          },
          "height": {
            "type": "integer"
          },
          "execution": {
            "type": "string",
            "enum": [
              "success",
              "failed",
              "unknown"
            ]
          },
          "decode": {
            "type": "string"
          },
          "integrity": {
            "$ref": "#/components/schemas/Integrity"
          }
        },
        "additionalProperties": true
      },
      "TransactionDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Transaction"
          },
          {
            "type": "object",
            "properties": {
              "transaction": {
                "description": "Retained observation; may be absent or null for older samples."
              },
              "receipt": {
                "description": "Retained observation; may be absent or null for older samples."
              },
              "evidence": {
                "description": "Retained observation; may be absent or null for older samples."
              },
              "legs": {
                "description": "Retained observation; may be absent or null for older samples."
              },
              "calls": {
                "description": "Retained observation; may be absent or null for older samples."
              },
              "forensics": {
                "description": "Retained observation; may be absent or null for older samples."
              },
              "unknown": {
                "description": "Retained observation; may be absent or null for older samples."
              }
            }
          }
        ]
      },
      "TransactionList": {
        "type": "object",
        "required": [
          "total",
          "limit",
          "offset",
          "rows",
          "as_of"
        ],
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            }
          }
        }
      },
      "Status": {
        "type": "object",
        "properties": {
          "chain_id": {
            "type": "integer"
          },
          "source": {
            "type": "string"
          },
          "lag_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "total_transactions": {
            "type": "integer"
          },
          "checkpoint": {
            "type": [
              "object",
              "null"
            ]
          },
          "collector": {
            "type": "object"
          },
          "coverage": {
            "type": "string"
          },
          "service_sources": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "independent_consensus_verified": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "Coverage": {
        "type": "object",
        "properties": {
          "intervals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "first": {
                  "type": "integer"
                },
                "last": {
                  "type": "integer"
                },
                "start": {
                  "type": "integer"
                },
                "end": {
                  "type": "integer"
                },
                "blocks": {
                  "type": "integer"
                }
              }
            }
          },
          "historical": {
            "type": [
              "object",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "Metrics": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "analyzed": {
            "type": "integer"
          },
          "truncated": {
            "type": "boolean"
          },
          "nominal": {
            "type": "string"
          },
          "fees": {
            "type": "string"
          },
          "value_method": {
            "type": "string"
          },
          "rate": {
            "type": [
              "number",
              "null"
            ]
          },
          "task_outcomes": {
            "type": [
              "object",
              "null"
            ]
          }
        },
        "additionalProperties": true
      }
    }
  },
  "externalDocs": {
    "url": "https://inferenceview.com/developers"
  }
}
