# x402 (Base & Solana)

x402 is the native, lowest-latency way to use SolProbe: a direct HTTP request, paid per call in USDC. No key, no account — your wallet is your identity and your payment method.

## How it works

1. Your agent `POST`s to an endpoint (e.g. `/scan/quick`).
2. SolProbe replies `402 Payment Required` with an `accepts[]` array — one option for **Base** (`eip155:8453`) and one for **Solana** (`solana:5eykt4…`), at the same price.
3. Your agent signs payment for whichever rail it prefers and retries with an `X-PAYMENT` header.
4. The facilitator settles the USDC transfer; SolProbe runs the scan and returns `200` with the result.

A compliant x402 client library does steps 2–3 for you. Full detail in the [Payment guide](/reference/payment-guide.md).

## Base URL

```
https://api.solprobe.xyz
```

## Endpoints

| Method & path         | Service                                                  | Price |
| --------------------- | -------------------------------------------------------- | ----- |
| `POST /scan/quick`    | [Quick scan](/reference/api-reference/quick-scan.md)     | $0.02 |
| `POST /market/intel`  | [Market intel](/reference/api-reference/market-intel.md) | $0.20 |
| `POST /scan/deep`     | [Deep dive](/reference/api-reference/deep-dive.md)       | $0.50 |
| `POST /trade/quote`   | [Trade](/reference/api-reference/trade.md) — quote       | Free  |
| `POST /trade/execute` | [Trade](/reference/api-reference/trade.md) — execute     | $0.15 |

Free, unpaywalled routes: `GET /health`, `GET /trade/status/:job_id`, `GET /trade/pairs`, `GET /trade/currencies`, and all [discovery surfaces](/reference/discovery-and-identity.md).

## Minimal example

```typescript
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.BUYER_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
registerExactEvmScheme(client, { signer });
const paidFetch = wrapFetchWithPayment(fetch, client);

const res = await paidFetch("https://api.solprobe.xyz/scan/deep", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ token_address: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" }),
});
const report = await res.json();
```

{% hint style="info" %}
**Base vs Solana** — both rails cost the same. Base settlement is gasless (EIP-3009 permit, facilitator pays gas). Solana uses the x402 exact-SVM scheme. Pick whichever your wallet is funded on.
{% endhint %}

## Discovery

Crawlers and agents can enumerate SolProbe's payable endpoints from:

* `https://api.solprobe.xyz/.well-known/x402` — the endpoint manifest
* `https://api.solprobe.xyz/openapi.json` — routes, request/response schemas, and per-endpoint pricing

See [Discovery & identity](/reference/discovery-and-identity.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.solprobe.xyz/access-paths/x402.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
