Analyze Token
curl --request GET \
--url https://api.example.com/api/analyze-token/:address \
--header 'x-payment-signature: <x-payment-signature>' \
--header 'x-payment-wallet: <x-payment-wallet>'import requests
url = "https://api.example.com/api/analyze-token/:address"
headers = {
"x-payment-signature": "<x-payment-signature>",
"x-payment-wallet": "<x-payment-wallet>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-payment-signature': '<x-payment-signature>',
'x-payment-wallet': '<x-payment-wallet>'
}
};
fetch('https://api.example.com/api/analyze-token/:address', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/analyze-token/:address",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-payment-signature: <x-payment-signature>",
"x-payment-wallet: <x-payment-wallet>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/analyze-token/:address"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-payment-signature", "<x-payment-signature>")
req.Header.Add("x-payment-wallet", "<x-payment-wallet>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/analyze-token/:address")
.header("x-payment-signature", "<x-payment-signature>")
.header("x-payment-wallet", "<x-payment-wallet>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/analyze-token/:address")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-payment-signature"] = '<x-payment-signature>'
request["x-payment-wallet"] = '<x-payment-wallet>'
response = http.request(request)
puts response.read_body{
"risk_score": 123,
"authorities": {
"mint_authority_disabled": true,
"freeze_authority_disabled": true
},
"summary": "<string>"
}API Reference
Analyze Token
Security analysis for a Solana SPL token
GET
/
api
/
analyze-token
/
:address
Analyze Token
curl --request GET \
--url https://api.example.com/api/analyze-token/:address \
--header 'x-payment-signature: <x-payment-signature>' \
--header 'x-payment-wallet: <x-payment-wallet>'import requests
url = "https://api.example.com/api/analyze-token/:address"
headers = {
"x-payment-signature": "<x-payment-signature>",
"x-payment-wallet": "<x-payment-wallet>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-payment-signature': '<x-payment-signature>',
'x-payment-wallet': '<x-payment-wallet>'
}
};
fetch('https://api.example.com/api/analyze-token/:address', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/analyze-token/:address",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-payment-signature: <x-payment-signature>",
"x-payment-wallet: <x-payment-wallet>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/analyze-token/:address"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-payment-signature", "<x-payment-signature>")
req.Header.Add("x-payment-wallet", "<x-payment-wallet>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/analyze-token/:address")
.header("x-payment-signature", "<x-payment-signature>")
.header("x-payment-wallet", "<x-payment-wallet>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/analyze-token/:address")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-payment-signature"] = '<x-payment-signature>'
request["x-payment-wallet"] = '<x-payment-wallet>'
response = http.request(request)
puts response.read_body{
"risk_score": 123,
"authorities": {
"mint_authority_disabled": true,
"freeze_authority_disabled": true
},
"summary": "<string>"
}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. A402 Payment Required response is returned if the payment signature is missing or invalid.
Cost: 0.1 USDC per request.
Header Parameters
string
required
A valid Solana transaction signature proving the USDC transfer to the merchant’s vault address.
string
required
The public key of the wallet that made the payment.
Path Parameters
string
required
The public address of the SPL token mint to analyze.
Response
number
Scale of 1-100 indicating token risk (100 = highest risk).
string
Human-readable summary of the token’s safety profile.
Example
# 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
⌘I