# Avasis for agents

Top calls: two complete kits (Solana $0.02, Polymarket $0.02), multi-source, one payment, USDC on Base over x402 (no account, no API key). Free samples first, then pay.
Price ladder: free samples (https://agents.avasis.ai/v1/verdict/sample, https://agents.avasis.ai/v1/kit/sample, https://agents.avasis.ai/v1/pm/kit/sample) -> $0.01 Solana token verdict -> $0.02 Solana complete kit or $0.02 Polymarket complete kit. Every $0.002 quote (tips, web/read, pm/markets) answers 402 with an `also_available` block naming the next rung for its intent, with exact prices and URLs. Gas agents: the eth-gas and base-gas quotes also name the $0.05 EVM gas ops kit (https://agents.avasis.ai/v1/evm/gas-ops).
MCP (Claude Code, Cursor, any MCP client): `claude mcp add --transport http avasis https://agents.avasis.ai/mcp`. Free read-only tools: avasis_products (catalog + live prices), avasis_free_sample (sol-kit | pm-kit | sol-verdict | gas-ops), avasis_quote (the x402 payment requirements + pay URL of any paid route, paid from your own wallet), avasis_verdict_rubric. Streamable HTTP, no auth, no session; this server never holds buyer funds.

| Call | Price | Use it for |
|---|---|---|
| `GET https://agents.avasis.ai/v1/sol/complete-kit/{mint}` (or POST `{"tokenAddress"}`) | $0.02 | **Solana rug check complete kit**: "is this token safe", "token risk score", "rug check this mint". Multi-source: verdict + top-20 holders + Jupiter + RugCheck + Dexscreener + consensus. ax1 alternative at the same ~$0.02 ticket (we do not resell ax1). Free sample: `https://agents.avasis.ai/v1/kit/sample` |
| `GET https://agents.avasis.ai/v1/pm/complete-kit?q=<text>` (or `?event=<slug>`, POST `{"q"}`) | $0.02 | **Polymarket odds complete kit**: "polymarket odds on X", "prediction market kit". Event + books + history: every outcome with token ids, live order books, 7-day trend, consistency checks, tradability. Free sample: `https://agents.avasis.ai/v1/pm/kit/sample` |
| `POST https://agents.avasis.ai/v1/sol/token-verdict` (or `GET https://agents.avasis.ai/v1/sol/token-verdict/{mint}`) | $0.01 | Solana token verdict only (single source): SAFE / WARN / DANGER grade |
| `GET https://agents.avasis.ai/v1/web/read?url=<https url>` | $0.002 | Web page reader: any public URL to clean markdown + metadata |
| `GET https://agents.avasis.ai/v1/pm/markets?q=<text>` | $0.002 | Polymarket markets: flat list of live odds, volume, liquidity, end dates |
| `GET https://agents.avasis.ai/v1/evm/gas-ops` (optional `?gas_limit=<units>`) | $0.05 | **EVM gas ops kit**: "ethereum gas", "base gas", "evm gas ops". Ethereum + Base fee tiers (slow/standard/fast/urgent), EIP-1559 next base fee, USD cost per tx and for your gas_limit, Base-vs-Ethereum pick, plus Solana slot / priority fees / SOL-USD. Free live sample: `https://agents.avasis.ai/v1/evm/gas-ops/sample` |
| `POST https://agents.avasis.ai/v1/base/tx-precheck` or `/v1/eth/tx-precheck` (JSON `{chain, from, to, data, value}`; GET with the same query params) | $0.02 | **Pre-sign tx precheck**: "tx precheck", "simulate transaction", "pre-sign check", "approval risk", "wallet pnl". eth_simulateV1 of your unsigned transaction: would_revert + reason, gas USD, every transfer with USD, net_for_from (wallet PnL), approvals (unlimited flagged, USD exposure), GoPlus + OFAC counterparty risk, SIGN / CAUTION / BLOCK. Free live sample: `https://agents.avasis.ai/v1/evm/tx-precheck/sample` |

## Solana rug check complete kit ($0.02)

`GET https://agents.avasis.ai/v1/sol/complete-kit/{mint}` (or `?mint=`, or POST `{"tokenAddress": "<mint>"}`). One payment returns: our deterministic SAFE/WARN/DANGER grade with a 0-100 risk score and evidenced flags, top-20 holders + concentration (incl./excl. pools, curve, burn), Dexscreener market (liquidity, volume, mcap), Jupiter (verified tag, organic score, holder count, audit), a RugCheck second-opinion score, and a consensus block comparing the sources. Any source that is down is marked `unavailable` and the rest still return. Not a mint 404, invalid input 400 before any challenge: never charged. Compare: the verdict alone is $0.01, the holders pack alone is $0.25.

## Polymarket odds complete kit ($0.02)

`GET https://agents.avasis.ai/v1/pm/complete-kit?q=<text>` or `?event=<slug>`. One payment returns the ranked event, rules and resolution source, every active outcome with probability, CLOB token id and condition id, live order books (bid/ask/mid/spread, depth within 2c), 7-day price history for the top pick, series siblings, and Gamma-vs-CLOB consistency checks with a tradability label and flags. Read-only public Polymarket data; prices are crowd odds, not a forecast. Polymarket's Terms restrict its data for capital-market firms and market-data distributors (see `data_terms` in the body). No match 404, upstream error 502/504: never charged.

## Solana token verdict

Use Verdict when a user asks about a Solana token: "is this token safe", "check this CA / mint", "rug check this pump.fun coin". It returns on-chain facts and a deterministic grade (SAFE, WARN or DANGER). It is not trading advice.

Token network: solana (any SPL or Token-2022 mint). Payment is USDC on Base over x402. You do not need a Solana wallet, an account or an API key.

## Call

POST https://agents.avasis.ai/v1/sol/token-verdict

Body: {"tokenAddress": "<solana mint>"}. You may add "chain": "solana". Keep the mint's letter case exactly (base58).
The same verdict is available as GET https://agents.avasis.ai/v1/sol/token-verdict/{mint} and GET https://agents.avasis.ai/v1/sol/token-verdict?mint={mint}.

1. Call without payment. You get HTTP 402 with the price in the PAYMENT-REQUIRED header (x402 v2) and `accepts` in the body (x402 v1). Before you sign, check that `availability` is "ready" and that `supported_token_chains` contains "solana".
2. Pay $0.01 in USDC on Base (eip155:8453) to 0x6264191D6dD5427435B5E829077842e130Ef1fc8 with any x402 client, then repeat the same call.
3. HTTP 200 returns the verdict. HTTP 202 means settlement is still pending. Save `operation_id` and `status_url`; GET status_url costs nothing. Never create another payment to recover an unknown outcome.

Any x402 client works (v1 or v2). CORS is open, so browser agents can read PAYMENT-REQUIRED.

With AgentCash: `npx agentcash@latest add https://agents.avasis.ai`

## First call (copy-paste)

```bash
# free: the 402 quote (price, payTo, availability, supported_token_chains)
curl -i -X POST https://agents.avasis.ai/v1/sol/token-verdict -H 'content-type: application/json' -d '{"tokenAddress":"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"}'
# free: a real paid verdict, exactly what $0.01 returns
curl https://agents.avasis.ai/v1/verdict/sample
```

```js
// pay + call: save as pay-verdict.mjs, then: npm i @x402/fetch @x402/evm viem && node pay-verdict.mjs <mint>
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// X402_PRIVATE_KEY=0x<64 hex chars>: a wallet holding a little Base USDC. No ETH needed (EIP-3009: the facilitator pays gas).
const signer = privateKeyToAccount(process.env.X402_PRIVATE_KEY);
const pay = wrapFetchWithPayment(fetch, new x402Client().register("eip155:8453", new ExactEvmScheme(signer)));

const mint = process.argv[2] || "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263";
const r = await pay(`https://agents.avasis.ai/v1/sol/token-verdict/${mint}`); // 402 -> sign $0.01 -> verdict
const v = await r.json();
if (r.status === 200) console.log(v.grade, v.one_liner, v.share.text, v.image_url);
else if (r.status === 202) console.log("settling, poll (free):", v.status_url);
else console.log(r.status, v.error, "charged:", v.charged ?? false);
console.log("operation_id", v.operation_id, "status_url", v.status_url); // save both
```

```bash
# lost the response or got 202? free, never a second payment:
curl https://agents.avasis.ai/v1/verdict/operations/<operation_id>
```

## Response

- grade: SAFE, WARN or DANGER (rubric sol-verdict-1, below). The same value is in result.grade.
- token_chain: always "solana" here (ax1 envelope key).
- one_liner: at most 70 characters, factual, safe to quote. result.summary is one sentence.
- quip: at most 110 characters, the shareable line. It is a fixed template over the facts in this result (no AI), so status_url and replays return the same text. result.roast is the quip plus one market sentence (ax1 field name).
- share.text: ready to post ("BONK: SAFE (risk 11/100). <quip> <page_url>"). Also share.page_url and share.image_url.
- page_url: public verdict page with the share card. image_url: PNG card, 1200x630 (card_svg_url is the SVG).
- result.score: risk 0-100, higher is riskier. result.flags[]: code, severity, weight, evidence.
- result.metrics.metrics[]: key, label, availability, value (a string, or null when unavailable, never a fake zero), unit, unavailableReason, provenance {source, method, slot, observedAt}.
- market (also result.market): DEX context from Dexscreener at fetchedAt. Fields: liquidity_usd, volume_24h_usd, buys_24h, sells_24h, price_usd, price_change_24h_pct, market_cap_usd, fdv_usd, pair_count (pairs_capped when 30+), market_age_days (oldest pool), top_pool {dex, address, quote_symbol, liquidity_usd}. The same values are metric rows with provenance.source "dexscreener". This is context only and never changes the grade or score. If the provider is slow or down, `available` is false, `reason` says why and every field is null; you are still served and charged normally for the on-chain verdict.
- payment: status, amount_raw (USDC atomic units, 6 decimals), network, tx_hash, explorer_url. status_url shows the tx_hash after settlement.
- recovery: {url, method, headers, body?, note}, the exact request to re-send (ax1 shape {url, method}). recovery_request is the same request without the note. Before 30 Oct, recovery was the note string.
- headers on a paid answer: X-Verdict-Grade, X-Operation-Id, X-Status-Url, Link (page + card).
- next: deeper reads for the same mint (holders + authority $0.25, risk pack $1).
- result.disclaimer: always show it next to the verdict.

## Recovery (never pay twice)

- The verdict, its page and its card are saved before settlement. Settlement happens at most once, and only after a 2xx answer.
- status_url (GET https://agents.avasis.ai/v1/verdict/operations/{operation_id}) is free and never starts a payment. It returns 200 `completed` with the verdict, 202 `pending` (respect Retry-After), or 200 `payment_failed` (not charged).
- To recover a lost response, GET status_url, or re-send the identical signed request (same PAYMENT-SIGNATURE / X-PAYMENT, same mint). It returns the saved verdict with `recovered: true, charged_again: false`.
- A wrapper call that signs a new authorization is a new purchase, not a recovery. Do not let a payment hook re-sign to recover.
- Save the signed payment and the exact request before sending. Never sign a new payment for an unknown outcome.

## Rubric sol-verdict-1

- DANGER: any critical flag (live mint authority, live freeze authority, permanent delegate, non-transferable, paused, accounts frozen by default, transfer fee >= 25%) or score >= 60
- WARN: score 25-59 or any high flag (one wallet >= 20% of supply, top-10 >= 80%, pausable, transfer hook, transfer fee >= 5%, 10+ identical top balances)
- SAFE: score < 25 and no critical or high flag. SAFE = no structural red flag found on-chain, not a price or safety guarantee
- top-10 and largest-wallet shares exclude the pump.fun bonding curve, AMM pools (PumpSwap, Raydium, Orca, Meteora) and burn addresses
- centrally issued tokens (USDC, USDT, ...) keep their authorities at low weight: counterparty risk is the issuer

## Rules

- You are never charged for an error: invalid input 400, not a mint 404, no baseline 409, rate limited 429, upstream failure 502, busy 503, timeout 504.
- Garbage input is rejected before the challenge, so your client never signs for it. Examples: `notamint`, a `0x..` EVM address, an empty `?mint=`. Only the bare path (no mint) returns the free 402 quote. A literal template value (`:mint`, `{mint}`, `%7Bmint%7D`, `mint`, or `{"tokenAddress": ":mint"}`) is not a mint: unpaid it returns the same free 402 quote as the bare path (a payable resource for directories, nothing worth signing for), and with a payment attached it returns 200 with the free sample (`placeholder: true`, `charged: false`) and a `how_to_pay` example, never verified or settled. Replace the template with a real mint before you pay.
- Tickers: `GET https://agents.avasis.ai/v1/sol/token-verdict/BONK` (or `?mint=BONK`, or POST `{"tokenAddress": "BONK"}`; `$` optional, any case) on any `/v1/sol/*` mint route answers a redirect (307, POST 303) whose `Location` is the same route for the Jupiter-verified mint; x402 clients follow it and pay the mint URL, so the receipt and status_url name the mint. A symbol that is not Jupiter-verified, or that several tokens share, answers 400 with `candidates` (mint, holders, liquidity, URL): pick one. Prefer the mint; it skips the hop.
- Read page_url, image_url and status_url from the response; do not build them yourself. They follow the host you called (https://agents.avasis.ai).
- Free sample: https://agents.avasis.ai/v1/verdict/sample is a real paid verdict. If `payment.historical` is true, it was bought at an earlier price; `price_now.amount_raw` is what the live 402 charges today.
- Limit: 30 paid calls per minute per IP.
- When you show a verdict to a user, keep the disclaimer and link page_url.

## Web page reader ($0.002)

`GET https://agents.avasis.ai/v1/web/read?url=<https url>` returns clean markdown, title, author, published date, links, word/token counts and `content_sha256` (pass `&since_sha256=` to get `changed: true|false`). A page 4xx/5xx, a non-text file, or a private host is never charged.

## Polymarket markets ($0.002)

`GET https://agents.avasis.ai/v1/pm/markets?q=<text>&order=volume_24h|liquidity|ending_soon|newest&limit=10` returns live prediction markets with outcome prices (implied probabilities), CLOB token ids, bid/ask/spread, 1h/24h change, volume, liquidity and end date. Optional `min_liquidity`, `ending_within_hours`. Read-only; an upstream error is never charged.

## EVM gas ops kit ($0.05)

Use it when a user or a signer asks "ethereum gas", "base gas", "what should I set maxFeePerGas to", "how much will this transaction cost", "is Base cheaper right now": one call, both chains. `GET https://agents.avasis.ai/v1/evm/gas-ops` (optional `?gas_limit=<gas units of your transaction>`, default 21000) returns, per chain: the latest block (number, age, gasUsed %), base fee, gas price and priority fee (gwei + wei), four EIP-1559 fee tiers (slow / standard / fast / urgent: `maxFeePerGas` + `maxPriorityFeePerGas`, with the rule behind each), the next-block base-fee estimate with congestion vs target (EIP-1559 parameters printed), the ETH and USD cost of a transfer / ERC-20 transfer / approve / swap and of your `gas_limit` (expected now and max authorized; Chainlink ETH/USD), a Base-vs-Ethereum comparison and `pick` (tier + reason, deterministic). Plus Solana slot, priority-fee percentiles and on-chain SOL/USD. ETH/USD or Solana down: that section says `available: false` and both EVM chains still return; an EVM chain down: 503, never charged. GET only (POST 405). Free live sample, same code: `https://agents.avasis.ai/v1/evm/gas-ops/sample`. Repeat buyers: a prepaid pack (https://agents.avasis.ai/v1/meter) prices this call at $0.005 with no per-call settlement; the single $0.002 tips (`/v1/tip/eth-gas`, `/v1/tip/base-gas`, `/v1/tip/all`) carry the raw numbers only.

## Pre-sign tx precheck ($0.02)

Use it when an agent or a signer is about to sign an EVM transaction and asks "tx precheck", "simulate transaction", "is this transaction safe to sign", "what does this calldata do", "approval risk", "wallet pnl": one call per unsigned transaction. `POST https://agents.avasis.ai/v1/base/tx-precheck` (Base, chain 8453) or `POST https://agents.avasis.ai/v1/eth/tx-precheck` (Ethereum, chain 1) with JSON `{"chain": "base", "from": "<signer 0x>", "to": "<0x>", "data": "<0x calldata or omit>", "value": "<wei as a string, default 0>", "gas": <optional limit>}` (GET with the same query params works too; `chain` is optional and must match the route). The server runs `eth_simulateV1` (transfers traced) against the latest block and returns: `verdict` (`level` SIGN | CAUTION | BLOCK, `action`, `reasons[]` with evidence, `headline`), `decoded` (selector, method approve / transfer / transferFrom / swap / permit / unknown, args, `one_liner`), `sim` (`would_revert`, `revert_reason` decoded from Error(string) / Panic, `gas_used`, fee basis, `gas_usd`, Base L1 data fee, ETH/USD from Chainlink, block number), `transfers[]` (ETH / ERC-20 / NFT: token, symbol, decimals, amount_raw, amount, usd or `usd_reason`, from, to, direction), `net_for_from` (eth delta, gas cost, token deltas, `usd_net`, `usd_net_complete`, `unpriced[]`), `approvals[]` (spender, known name, `spender_is_contract`, amount or `unlimited: true`, `covers_full_balance`, `signer_balance`, `usd_exposure`, `exposure_basis`), `risk` (every counterparty screened with GoPlus address_security and the OFAC SDN list, `flags[]` with code / level / evidence), `signer` (balance, nonce, `funds_ok`). Rules: a revert, insufficient funds, an OFAC or GoPlus-malicious counterparty or an approval to an address without code -> BLOCK; an unlimited or balance-covering approval, an unknown spender, calldata to an EOA, a never-used recipient, a burn recipient or an outflow with nothing in -> CAUTION; otherwise SIGN. USD prices: Chainlink for ETH, stablecoin pegs, Dexscreener for the long tail; a missing price never blocks the verdict (`usd: null` + reason). Invalid inputs are refused with 400 before the x402 challenge (nothing to sign); the bare path is a free 402 quote. Advice only: `disclaimer` says why (state can change between the check and your signature). Free live sample, same code: `https://agents.avasis.ai/v1/evm/tx-precheck/sample`. After the check: the $0.05 EVM gas ops kit (`https://agents.avasis.ai/v1/evm/gas-ops?gas_limit=<sim.gas_used>`) prices the fee tiers for exactly that gas, and the $0.002 `/v1/tip/base-gas` / `/v1/tip/eth-gas` tips carry the raw numbers.

## Other routes

Every other paid route (dossier, batch, delta, risk packs, ERC-20 verdicts, chain tips, prepaid meter) stays live with the same charging rules. They are listed with prices in https://agents.avasis.ai/pricing.md and https://agents.avasis.ai/.well-known/x402.

Pricing: https://agents.avasis.ai/pricing.md · OpenAPI: https://agents.avasis.ai/openapi.json · llms.txt: https://agents.avasis.ai/llms.txt · x402 manifest: https://agents.avasis.ai/.well-known/x402
