> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aegis-kyt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Five minutes from curl to your first paid call.

Aegis is a stateless x402 API.  No signup, no API keys.  You need:

1. **A wallet on [Base](https://base.org/)** with a small USDC balance.
2. **A signing client** that can produce an `X-PAYMENT` header.
   The [Coinbase x402 SDK](https://github.com/coinbase/x402) ships
   clients for Python, TypeScript/JavaScript, Go, and Java.

Both Base mainnet and Base Sepolia (testnet) are supported.  Start on
Sepolia for free testing before flipping to real USDC.

## 1. Discover the price list

No payment, no auth.

```bash theme={null}
curl https://x402.aegis-kyt.com/.well-known/x402.json | jq
```

```json theme={null}
{
  "name": "Aegis KYT x402 API",
  "services": [
    { "endpoint": "/screen/{chain}/{address}",           "price": "0.10", "asset": "USDC", "network": "base", "available": true  },
    { "endpoint": "/check-address/{chain}/{address}",      "price": "1.00", "asset": "USDC", "network": "base", "available": true  },
    { "endpoint": "/check-transfer/{chain}/{tx_hash}",   "price": "0.50", "asset": "USDC", "network": "base", "available": true  }
  ]
}
```

## 2. Probe the quote

Hit any tier path without payment — the server replies `402` with a
machine-readable quote.

```bash theme={null}
curl -i https://x402.aegis-kyt.com/screen/eth/0x6b175474e89094c44da98b954eedeac495271d0f
```

```http theme={null}
HTTP/2 402
payment-required: <base64-encoded JSON quote>

{}
```

Decode the `payment-required` header to get:

```json theme={null}
{
  "x402Version": 2,
  "accepts": [{
    "scheme":  "exact",
    "network": "eip155:84532",
    "asset":   "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
    "amount":  "100000",
    "payTo":   "0x6d0A788caC92d83FB827CDfb07C0D111e97Acfb6",
    "maxTimeoutSeconds": 300,
    "extra":   { "name": "USDC", "version": "2" }
  }]
}
```

`amount` is in USDC base units (6 decimals — `100000` = `$0.10`).

## 3. Sign and retry

Use the Coinbase x402 client to sign the quote against your wallet
and retry with the `X-PAYMENT` header.

<CodeGroup>
  ```python Python theme={null}
  from x402.client import x402Client
  from eth_account import Account
  import httpx

  # Your wallet (Base Sepolia for testing, real key for mainnet)
  account = Account.from_key("0x" + "your-test-key-here")

  client = x402Client(account=account)

  # httpx client — the x402 client wraps it transparently
  async with httpx.AsyncClient() as http:
      response = await client.get(
          http,
          "https://x402.aegis-kyt.com/screen/eth/0x6b175474e89094c44da98b954eedeac495271d0f",
      )
      print(response.json())
  ```

  ```javascript JavaScript theme={null}
  import { x402Client } from "@x402/fetch";
  import { privateKeyToAccount } from "viem/accounts";

  const account = privateKeyToAccount("0xyour-test-key-here");
  const client = x402Client({ account });

  const res = await client.fetch(
    "https://x402.aegis-kyt.com/screen/eth/0x6b175474e89094c44da98b954eedeac495271d0f",
  );
  console.log(await res.json());
  ```

  ```bash curl (manual) theme={null}
  # 1. Get the quote (decode the payment-required header)
  QUOTE=$(curl -is https://x402.aegis-kyt.com/screen/eth/0x6b17... \
          | awk -F': ' '/^payment-required:/ {print $2}' | tr -d '\r')

  # 2. Sign the EIP-3009 transferAuthorization off-line (any EIP-712
  #    signing tool — too long for this snippet; use the Coinbase SDK).
  PAYMENT=$(your-x402-signer "$QUOTE")

  # 3. Retry with X-PAYMENT
  curl -H "X-PAYMENT: $PAYMENT" https://x402.aegis-kyt.com/screen/eth/0x6b17...
  ```
</CodeGroup>

## 4. Receive the answer

```json theme={null}
{
  "schema_version": 1,
  "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
  "chain": "ETH",
  "labels": [
    {
      "source":      "provider_a-verdicts",
      "source_name": "provider_a",
      "label":       "DAI Stablecoin Contract",
      "category":    "stablecoin",
      "confidence":  92,
      "source_url":  "https://...",
      "first_seen_at": "2025-08-12T00:00:00Z",
      "last_seen_at":  "2026-04-29T00:00:00Z"
    }
  ],
  "risk": {
    "risk_level":          "none",
    "risk_score":          0,
    "is_risky":            false,
    "risk_categories":     [],
    "source_count":        9,
    "confidence":          94,
    "primary_source_slug": "provider_a-verdicts",
    "label":               "DAI Stablecoin",
    "consensus_found":     true
  }
}
```

Replay protection is on by default — the same `X-PAYMENT` header
won't authorize a second call.  Sign a fresh one for each request.

## Next steps

* [Authentication deep-dive](/authentication/x402) — exactly what's
  in the `X-PAYMENT` header.
* [Endpoint reference](/endpoints/screen) — per-tier request/response.
* [Networks](/reference/networks) — supported `{chain}` values.
* [Risk categories](/reference/risk-categories) — taxonomy returned
  in `risk.risk_categories[]` from the screening tiers.
* **Running pre-send screens at high volume?**  Switch to V2 API's
  [POST /v2/screen](/api-reference/v2-screen)
  — same data, settled via subscription quota instead of per-call
  USDC.
