Deterministic Unicode inspection
Plain JSON in.
Evidence out.
Every analysis route accepts JSON and returns JSON. A request without payment receives an x402 challenge describing the exact Base USDC payment.
No account. No API key.
Single operations cost $0.001. A batch of up to 50 operations costs $0.004. The server responds with 402 Payment Required; an x402 client signs the payment and retries the request.
- Network
- Base mainnet
- Asset
- USDC
- Scheme
- exact
Make the first call.
Use the free demo to inspect the response shape, then use an x402 client for paid routes. Keep wallet keys in environment variables—never in source code.
JavaScript
Install @x402/fetch, @x402/core, @x402/evm, and viem.
npm install @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));
const paidFetch = wrapFetchWithPayment(fetch, client);
const response = await paidFetch(
"https://glyphguard.srv1039933.hstgr.cloud/v1/analyze-text",
{
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ text: "раypal", identifier: true }),
},
);
console.log(await response.json());
Python
The synchronous requests client handles the 402 challenge and retry automatically.
pip install "x402[requests]" eth-account
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
client = x402ClientSync()
account = Account.from_key(os.environ["EVM_PRIVATE_KEY"])
register_exact_evm_client(client, EthAccountSigner(account))
with x402_requests(client) as session:
response = session.post(
"https://glyphguard.srv1039933.hstgr.cloud/v1/analyze-text",
json={"text": "раypal", "identifier": True},
)
print(response.json())
curl
Use curl for the free demo or to inspect the paid route’s PAYMENT-REQUIRED header.
# Free, rate-limited inspection
curl -sS https://glyphguard.srv1039933.hstgr.cloud/v1/demo \
-H 'content-type: application/json' \
-d '{"text":"раypal.com","mode":"domain","trusted_domain":"paypal.com"}'
# View the $0.001 x402 challenge
curl -i https://glyphguard.srv1039933.hstgr.cloud/v1/analyze-text \
-H 'content-type: application/json' \
-d '{"text":"раypal","identifier":true}'
/v1/analyze-text
Inspect text or an identifier for risky Unicode properties, including mixed scripts, bidi controls, invisible characters, and confusables.
{
"text": "раypal",
"identifier": true
}
/v1/analyze-domain
Analyze a hostname or URL. Supply trusted domains when you need explicit impersonation checks.
{
"domain": "раypal.com",
"trusted_domains": ["paypal.com"]
}
/v1/compare
Compare normalized forms and Unicode security skeletons to determine whether two strings are visually confusable.
{
"left": "раypal",
"right": "paypal"
}
/v1/sanitize
Remove directional, invisible, and control characters. Confusable replacement remains opt-in so legitimate scripts are not silently rewritten.
{
"text": "safe\u202Etxt",
"options": { "normalization": "NFC" }
}
/v1/batch
Submit between one and 50 operations under the same bounded request. The entire body remains subject to the 64 KiB limit.
{
"operations": [
{ "operation": "compare", "left": "раypal", "right": "paypal" },
{ "operation": "sanitize", "text": "hello\u200B" }
]
}
Bounded by design.
- 10,000Unicode code points per text field
- 64 KiBmaximum JSON request body
- 256detailed findings, with complete totals
- 120/minapplication requests per IP
GlyphGuard does not fetch user-supplied URLs, execute submitted content, or log request bodies.