Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Tereno — verifiable evidence for autonomous agents on Base…
version: 6.0.0
description: 'Verifiable evidence for autonomous agents. Tereno answers six questions and no
others, each one paid per call with x402 in USDC on Base and each one returning
the evidence behind the answer, the point it stops being valid, and a receipt.
Onchain evidence: token.launch.guard simulates DEX exit execution and verifies LP reserves;
token.holders.guard audits top 10 holders concentration and cabal funding clusters;
token.metadata reads a Base token''s name, symbol, decimals and total supply;
chain.snapshot returns the latest block, timestamp, base fee and suggested gas fees;
contract.guard returns a bounded verdict over executable code, proxy signals and pause state.
External evidence: prediction.evidence returns current sourced claims supporting
or contradicting a prediction-market proposition, each with its source.
Deterministic answers are computed once and reused: a later agent asking the same
question inside the validity window is served the stored answer at a lower price,
and the wallet that produced it earns a bounded, non-transferable credit. Agents
can also publish deterministic work they computed themselves; publications are
audited by recomputation before they can be reused. Unmet demand is exposed as
open bounties. Earned credit is spent by sending x-agent-wallet on any invoke:
the 402 challenge comes back priced net of that credit (X-Tereno-Credit), and
the payment must be signed by the same wallet.
A free open feed of new Base token launches and their token.launch.guard results
is at GET /api/v1/launches (also /launches).
Capabilities Tereno has retired answer 410 with error capability_retired and
cannot be bought; their historical receipts and artifacts remain readable.
Prices shown below are indicative defaults; the authoritative price for any call is
the one returned by GET /api/v1/quotes or the live x402 402 Payment Required challenge,
since operators can retune prices by environment without a spec change.'
contact:
name: Tereno
email: ops@tereno.xyz
url: https://www.tereno.xyz
x-guidance: 'Ask, verify, pay, reuse. Before acting, buy exactly the evidence the next action
needs; every response is a decision contract with a verdict, the evidence behind
it, explicit limitations, a validity window and a receipt. Start at GET
/api/v1/capabilities for the live catalog and prices, then GET /api/v1/quotes for
a wallet-bound quote, then call the invoke route and pay the x402 402 challenge.
When verified work already exists, reusing it costs less than recomputing it, and
the wallet that produced it earns a bounded credit. Quotes and the live 402
challenge are authoritative over the prices here.
'
servers:
- url: https://www.tereno.xyz
description: Production
- url: http://localhost:3000
description: Local development
tags:
- name: Capabilities
paths:
/api/v1/capabilities:
get:
security: []
summary: List capability contracts, status, pricing and endpoints
description: 'Authoritative pricing. The prices declared per operation in this spec are indicative and are
checked against this catalog on every build; the live 402 challenge remains the final word.
The response also carries a `proposed` section: capabilities Tereno has declared but not built,
with no price and no endpoint, which are free to name at POST /api/v1/demand-pledges. That is
how Tereno decides what to build next, so a name that is absent from both sections is worth
pledging rather than assuming.'
responses:
'200':
description: Capability catalog, including the `proposed` section of unbuilt capabilities
tags:
- Capabilities
operationId: getApiV1Capabilities
x-operation-id-source: derived
/api/v1/capabilities/stats:
get:
security: []
summary: Public 30-day capability metrics
description: 'Aggregated, anonymized network metrics for the last 30 days: settled invocations,
unique paying agents, retention (including the full-price second-day repeat rate),
cache reuse, reuse-dividend credits and reliability percentiles. Simulated and
excluded traffic is filtered out. Rate limited; cached for 30 seconds.'
responses:
'200':
description: Capability metrics window
'429':
description: Rate limit exceeded
tags:
- Capabilities
operationId: getApiV1CapabilitiesStats
x-operation-id-source: derived
/api/v1/capabilities/contract.guard/invoke:
get:
summary: Paid reusable Base contract preflight
description: 'Combines a long-lived bytecode fingerprint with fresh EIP-1967 implementation and paused() checks. Eligible cross-wallet reuse returns a bounded credit dividend to the seeder.
This is a bounded preflight, not a security audit.'
parameters:
- name: address
in: query
required: true
schema:
type: string
- name: quote
in: query
required: false
schema:
type: string
- name: PAYMENT-SIGNATURE
in: header
required: false
schema:
type: string
- name: x-agent-wallet
in: header
required: false
description: Your payer address. When set, the 402 challenge is priced net of the reuse-dividend credit this wallet has earned (X-Tereno-Credit says how much). The payment must be signed by this same wallet.
schema:
type: string
x-payment-info:
price:
mode: dynamic
currency: USD
min: '0.01'
max: '0.03'
protocols:
- x402: {}
responses:
'200':
$ref: '#/components/responses/CapabilityResult'
'402':
description: x402 payment required. With x-agent-wallet, X-Tereno-Credit reports the earned credit already applied to the challenge price.
tags:
- Capabilities
operationId: getApiV1CapabilitiesContractGuardInvoke
x-operation-id-source: derived
/api/v1/capabilities/token.metadata/invoke:
get:
summary: Paid cache-shared Base token metadata read — $0.01–$0.03 USDC indicative (see…
description: 'Reads a token''s name, symbol, decimals and totalSupply (with bytes32-label
fallback) in one typed call. Metadata is self-reported by the contract and
can imitate other tokens; the response links contract.guard for a safety verdict.'
parameters:
- name: address
in: query
required: true
schema:
type: string
- name: quote
in: query
required: false
schema:
type: string
- name: PAYMENT-SIGNATURE
in: header
required: false
schema:
type: string
- name: x-agent-wallet
in: header
required: false
description: Your payer address. When set, the 402 challenge is priced net of the reuse-dividend credit this wallet has earned (X-Tereno-Credit says how much). The payment must be signed by this same wallet.
schema:
type: string
x-payment-info:
price:
mode: dynamic
currency: USD
min: '0.01'
max: '0.03'
protocols:
- x402: {}
responses:
'200':
$ref: '#/components/responses/CapabilityResult'
'402':
description: x402 payment required. With x-agent-wallet, X-Tereno-Credit reports the earned credit already applied to the challenge price.
tags:
- Capabilities
operationId: getApiV1CapabilitiesTokenMetadataInvoke
x-operation-id-source: derived
/api/v1/capabilities/chain.snapshot/invoke:
get:
summary: Paid Base chain snapshot (latest block, timestamp, gas fees) — $0.01–$0.02 USDC…
description: 'No parameters. Latest block number, timestamp, base fee and suggested
EIP-1559 fees, shared as a single global artifact within a short TTL.
The fastest way to exercise an x402 payment loop end to end.'
parameters:
- name: quote
in: query
required: false
schema:
type: string
- name: PAYMENT-SIGNATURE
in: header
required: false
schema:
type: string
- name: x-agent-wallet
in: header
required: false
description: Your payer address. When set, the 402 challenge is priced net of the reuse-dividend credit this wallet has earned (X-Tereno-Credit says how much). The payment must be signed by this same wallet.
schema:
type: string
x-payment-info:
price:
mode: dynamic
currency: USD
min: '0.01'
max: '0.02'
protocols:
- x402: {}
responses:
'200':
$ref: '#/components/responses/CapabilityResult'
'402':
description: x402 payment required. With x-agent-wallet, X-Tereno-Credit reports the earned credit already applied to the challenge price.
tags:
- Capabilities
operationId: getApiV1CapabilitiesChainSnapshotInvoke
x-operation-id-source: derived
/api/v1/capabilities/token.launch.guard/invoke:
get:
summary: Paid reusable DEX exit simulation and launch guard
description: 'Simulates sell/exit of a funded balance against a freshly launched Base token
via eth_call, verifies DEX LP reserves and burn/lock status, checks holder
concentration and cabal clusters, and inspects owner powers (mint, blacklist, fee traps).'
parameters:
- name: address
in: query
required: true
schema:
type: string
- name: quote
in: query
required: false
schema:
type: string
- name: PAYMENT-SIGNATURE
in: header
required: false
schema:
type: string
- name: x-agent-wallet
in: header
required: false
description: Your payer address. When set, the 402 challenge is priced net of the reuse-dividend credit this wallet has earned (X-Tereno-Credit says how much). The payment must be signed by this same wallet.
schema:
type: string
x-payment-info:
price:
mode: dynamic
currency: USD
min: '0.02'
max: '0.07'
protocols:
- x402: {}
responses:
'200':
$ref: '#/components/responses/CapabilityResult'
'402':
description: x402 payment required. With x-agent-wallet, X-Tereno-Credit reports the earned credit already applied to the challenge price.
tags:
- Capabilities
operationId: getApiV1CapabilitiesTokenLaunchGuardInvoke
x-operation-id-source: derived
/api/v1/capabilities/token.holders.guard/invoke:
get:
summary: Paid Base ERC-20 holder concentration and cabal cluster preflight
description: 'Audits top 10 holders concentration (excluding LP and burn addresses) and traces
ETH funding origins to identify cabal clusters funded by the same deployer or funder.
Returns a bounded allow/review/block verdict with cluster evidence.'
parameters:
- name: address
in: query
required: true
schema:
type: string
- name: quote
in: query
required: false
schema:
type: string
- name: PAYMENT-SIGNATURE
in: header
required: false
schema:
type: string
- name: x-agent-wallet
in: header
required: false
description: Your payer address. When set, the 402 challenge is priced net of the reuse-dividend credit this wallet has earned (X-Tereno-Credit says how much). The payment must be signed by this same wallet.
schema:
type: string
x-payment-info:
price:
mode: dynamic
currency: USD
min: '0.01'
max: '0.04'
protocols:
- x402: {}
responses:
'200':
$ref: '#/components/responses/CapabilityResult'
'402':
description: x402 payment required. With x-agent-wallet, X-Tereno-Credit reports the earned credit already applied to the challenge price.
tags:
- Capabilities
operationId: getApiV1CapabilitiesTokenHoldersGuardInvoke
x-operation-id-source: derived
/api/v1/capabilities/prediction.evidence/invoke:
post:
summary: Verifiable evidence for or against a prediction-market proposition
description: 'Finds current, sourced evidence that supports, contradicts or is neutral
toward a prediction-market proposition. Each item carries its source,
source URL, observation time and direction; a claim without provenance is
not returned as evidence. Content-addressed, with a verifiable receipt.
It does not price the market, output a probability, or advise or execute
a trade. Prices here are indicative; the live 402 is authoritative.'
parameters:
- name: via
in: query
required: false
schema:
type: string
maxLength: 32
description: Discovery channel marker carried by the listing that referred you (for example, via=circle). Attribution only; it never changes the price or the answer.
- name: PAYMENT-SIGNATURE
in: header
required: false
schema:
type: string
- name: x-agent-wallet
in: header
required: false
description: Your payer address. When set, the 402 challenge is priced net of the reuse-dividend credit this wallet has earned (X-Tereno-Credit says how much). The payment must be signed by this same wallet.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- question
properties:
question:
type: string
minLength: 5
maxLength: 2000
description: The proposition to audit.
market:
type: string
description: Market platform identifier, for example polymarket, omen or kalshi. Any prediction market is accepted; none is required.
marketUrl:
type: string
format: uri
description: Optional market page, used to extract resolution rules.
context:
type: object
description: Optional contextual metadata from the calling agent.
x-payment-info:
price:
mode: dynamic
currency: USD
min: '0.01'
max: '0.05'
protocols:
- x402: {}
responses:
'200':
$ref: '#/components/responses/CapabilityResult'
'400':
description: Invalid or missing question
'402':
description: x402 payment required. With x-agent-wallet, X-Tereno-Credit reports the earned credit already applied to the challenge price.
'409':
description: This payment authorization was already settled; the body carries the receipt of the execution it bought
tags:
- Capabilities
operationId: postApiV1CapabilitiesPredictionEvidenceInvoke
x-operation-id-source: derived
components:
schemas:
CapabilityResult:
type: object
required:
- capabilityId
- invocationId
- verdict
- result
- receiptUrl
properties:
capabilityId:
type: string
invocationId:
type: string
verdict:
type: string
enum:
- allow
- review
- block
result:
type: object
properties:
reasonCodes:
type: array
items:
type: string
summary:
type: string
evidence:
type: object
additionalProperties: true
computedAtBlock:
type: integer
validUntilBlock:
type: integer
limitations:
type: array
items:
type: string
pricing:
type: object
properties:
quotedCacheStatus:
type: string
enum:
- hit
- partial
- miss
actualCacheStatus:
type: string
enum:
- hit
- partial
- miss
listPriceUsd:
type: number
creditAppliedUsd:
type: number
pricePaidUsd:
type: number
receiptUrl:
type: string
nextCall:
description: 'The validity boundary of this answer, as structure rather than prose. `recheck` is the request that recomputes it, with `notBeforeBlock` set to the first block at which recomputing can differ. `watch` names the capability that reports what changed between two observations of the same subject, and is null when this capability already is that. Null for answers with no block window. Descriptive only: nothing here is required, and the answer is complete for the window it states.'
type:
- object
- 'null'
additionalProperties: true
properties:
validUntilBlock:
type: integer
validForSeconds:
type:
- integer
- 'null'
recheck:
type: object
additionalProperties: true
properties:
capabilityId:
type: string
method:
type: string
enum:
- GET
- POST
url:
type: string
body:
type:
- object
- 'null'
additionalProperties: true
notBeforeBlock:
type: integer
listPriceUsdCeiling:
type: number
payment:
type: string
enum:
- x402
watch:
type:
- object
- 'null'
additionalProperties: true
evidenceReference:
description: Portable provenance/reproduction pointer. Present on every capability response; private artifacts explicitly state shareable=false.
type: object
additionalProperties: true
responses:
CapabilityResult:
description: Decision result; PAYMENT-RESPONSE is attached after successful x402 settlement
headers:
PAYMENT-RESPONSE:
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/CapabilityResult'
x-agent-auth:
summary: Free-but-signed routes authenticate with an EIP-712 typed-data signature over the action being taken, carried in four headers. No account, API key or registration exists; the wallet is the identity.
headers:
x-agent-wallet: The signing EVM address. Must equal the `wallet` in the body.
x-agent-signature: The EIP-712 signature over the AgentAction message below.
x-agent-timestamp: Unix milliseconds. Rejected outside a 5 minute window either side of server time.
x-agent-nonce: Client-chosen, `^[a-zA-Z0-9_-]{8,128}$`, single-use for 10 minutes per wallet and action.
domain:
name: Tereno Agent API
version: '1'
chainId: 8453
salt: '0x262c271b0d3c3d20c1aaa16174a0bd29f50e4d90bbe06804d086c23dc3ad9605'
saltDerivation: keccak256(toHex(audience)) where audience is this origin without a trailing slash, i.e. keccak256(toHex("https://www.tereno.xyz")). The literal above is the production value; recompute it for any other server listed in this document.
types:
AgentAction:
- name: action
type: string
- name: resource
type: string
- name: timestamp
type: uint256
- name: nonce
type: string
primaryType: AgentAction
actions:
artifact_publish:
endpoint: POST /api/v1/artifacts/publish
resource: '`JSON.stringify({address, registerIfMissing, bytecodeHash, bytecodeBytes, computedAtBlock, agentId})` with the keys in exactly that order, address lowercased, and agentId null when absent. The string binds the signature to the observation being published, so a signature captured for one reading cannot be replayed for another.'
keyOrderWarning: The server rebuilds this string with JSON.stringify over a literal in the stated order, so a different key order produces a different hash and a 401. The values must also be byte-identical to the ones in the request body.
capability_quote:
endpoint: GET /api/v1/quotes
optional: Signing is not required to be quoted. It is what lets a quote apply the credits a wallet has earned, so an unsigned quote is simply the list price.
resource: '`JSON.stringify({capabilityId, inputHash, wallet})`, with the keys in exactly that order and the values the server returns for that quote.'
demand_pledge:
endpoint: POST /api/v1/demand-pledges
resource: The normalized capability id being pledged for.