# ZendIQ > ZendIQ is a pre-signing safety check and swap builder for agents that trade on Solana. Before your agent trades, it answers two questions: is this token safe to hold, and how should this swap be executed? It screens the token (16 rug and honeypot checks), estimates sandwich-attack exposure, returns a Safe / Protect / Refuse verdict, and on request builds the swap as an unsigned transaction on the best route after every fee, Jito bundles included. Screening a token is free; a verdict costs $0.01 and a built transaction $0.02, paid per call in USDC over x402. No API key, no account, no custody: you sign every transaction yourself. **Why use it** - **It answers before you sign.** The risk is scored at the moment of the trade, from live mainnet data, not from a cached list. - **Every claim can be checked.** The verdict comes with its reasons and the 16 checks behind it; a built transaction comes with the plan its bytes should match and every fee itemised. An unanswered check is reported as `unknown`, never as a pass. - **It compares routes for you.** `/optimize` prices Jupiter, Raydium and Jito bundles after fees, tip and modelled sandwich loss, and shows the arithmetic. Often the answer is Jupiter. **When to call it** | Your agent is… | Call | Cost | |---|---|---| | considering a token and has no trade yet | `POST /v1/agent/analyse-token` | free | | about to swap and deciding whether, and how, to trade | `POST /v1/agent/analyse` | $0.01 | | decided to trade and needs the transaction | `POST /v1/agent/optimize` | $0.02 | **Quickstart** 1. **Screen a token, free.** `curl -s -X POST https://api.zendiq.ai/v1/agent/analyse-token -H "content-type: application/json" -d '{"mint":"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"}'` returns `tokenRisk` (score and level), the `signals` behind it with coverage in `signals_resolved`, and an `analysisId` valid for 60 s. 2. **Get a verdict, $0.01 in mainnet USDC.** POST `{ inputMint, outputMint, amount }` to `/v1/agent/analyse`. The first reply is `402` with the price; sign the USDC authorization it describes from a wallet holding mainnet USDC (no SOL needed) and resend the same request with a `PAYMENT-SIGNATURE` header. Any x402 client does this for you, as does `npm run analyse` in the [reference repository](https://github.com/ZendIQ/ZendIQ-Agent-API). Read `verdict` and `reasons`. 3. **Build the swap, $0.02 in mainnet USDC.** POST the same fields plus `taker` (the wallet that will sign) and the `analysisId` from step 1 to `/v1/agent/optimize`. Check `transaction` against `plan`, sign it with the taker, and submit it the way `submit.method` says. Network: everything runs on Solana **mainnet**. Payments settle in **mainnet USDC** over x402; token scores, sandwich exposure and quotes are read from mainnet, and `/optimize` returns a real mainnet transaction. The `network` field of `GET /v1/agent` states the payment network. The paying wallet needs USDC and no SOL: the facilitator sponsors the payment's network fee. `/optimize` builds the swap for a `taker`, a mainnet wallet that must hold the input amount and SOL for fees and rent (a gasless Jupiter Ultra fill is exempt from the SOL); it can be the paying wallet or a different one. A `taker` that cannot fund the trade gets `422 taker_insufficient_balance`, not charged. The prices listed here are the ones the server declares at `GET /v1/agent`. If this file and that endpoint ever disagree, the endpoint is correct. ## Agent API - [Service manifest](https://api.zendiq.ai/v1/agent): Live, unauthenticated JSON listing every endpoint, its price, the rate limits, and which response fields are stable. This is the authoritative source. - [OpenAPI 3.1 description](https://zendiq.ai/openapi.json): Machine-readable schema for all four endpoints, including request bodies, response shapes, and error codes. - [Agent API overview](https://zendiq.ai/agents/): What the API does, what it costs, how x402 payment works, and which wallet does what. - [Full reference](https://zendiq.ai/llms-full.txt): Every endpoint documented in one file, including the field-stability contract and error handling. - [Source, examples and MCP server](https://github.com/ZendIQ/ZendIQ-Agent-API): Reference client, runnable examples, and a Model Context Protocol server exposing three tools: `zendiq_screen_token` (free), `zendiq_triage_swap` ($0.01) and `zendiq_optimize_swap` ($0.02). Install it in Claude Code with `claude mcp add --scope user zendiq -- npx -y @zendiq/mcp@latest`, or run `npx -y @zendiq/mcp@latest` from any MCP client's user config (a project `.mcp.json` asks for approval first); the free tool needs no wallet. MCP is a local stdio adapter and is optional — the endpoints below are callable directly over HTTP with x402 and require no installation. ## Endpoints - [POST /v1/agent/analyse-token](https://zendiq.ai/agents/#analyse-token): Free, rate-limited. Screens one SPL token mint and returns a risk score with the signals behind it. No payment required. - [POST /v1/agent/analyse](https://zendiq.ai/agents/#analyse): $0.01. Returns a Safe / Protect / Refuse verdict for a proposed swap, with token risk, sandwich exposure and a recommended execution path. Builds no transaction. Always settles, because the verdict is the deliverable. - [POST /v1/agent/optimize](https://zendiq.ai/agents/#optimize): $0.02. Returns an unsigned transaction plus an itemised net-benefit breakdown for you to check before signing, and the same Safe / Protect / Refuse verdict as `/analyse`. The venue is chosen by risk — Jupiter Ultra, or the Jupiter Swap API when risk scoring calls for a specific priority fee — and a direct venue replaces it only when it beats that route after every cost (priority fee, Jito tip, modelled sandwich loss, and a bundle's landing risk) by 0.1% of the trade, capped at $1. Unprotected Raydium competes only on a Safe verdict; the Jito bundle venues compete on every verdict. `plan.venueDecision` shows the comparison and why. Submission differs by venue, so follow the returned `submit` object. You sign and submit it yourself. A failed build charges nothing. - [POST /v1/agent/bundle](https://zendiq.ai/agents/#bundle): Free, rate-limited. Submits the signed Jito bundle transaction an `/optimize` call returned (`submit.method` `jito_bundle`) and reports whether it landed. Idempotent; `GET /v1/agent/bundle/{signature}` returns the status. `/analyse-token`, `/analyse` and `/optimize` are independent entry points rather than a pipeline — call whichever one matches what you already know, in any order, or only ever one of them. `/bundle` is only a follow-up to an `/optimize` that returned a Jito bundle. - **Screening** (`/analyse-token`, free) is for a token you have no trade size for yet — a candidate off a feed, a mint you are deciding whether to look at further. - **`/analyse`** ($0.01) is for when the open question is *whether to trade at all*. It returns a Safe / Protect / Refuse verdict with the reasoning behind it and builds no transaction. - **`/optimize`** ($0.02) is for when that decision is already made and the open question is *how to execute it well* — a USDC to SOL rebalance where risk is not in question, or a deliberate memecoin entry where the risk is understood and accepted. `/optimize` runs the same scoring internally, so it returns token risk, sandwich exposure and an itemised net-benefit breakdown to verify the transaction against before signing, plus the same Safe / Protect / Refuse verdict, `confidence` and `reasons` as `/analyse`. It does not refuse to build: a Refuse still comes back with a transaction, so read `verdict` before signing. Calling both costs $0.03; pass the `analysisId` from `/analyse` (or from a free `/analyse-token` screen) to `/optimize` within 60 seconds and it reuses that token scan instead of running a second one. If you already intend to trade, `/optimize` alone is usually what you want. Latency: a first scan of a token takes 1–5 s typically and up to ~12 s, and a scan is never cut short or returned partially (creator history alone is budgeted at 4 s and, if cut, reports a flagged lower bound), so set a client timeout of at least 30 s on `/analyse-token` and at least 120 s on the paid endpoints, whose payment settlement can hold the response for up to 90 s when the facilitator cannot confirm the transfer itself. A token scanned in the last 60 s returns in under a second, and `/optimize` with a valid `analysisId` typically takes 1–2 s. A check that could not be answered is reported as `unknown`: treat it as unknown, never as safe. Details: [Latency, completeness and reusing an analysis](https://zendiq.ai/llms-full.txt). Each paid call is a self-contained x402 request — there is no session and no account. The only thing carried between calls is the optional `analysisId`, a 60-second reference to one token scan: a missing, expired or unknown one just means a full scan, and one for a different mint is rejected with `400 analysis_mint_mismatch` (not charged). ## Products - [ZendIQ](https://zendiq.ai/): What the extensions protect against and how the execution-layer approach differs from pre-trade scanners. - [FAQ](https://zendiq.ai/faq/): How the protection works, what data leaves the browser, and what it costs. - [Privacy policy](https://zendiq.ai/privacy/): What ZendIQ collects and what it never sees. - [ZendIQ Lite source](https://github.com/ZendIQ/ZendIQ-Extension-Lite): Source for the free extension. - [ZendIQ Pro source](https://github.com/ZendIQ/ZendIQ-Extension-Pro): Source for the Pro extension.