> ## Documentation Index
> Fetch the complete documentation index at: https://xavierscript.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Analyze Token

> Security analysis for a Solana SPL token

Provides a security assessment of an SPL token — checking mint authority status, freeze authority, and generating a risk score.

### Authentication

This endpoint requires an **x402 payment**. A `402 Payment Required` response is returned if the payment signature is missing or invalid.

**Cost:** `0.1 USDC` per request.

### Header Parameters

<ParamField header="x-payment-signature" type="string" required>
  A valid Solana transaction signature proving the USDC transfer to the merchant's vault address.
</ParamField>

<ParamField header="x-payment-wallet" type="string" required>
  The public key of the wallet that made the payment.
</ParamField>

### Path Parameters

<ParamField path="address" type="string" required>
  The public address of the SPL token mint to analyze.
</ParamField>

### Response

<ResponseField name="risk_score" type="number">
  Scale of 1-100 indicating token risk (100 = highest risk).
</ResponseField>

<ResponseField name="authorities" type="object">
  <Expandable title="properties">
    <ResponseField name="mint_authority_disabled" type="boolean" />

    <ResponseField name="freeze_authority_disabled" type="boolean" />
  </Expandable>
</ResponseField>

<ResponseField name="summary" type="string">
  Human-readable summary of the token's safety profile.
</ResponseField>

### Example

```bash theme={null}
# First call returns 402
curl -i http://localhost:3000/api/analyze-token/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

# After payment
curl -H "x-payment-signature: <TX_SIGNATURE>" \
     -H "x-payment-wallet: <YOUR_PUBKEY>" \
     http://localhost:3000/api/analyze-token/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
```
