# Add To Watchlist Source: https://docs.limitguard.ai/api-reference/add-to-watchlist /api-reference/openapi.json post /v1/watchlist Add an entity to the watchlist for continuous monitoring. # Agent Revenue Source: https://docs.limitguard.ai/api-reference/agent-revenue /api-reference/openapi.json get /v1/treasury/revenue/{agent_id} Get revenue attributed to a specific downstream AI agent. # Agent Check Source: https://docs.limitguard.ai/api-reference/agent/agent-check /api-reference/openapi.json post /v1/agent/check Check a counterparty agent's wallet: sanctions, balance, ERC-8004 identity, wallet risk, open feedback. # AI Act Readiness Source: https://docs.limitguard.ai/api-reference/ai-act-readiness /api-reference/openapi.json get /v1/compliance/readiness/{entity_id} EU AI Act readiness self-assessment for one AI system. The result depends only on system_type and the completed_items the caller sends; entity_id is echoed as a label and nothing is looked up about it, so the response says so in `basis` and `note`. # Badge JSON (withdrawn) Source: https://docs.limitguard.ai/api-reference/badge-json-withdrawn /api-reference/openapi.json get /v1/badge/{entity_id}.json Withdrawn: answers 410 Gone and charges nothing. The badge showed a demo score that was not based on any check. To check a company, use POST /v1/entity/check. # Badge SVG (withdrawn) Source: https://docs.limitguard.ai/api-reference/badge-svg-withdrawn /api-reference/openapi.json get /v1/badge/{entity_id} Withdrawn: answers 410 Gone with a JSON body and no image. The badge showed a demo score that was not based on any check. To check a company, use POST /v1/entity/check. # Compliance Report Source: https://docs.limitguard.ai/api-reference/compliance-report /api-reference/openapi.json get /v1/compliance/report/{entity_id} De-listed compliance report: answers 410 Gone, charges nothing. This route used to sell a "full compliance assessment for an entity", but it returned the same EU AI Act briefing for every entity_id. There is no per-entity AI Act data to build a real one from, so it was withdrawn. For a readiness score from inputs you supply, use GET /v1/compliance/readiness/{entity_id}. The route is kept as a tombstone rather than deleted so an agent that still holds the old listing gets a clear, machine-readable answer instead of a bare 404. It is absent from ENDPOINT_PRICING_PREFIXES, so the payment gate never quotes a 402 for it, and it takes no API key because the response reveals nothing. Sandbox callers get the same 410: there is no mock either. Once the per-entity report is live (enabled AND priced), the body also points to POST /v1/reports/entity; while it is dark the body is unchanged. # Create Key Source: https://docs.limitguard.ai/api-reference/create-key /api-reference/openapi.json post /v1/keys/create Create a new API key for self-service provisioning. Only free and sandbox tiers can be created directly. For paid tiers, create a free key first then POST /v1/keys/upgrade/{tier}. Returns the plaintext key exactly once. The key cannot be retrieved after this response - only a SHA-256 hash is stored. # Create Subscription Source: https://docs.limitguard.ai/api-reference/create-subscription /api-reference/openapi.json post /v1/compliance/subscribe Create a compliance alert subscription. The subscription narrows what GET /v1/compliance/alerts returns for this key; there is still no push delivery, so the response carries a ``notice`` saying delivery is by polling that route, not by digest or webhook. # Delete Webhook Source: https://docs.limitguard.ai/api-reference/delete-webhook /api-reference/openapi.json delete /v1/webhooks/{webhook_id} Remove a webhook registration. Returns 404 if not found or not owned. # Entity Check Source: https://docs.limitguard.ai/api-reference/entity-check /api-reference/openapi.json post /v1/entity/check Full entity trust check. Always runs country risk and sanctions; runs each other data source whose identifier is provided (up to 8 total), computes a trust score, assigns a cluster, and returns a recommendation. `entity_name` and `country` are required; identifiers (kvk_number, cbe_number, domain, iban, vat_number, wallet_address) are optional and raise confidence. With none, only country risk and sanctions run (plus a KVK name search for NL), at lower confidence. # Entity Deep Check Source: https://docs.limitguard.ai/api-reference/entity-deep-check /api-reference/openapi.json post /v1/entity/deep-check Deep check: extended PEP/RCA exposure screening, the Dutch insolvency register on every tier, adverse media on the extended tier, an Italian credit report on the credit tier. `pep_extended` is the source the base check does not return. /v1/entity/check queries the same OpenSanctions collection but filters to sanctions/enforcement datasets and reduces the answer to a boolean (app/services/sanctions.py); the role.pep/role.rca detail is fetched and discarded. This endpoint keeps it. `insolvency_records` is the Centraal Insolventieregister (NL only; for any other country the field says `applicable: false`). It is queried by `kvk_number` when the body carries one (exact), else by `entity_name` (trade-name search). `kvk_register_flags` is KVK's own register status for a Dutch BV or NV: `actief` and `insolventieCode` from KVK's Open Dataset Basisbedrijfsgegevens. It is null while KVK_REGISTER_FLAGS_ENABLED is off, for any country other than NL and without `kvk_number`. `not_covered` means the dataset has no entry (not a BV or NV). `not_available` means KVK did not answer. `not_applicable` means `kvk_number` is not 8 digits, so no call is made. None of these is a clean answer, and none turns the call into a 503. `findings` lists the actions these flags give, with exactly one finding when KVK and the insolvency register disagree. `credit_report` is an Openapi.com credit score, Italy only, available when OPENAPI_CREDIT_API_KEY is configured -- see /health. For any other country, or a supported one with no `credit_report_identifier` (VAT number, tax code or company ID) in the body, the field says `applicable: false` rather than being omitted or erroring, the same pattern `insolvency_records` uses for non-NL, and the `credit` tier's premium is never billed for it (app/middleware/x402.py probes the country before pricing the call). Three tiers, resolved from X-Response-Quality by the x402 middleware: `fresh` (default; the `deep` tier, $0.88) returns pep_extended and insolvency_records; `enhanced` (the `extended` tier, $1.71) adds `adverse_media` from dilisense; `credit` ($2.45, Italy only, available when enabled) adds `credit_report` instead. There is no cache-only branch, so `cached` is quoted, charged and served as `fresh`. If a source of the requested tier cannot be reached the answer is a 503 (`pep_source_unavailable`, `insolvency_source_unavailable`, `adverse_media_source_unavailable` or `credit_report_source_unavailable`), never a fabricated clean screen, and the x402 gate settles only on a 2xx so the call is not charged. # Financial Health Source: https://docs.limitguard.ai/api-reference/financial-health /api-reference/openapi.json get /v1/financial/health Get overall financial system health status. The settlement fields are operator-wide and only disclosed to admin keys; other callers do not receive them at all. So is treasury_balance_usdc, the platform treasury rather than the caller's. Revenue scope follows the same split: an admin sees the platform-wide total -- every key's prepaid revenue plus anonymous x402 wallet revenue that belongs to no tenant; anyone else sees only revenue attributed to their own key. # Get Audit Trail Source: https://docs.limitguard.ai/api-reference/get-audit-trail /api-reference/openapi.json get /v1/audit/trail Return recent audit trail entries, filtered by tenant (DYN-403). # Get Customer Usage Source: https://docs.limitguard.ai/api-reference/get-customer-usage /api-reference/openapi.json get /v1/usage Return customer usage analytics for the authenticated API key. Includes quota tracking, call statistics, performance metrics, and cost breakdown. Requires API key authentication. Args: period: Time period for usage aggregation (default: current_month) api_key: Validated API key from require_api_key dependency Returns: CustomerUsageResponse with complete usage data # Get DPA Source: https://docs.limitguard.ai/api-reference/get-dpa /api-reference/openapi.json get /v1/legal/dpa Get Data Processing Agreement (public, no auth required). # Get Endpoint Counts Source: https://docs.limitguard.ai/api-reference/get-endpoint-counts /api-reference/openapi.json get /v1/usage/endpoints Return per-endpoint call counts for the authenticated API key. # Get Methodology Source: https://docs.limitguard.ai/api-reference/get-methodology /api-reference/openapi.json get /v1/methodology Get the methodology of Limitguard's own self-verification score. These are the weights of GET /v1/self-verify, Limitguard scoring itself. They are not the weights of the trust score customers buy. Public endpoint (no auth) for transparency. Includes CORS headers. Returns: ScoringMethodology with version, sources, weights, algorithm # Get Privacy Policy Source: https://docs.limitguard.ai/api-reference/get-privacy-policy /api-reference/openapi.json get /v1/legal/privacy Get privacy policy (public, no auth required). # Get Provider Source: https://docs.limitguard.ai/api-reference/get-provider /api-reference/openapi.json get /v1/providers/{provider_id} Get a single validation provider by ID. Requires authentication via X-API-Key header. Args: provider_id: Provider UUID api_key: Validated API key from header Returns: ProviderRegistration Raises: HTTPException: 404 if provider not found # Get Retention Policies Source: https://docs.limitguard.ai/api-reference/get-retention-policies /api-reference/openapi.json get /v1/data/retention View all active data retention policies. # Get Score History Source: https://docs.limitguard.ai/api-reference/get-score-history /api-reference/openapi.json get /v1/scores/{subject}/history Get trust score history for an entity (requires authentication). Args: subject: Entity name/domain/wallet address limit: Maximum number of entries to return (default: 50, max: 1000) Returns: ScoreHistoryResponse with entries and trend analysis # Get Signals Source: https://docs.limitguard.ai/api-reference/get-signals /api-reference/openapi.json get /v1/self-verify/signals Get list of trust signals evaluated. Public endpoint (no auth) for transparency. Includes CORS headers. Returns: List of TrustSignal objects # Get Terms Of Service Source: https://docs.limitguard.ai/api-reference/get-terms-of-service /api-reference/openapi.json get /v1/legal/terms Get terms of service (public, no auth required). # Get Usage Source: https://docs.limitguard.ai/api-reference/get-usage /api-reference/openapi.json get /v1/keys/usage Check current API key usage, the tier's real rate limits and prepaid balance. Send X-API-Key header to identify the key. Free endpoint (no x402 cost). `balance_usd` is the prepaid balance each priced call is debited from. `rate_limit_per_minute`/`rate_limit_per_day` are the caps that actually throttle calls (app.middleware.rate_limit.TIER_RATE_LIMITS); monthly_* is a separate, looser abuse ceiling kept for backward compatibility. With TIER_SUBSCRIPTION_ENABLED, `tier_expires_at`/`tier_queue` are the active Growth/Pro term and the terms queued behind it (null otherwise). `watch_recheck_credits` is the scheduled re-checks the key's Growth/Pro purchases bought and it has not spent yet. # Get Usage Summary Source: https://docs.limitguard.ai/api-reference/get-usage-summary /api-reference/openapi.json get /v1/usage/summary Return aggregated usage for the authenticated API key. # Health Check Source: https://docs.limitguard.ai/api-reference/health-check /api-reference/openapi.json get /health # API Reference Source: https://docs.limitguard.ai/api-reference/introduction Complete reference for every Limitguard API endpoint ## Base URL ``` https://api.limitguard.ai ``` ## Authentication All paid endpoints require one of: | Method | Header | Description | | - | - | - | | **API Key** | `X-API-Key: lg_live_...` | Prepaid balance, debited at list price per call | | **x402 USDC** | `PAYMENT-SIGNATURE: ` (V1: `X-PAYMENT`) | Pay-per-call, no subscription | | **Sandbox** | `X-API-Key: lg_sandbox_...` | Free sandbox key from `POST /v1/keys/create` (`"tier": "sandbox"`), mock data | See [Authentication](/authentication) for full details. ## Request Format All POST endpoints accept JSON: ```bash theme={null} curl -X POST https://api.limitguard.ai/v1/entity/check \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"entity_name": "Acme Corp BV", "country": "NL"}' ``` ## Response Format All responses return JSON with consistent structure. Error responses follow [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) problem details: ```json Error Response theme={null} { "type": "https://docs.limitguard.ai/errors#validation-error", "title": "Validation Error", "status": 422, "detail": [{"field": "country", "message": "Invalid value"}], "instance": "/v1/entity/check", "errorCode": "validation_error", "note": "Nothing was charged." } ``` ## Quality Tiers Control cost vs. freshness on tiered endpoints: | Header Value | Description | | - | - | | `X-Response-Quality: cached` | Serve from cache if available (cheapest) | | `X-Response-Quality: fresh` | Full data source fan-out (default) | ## Rate Limits | Mode | Limit | | - | - | | Sandbox | 10 requests/minute per IP | | Free tier API key | 10 / min, 500 / 24 h | | Paid API key | Based on tier | | x402 (no key) | 60 / min per payer, no daily cap | See [Rate Limits](/guides/rate-limits) for details. ## Endpoint Groups > **[Lead Verify](/api-reference/leads/lead-verify)** > > Check one Dutch or Belgian sales lead against the KVK or KBO register, VIES, sanctions lists and its email domain. > **Company checks** > > Entity checks, risk scoring and KYB verification. > **Reputation** > > Trust decay scoring, reputation history, and watchlists. > **Compliance** > > Regulatory alerts and EU AI Act readiness. Per-entity reports are `POST /v1/reports/entity`. > **Financial & Treasury** > > Wallet balances, treasury status, and settlement verification. > **Webhooks** > > Register endpoints for real-time event notifications. > **Certificates** > > Verify trust certificates. Issuing and revoking them need an admin key. ## OpenAPI Specification The full OpenAPI 3.1 specification is available for download: * **This documentation** is auto-generated from the spec * **Interactive playground**: test endpoints directly from these docs * **Code generation**: use the spec with any OpenAPI client generator > [!TIP] > > Use the interactive API playground on each endpoint page to test requests directly. Set your API key in the authorization section and make live requests. # KYB Check Source: https://docs.limitguard.ai/api-reference/kyb-check /api-reference/openapi.json post /v1/kyb/check Full KYB (Know Your Business) verification. Combines entity trust check with sanctions screening and company registration verification. Returns comprehensive KYB result with verification status, risk flags, and compliance recommendations. `verified` means trust_score 60 or more; `register_verified` says whether the KVK or KBO register found the company. Paid with x402 it costs \$0.29 fresh or \$0.25 cached (the agent price). An API key's prepaid balance is debited \$1.50 fresh or \$0.25 cached (the account price). # Lead Verify Source: https://docs.limitguard.ai/api-reference/leads/lead-verify /api-reference/openapi.json post /v1/leads/verify Verify one NL/BE sales lead: register, VAT, mail server, IBAN, sanctions, lead score. # List Alerts Source: https://docs.limitguard.ai/api-reference/list-alerts /api-reference/openapi.json get /v1/compliance/alerts List alerts, newest first: global list changes plus the caller's own hits. The caller's subscriptions (if any) narrow the global alerts only, to their minimum severity and their jurisdictions; the caller's own hits are always shown. ``subscription_filters`` in the response says what was applied (null without a subscription), so a narrowed list never reads as "no alerts". Jurisdiction codes are stored lower-case; "NL" matches "nl". # List Legal Documents Source: https://docs.limitguard.ai/api-reference/list-legal-documents /api-reference/openapi.json get /v1/legal List all legal documents (public, no auth required). # List Providers Source: https://docs.limitguard.ai/api-reference/list-providers /api-reference/openapi.json get /v1/providers List all registered validation providers. Requires authentication via X-API-Key header. Args: api_key: Validated API key from header Returns: List of ProviderRegistration objects # List Sources Source: https://docs.limitguard.ai/api-reference/list-sources /api-reference/openapi.json get /v1/compliance/sources List all regulatory sources with health status. # List Watchlist Source: https://docs.limitguard.ai/api-reference/list-watchlist /api-reference/openapi.json get /v1/watchlist List all entities on the watchlist. # List Webhooks Source: https://docs.limitguard.ai/api-reference/list-webhooks /api-reference/openapi.json get /v1/webhooks List active webhook registrations belonging to the caller. Secrets are NOT included; they are only shown at creation time. # MCP Check Agent (not implemented) Source: https://docs.limitguard.ai/api-reference/mcp/mcp-check-agent-not-implemented /api-reference/openapi.json post /v1/mcp/check-agent Not implemented: always answers status "unimplemented", verified false and trust_score 0, at no charge. Do not use it for authorization decisions. To check an agent wallet, call POST /v1/agent/check instead. # MCP Check Entity Source: https://docs.limitguard.ai/api-reference/mcp/mcp-check-entity /api-reference/openapi.json post /v1/mcp/check-entity Company check (MCP-compatible endpoint). # MCP Risk Score Source: https://docs.limitguard.ai/api-reference/mcp/mcp-risk-score /api-reference/openapi.json post /v1/mcp/risk-score Quick risk assessment (MCP-compatible endpoint). # MCP Trust Score Source: https://docs.limitguard.ai/api-reference/mcp/mcp-trust-score /api-reference/openapi.json post /v1/mcp/trust-score The caller's own latest stored trust score for an entity (MCP-compatible endpoint, free). # MCP Verify Wallet Source: https://docs.limitguard.ai/api-reference/mcp/mcp-verify-wallet /api-reference/openapi.json post /v1/mcp/verify-wallet Screen a wallet: OFAC SDN match, on-chain signals, named rules. \$0.005 by x402, \$0.11 with an API key. # Purge Entity Data Source: https://docs.limitguard.ai/api-reference/purge-entity-data /api-reference/openapi.json delete /v1/data/purge Right to erasure (GDPR Art. 17): delete all data for an entity. # Query Audit Trail Source: https://docs.limitguard.ai/api-reference/query-audit-trail /api-reference/openapi.json get /v1/audit/query Query persistent audit trail entries with filters (DYN-343). Tenant-scoped: only returns entries belonging to the caller (DYN-403). # Query Sanctions Decisions Source: https://docs.limitguard.ai/api-reference/query-sanctions-decisions /api-reference/openapi.json get /v1/audit/sanctions Query sanctions decision audit trail, tenant-scoped (DYN-475). # Quickstart Guide Source: https://docs.limitguard.ai/api-reference/quickstart-guide /api-reference/openapi.json get /v1/quickstart Interactive quickstart guide, no auth required. Returns everything needed to make a first API call: endpoints, pricing, curl examples, and payment instructions. # Register Provider Source: https://docs.limitguard.ai/api-reference/register-provider /api-reference/openapi.json post /v1/providers/register Register a validation provider. Requires authentication via X-API-Key header. Args: request: Provider registration request api_key: Validated API key from header Returns: ProviderRegistration with assigned provider_id # Register Webhook Source: https://docs.limitguard.ai/api-reference/register-webhook /api-reference/openapi.json post /v1/webhooks Register a new webhook endpoint. URL must use HTTPS. Returns the signing secret ONE TIME: store it securely. # Remove From Watchlist Source: https://docs.limitguard.ai/api-reference/remove-from-watchlist /api-reference/openapi.json delete /v1/watchlist/{entity_id} Remove an entity from the watchlist. # Create Entity Report Source: https://docs.limitguard.ai/api-reference/reports/create-entity-report /api-reference/openapi.json post /v1/reports/entity Build a per-entity report from one real check (or a stored check_id). # Get Entity Report Source: https://docs.limitguard.ai/api-reference/reports/get-entity-report /api-reference/openapi.json get /v1/reports/{report_id} A stored report, owner only; ``?format=pdf`` renders it as PDF. With X-Report-Token instead of a key: the report that token was issued for. # Reputation History Source: https://docs.limitguard.ai/api-reference/reputation-history /api-reference/openapi.json get /v1/reputation/history/{entity_hash} Get reputation score trend for an entity by hash. Returns decay trajectory and cluster history. # Reputation Score Source: https://docs.limitguard.ai/api-reference/reputation-score /api-reference/openapi.json post /v1/reputation/score Compute reputation score with trust decay for an entity. If trust_score/cluster are omitted, a SIMPLIFIED score is derived from country risk and the sanctions screen only (requires country): no registry, domain or financial check runs. The response says so in ``score_basis``. # Revoke Key Source: https://docs.limitguard.ai/api-reference/revoke-key /api-reference/openapi.json post /v1/keys/revoke Revoke an API key permanently. The key being revoked is identified by the X-API-Key header. This action is irreversible: the key stops working immediately. Any remaining prepaid balance of a key that holds its own is forfeited; a key that belongs to a workspace draws from the workspace balance, which revoking the key never touches. # Risk Score Source: https://docs.limitguard.ai/api-reference/risk-score /api-reference/openapi.json post /v1/risk/score Quick risk assessment using country risk + sanctions only. Faster than /entity/check (2 sources vs up to 8). Returns risk_score where 0 = lowest risk, 100 = highest risk. # Get Marketplace Listing Source: https://docs.limitguard.ai/api-reference/sales/get-marketplace-listing /api-reference/openapi.json get /v1/sales/listing Get Bazaar-compatible service listing for AI agent discovery. Returns structured listing that AI agents can parse to discover available endpoints, pricing, and payment methods. # Get Recommendations Source: https://docs.limitguard.ai/api-reference/sales/get-recommendations /api-reference/openapi.json get /v1/sales/recommendations Get cross-sell recommendations based on current usage. AI agents calling one endpoint may benefit from complementary services. Args: current_endpoint: The endpoint path currently being used trust_score: Optional trust score for context-aware recommendations # Sanctions Preview Source: https://docs.limitguard.ai/api-reference/sanctions/sanctions-preview /api-reference/openapi.json post /v1/sanctions/preview Free yes/no screen of a name against the local OFAC SDN, EU and UN lists. # Sanctions Screen Route Source: https://docs.limitguard.ai/api-reference/sanctions/sanctions-screen-route /api-reference/openapi.json post /v1/sanctions/screen Screen a name against the local OFAC SDN, EU and UN lists: matched entries. # Sanctions Wallet Source: https://docs.limitguard.ai/api-reference/sanctions/sanctions-wallet /api-reference/openapi.json post /v1/sanctions/wallet Free yes/no check of a wallet address against the OFAC SDN list. The full wallet screen (balances, age and activity, contract and delegation, risk score with rules and advice, linked entities, ERC-8004 identity and reputation) is POST /v1/mcp/verify-wallet, priced in ``upgrade``. # Security TXT Source: https://docs.limitguard.ai/api-reference/security-txt /api-reference/openapi.json get /.well-known/security.txt # Self Verify Source: https://docs.limitguard.ai/api-reference/self-verify /api-reference/openapi.json get /v1/self-verify Run Limitguard through its own trust verification. Public endpoint (no auth) - transparency is the point. Includes CORS headers for embedding. Returns: SelfVerificationResult with trust score, signals, and methodology # Submit Feedback Source: https://docs.limitguard.ai/api-reference/submit-feedback /api-reference/openapi.json post /v1/feedback Submit feedback on trust score accuracy (requires authentication). Args: request: Feedback details (subject, type, optional comment) Returns: FeedbackResponse with confirmation # Test Webhook Source: https://docs.limitguard.ai/api-reference/test-webhook /api-reference/openapi.json post /v1/webhooks/{webhook_id}/test Send a test event to a webhook endpoint. Returns 404 if not found or not owned. # Topup Key Source: https://docs.limitguard.ai/api-reference/topup-key /api-reference/openapi.json post /v1/keys/topup/{usd} Top up a key's prepaid balance via x402 USDC payment. The x402 middleware prices this path at {usd} dollars and verifies the payment signature before this handler runs. The handler then checks the funds on chain and settles the payment with a mined receipt before it credits. The amount paid is credited, capped at {usd} dollars. Each priced call is then debited at the price in the pricing table. # Treasury Settlements Source: https://docs.limitguard.ai/api-reference/treasury-settlements /api-reference/openapi.json get /v1/treasury/settlements Query settlement status. Optionally filter by nonce. # Upgrade Key Source: https://docs.limitguard.ai/api-reference/upgrade-key /api-reference/openapi.json post /v1/keys/upgrade/{tier} Buy prepaid balance via x402 USDC payment. The x402 price is credited 1:1 to the key's prepaid balance and the tier label is set to the higher of the current and purchased tier (the label selects burst limits in rate_limit.py; it never downgrades). Repeat purchases are allowed. Each priced call is then debited at the price in the pricing table. The x402 middleware verifies the payment signature before this handler runs. The handler then checks the funds on chain and settles the payment with a mined receipt before it applies the upgrade or the credit. The credit is the amount paid, capped at the tier price. Send X-API-Key header to identify which key to credit. Ladder prices: indie \$29, starter \$99, growth \$299, pro \$999. # Verification page data (withdrawn) Source: https://docs.limitguard.ai/api-reference/verification-page-data-withdrawn /api-reference/openapi.json get /v1/verify/{entity_id} Withdrawn: answers 410 Gone and charges nothing. The page showed a demo score that was not based on any check. To check a company, use POST /v1/entity/check. # Verify Audit Chain Source: https://docs.limitguard.ai/api-reference/verify-audit-chain /api-reference/openapi.json get /v1/audit/verify Verify the caller's own audit entries and the chain links around them. Tenant-scoped like /audit/trail. records_checked counts the caller's entries only; no service-wide totals. # Verify Certificate Source: https://docs.limitguard.ai/api-reference/verify-certificate /api-reference/openapi.json get /v1/certificate/{certificate_hash} Verify and retrieve a certificate by its hash. Public endpoint (no auth required) for certificate embedding and verification. Args: certificate_hash: SHA-256 hash of certificate Returns: CertificateVerifyResponse with verification status Raises: HTTPException: 404 if certificate not found # Wallet Balance Source: https://docs.limitguard.ai/api-reference/wallet-balance /api-reference/openapi.json get /v1/wallet/balance WaaS endpoint: get USDC balance for an ERC-8004 registered agent. `agent_id` is either the agent's wallet address (EVM 0x..., Base mainnet) or a numeric ERC-8004 agentId. A wallet must be registered in the configured ERC-8004 Identity Registry (one balanceOf call); a numeric id must have been minted (ownerOf does not revert). Either shape that is well-formed but not found answers 404; a malformed value answers 422. Fails closed rather than quoting a balance it could not read: 503 wallet_registry_unconfigured when no registry address is configured, 503 wallet_rpc_unavailable when the Base read fails or the breaker is open past its 24h stale-cache ceiling. # Get Supported Source: https://docs.limitguard.ai/api-reference/x402/get-supported /api-reference/openapi.json get /x402/supported Return supported schemes and networks for this x402 resource server. Response format follows x402 v2 spec SupportedKind structure. # Settle Payment Source: https://docs.limitguard.ai/api-reference/x402/settle-payment /api-reference/openapi.json post /x402/settle Co-sign and broadcast a payment transaction. Accepts x402 spec request format: - paymentPayload: base64-encoded PaymentPayload (PAYMENT-SIGNATURE header value) - paymentRequirements: PaymentRequirements object (from PAYMENT-REQUIRED header) Also accepts legacy format: - payload: PaymentPayload JSON - raw_transaction: base64 partially-signed Solana VersionedTransaction For EVM payments, triggers settlement via on_chain_settlement.settle_evm_payment. Returns SettlementResponse-compatible JSON. # Verify Payment Source: https://docs.limitguard.ai/api-reference/x402/verify-payment /api-reference/openapi.json post /x402/verify Verify a PaymentPayload without settling. Accepts base64-encoded PaymentPayload JSON (same as PAYMENT-SIGNATURE header). Returns {isValid, payer, invalidReason, ...} without recording or settling. Used by clients to pre-validate before submitting to the protected endpoint. # Authentication Source: https://docs.limitguard.ai/authentication API keys, x402 USDC micropayments, and sandbox mode Limitguard supports two authentication modes: **API key** (prepaid balance) and **x402 USDC micropayments** (pay-per-use). [Sandbox mode](/sandbox) is available for testing without either. ## API Key Authentication Pass your API key in the `X-API-Key` header: ```bash curl theme={null} curl -X POST https://api.limitguard.ai/v1/entity/check \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"entity_name": "Acme Corp BV", "country": "NL"}' ``` ```python Python theme={null} import httpx response = httpx.post( "https://api.limitguard.ai/v1/entity/check", headers={"X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx"}, json={"entity_name": "Acme Corp BV", "country": "NL"}, ) ``` ```javascript JavaScript theme={null} const response = await fetch("https://api.limitguard.ai/v1/entity/check", { method: "POST", headers: { "X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json", }, body: JSON.stringify({ entity_name: "Acme Corp BV", country: "NL" }), }); ``` A paid-tier API key skips the per-call x402 payment: each call is debited at list price from the key's prepaid balance instead. A free key still pays per call. The tier only selects the key's rate limits and its monthly cap (see [Rate Limits](/guides/rate-limits)). ### Key Format | Prefix | Type | Use | | - | - | - | | `lg_live_` | Production key | Live data, real sources | | `lg_sandbox_` | Sandbox key (`"tier": "sandbox"` on `POST /v1/keys/create`) | Mock data on the endpoints the sandbox covers, 10 requests per minute per IP; other priced endpoints charge it like a free key | ### Creating Keys ```bash curl theme={null} curl -X POST https://api.limitguard.ai/v1/keys/create \ -H "Content-Type: application/json" \ -d '{"email": "you@example.com", "tier": "free"}' ``` ```python Python theme={null} response = httpx.post( "https://api.limitguard.ai/v1/keys/create", json={"email": "you@example.com", "tier": "free"}, ) print(response.json()["api_key"]) ``` ```javascript JavaScript theme={null} const response = await fetch("https://api.limitguard.ai/v1/keys/create", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ email: "you@example.com", tier: "free" }), }); const { api_key } = await response.json(); ``` `POST /v1/keys/create` can only provision `free` or `sandbox` tiers directly. To move up the ladder, create a free key first, then pay via `POST /v1/keys/upgrade/{tier}` (x402 required even if you already hold a key: see [Pricing](/pricing#api-key-tier-upgrades)): | Tier | Top-up (credited to the prepaid balance) | Rate limits and monthly cap | | - | - | - | | `free` / `sandbox` | No prepaid top-up; 500 calls / 24 h is a ceiling, not an allowance: REST calls are still paid per call over x402 | 10 / min, 500 / 24 h, 500 / month | | `indie` | \$29 | 30 / min, 1,000 / 24 h, 1,000 / month | | `starter` | \$99 | 60 / min, 10,000 / 24 h, 10,000 / month | | `growth` | \$299 | 120 / min, 50,000 / 24 h, 50,000 / month | | `pro` | \$999 | 300 / min, 250,000 / 24 h, 250,000 / month | A top-up buys balance, not a number of calls: each call is debited at its list price. Check the balance with `GET /v1/keys/usage`. The monthly cap counts calls, resets at 00:00 UTC on the 1st, and answers 429 with `Retry-After` when reached (see [Rate Limits](/guides/rate-limits#monthly-cap-per-key)). > [!WARNING] > > The plaintext key is returned **once only**: store it securely. It is never stored server-side. ## x402 USDC Micropayments For AI agents and pay-per-use access without a subscription. Send the base64-encoded JSON payment object in the `PAYMENT-SIGNATURE` header (x402 V2); the V1 `X-PAYMENT` header is still accepted. > [!TIP] > > See the full [x402 Protocol](/x402-protocol) guide for step-by-step implementation with code examples. ### x402 V2 Flow **1. Request without payment** Make your API request normally. You'll receive HTTP 402 with payment requirements. **2. Build payment signature** Construct an EIP-3009 `TransferWithAuthorization` signature using the payment details from the 402 response: `network`, `asset`, `amount` and `payTo` of the `accepts` entry you pay. **3. Retry with payment** Retry the same request with the `PAYMENT-SIGNATURE` header (or the V1 `X-PAYMENT` header) containing the base64-encoded payment object. ### HTTP 402 Response When you make a request without payment, the API returns the payment requirements (trimmed: the live body lists Base, Solana and a `settled-transfer` option, and recovery hints under `extensions`): ```json theme={null} { "x402Version": 2, "error": "Payment Required", "errorCode": "payment_required", "resource": { "url": "https://api.limitguard.ai/v1/entity/check", "description": "Full entity trust check across multiple verification layers...", "mimeType": "application/json", "serviceName": "Limitguard", "tags": ["kyb", "sanctions", "lead-verification", "wallet-screening", "compliance"], "iconUrl": "https://limitguard.ai/icon-512.png" }, "accepts": [ { "scheme": "exact", "network": "eip155:8453", "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "amount": "290000", "maxAmountRequired": "290000", "payTo": "0xFacilitatorAddress", "maxTimeoutSeconds": 600, "extra": {"name": "USD Coin", "version": "2", "decimals": 6} } ] } ``` `amount` is in USDC 6-decimal units: `290000` is the x402 agent price of the `fresh` tier of `POST /v1/entity/check` today; an API key is debited the account price instead. Always pay the `amount` the 402 quotes; [Pricing](/pricing) lists every endpoint. The full body is on the [x402 Protocol](/x402-protocol) page. ### Supported Networks | Network | CAIP-2 Chain ID | USDC Contract | | - | - | - | | Base Mainnet | `eip155:8453` | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | | Base Sepolia (testnet) | `eip155:84532` | `0x036CbD53842c5426634e7929541eC2318f3dCF7e` | | Solana Mainnet | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` | | Solana Devnet | `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1` | `4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU` | The production API (`api.limitguard.ai`) quotes Base Mainnet and Solana Mainnet only: its `/.well-known/x402.json` says `testnet_supported: false`. The two testnets work only against a test environment that lists them in its `accepts` array. ### V1 Backward Compatibility `PAYMENT-SIGNATURE` is the x402 V2 header and is recommended for new integrations; it takes priority when both are sent. The older `X-PAYMENT` header (V1) is still accepted. ### Response Headers on Success | Header | Value | Description | | - | - | - | | `X-Payment-Verified` | `true` | Payment accepted and verified | | `X-Payment-Amount` | `290000` | Amount in USDC 6-decimal units | | `X-Payment-Fallback` | `true` | Circuit breaker triggered (rare) | ## Free Endpoints These endpoints never require payment or authentication: | Endpoint | Purpose | | - | - | | `GET /health` | API health status | | `POST /v1/keys/create` | Self-service key provisioning | | `GET /.well-known/x402.json` | x402 service listing | | `GET /.well-known/agent.json` | A2A agent card | | `GET /.well-known/mcp.json` | MCP manifest | | `GET /.well-known/security.txt` | Security contact (RFC 9116) | | `GET /v1/self-verify` | Limitguard's own trust score | | `GET /v1/methodology` | Scoring methodology | | `GET /v1/legal/*` | Legal documents | | `GET /llms.txt` | LLM-readable summary | | `GET /llms-full.txt` | LLM-readable full reference | # February 20, 2026 Source: https://docs.limitguard.ai/changelog/2026-02-20 Documentation site launch ## Documentation Site Launch [docs.limitguard.ai](https://docs.limitguard.ai) is now live. > [!NOTE] > > The Limitguard API has been live and in use prior to this documentation launch. These docs formalize what was previously available only to early partners. ### What's included **API Reference** * Complete endpoint reference covering all 64 endpoints * Interactive API playground for testing requests directly in the browser * Multi-language code examples in curl, Python, and JavaScript **Guides** * Error codes and handling patterns * Rate limits and retry strategies * Webhook setup and event reference * Trust architecture overview * AI agent integration patterns * Sandbox mode and test credentials * x402 protocol implementation guide # September 5, 2026 Source: https://docs.limitguard.ai/changelog/2026-09-05 Documentation corrections: pricing, tier ladder, and MCP tool names ## Documentation Corrections A sweep of the documentation site against the live API. No API behavior changed: these entries correct places where the docs had drifted. > [!WARNING] > > If you copied code samples from these docs before this date, check your hard-coded x402 amounts. The previously documented `50000` (\$0.05) amount for `/v1/entity/check` was wrong and will now be rejected as insufficient payment. ### Pricing corrected > [!NOTE] > > Superseded: these were the prices on 5 September 2026. The current prices are on > [Pricing](/pricing), and the `enhanced` tier on these endpoints was retired on > 2026-09-24. The section is left as it was published, because a changelog entry > records what was said on a date. Per-call prices across all pages now match [Pricing](/pricing). The most visible change is `/v1/entity/check`, previously documented at \$0.01 / \$0.05 / \$0.15 across the cached, fresh, and enhanced quality tiers: | Endpoint | Cached | Fresh | Enhanced | | - | - | - | - | | `POST /v1/entity/check` | \$0.10 | \$0.85 | \$1.50 | | `POST /v1/risk/score` | \$0.10 | \$0.65 | \$1.00 | | `POST /v1/kyb/check` | \$0.25 | \$1.50 | \$3.00 | Every x402 `amount` field, `X-Payment-Amount` header sample, and executable tier-price table in the guides was updated to the 6-decimal equivalents. ### `enterprise` tier removed > [!NOTE] > > Superseded: a key's tier sets its per-minute and rolling 24-hour rate limits and a > calendar-month cap of the same size; none of them is a number of calls you buy, since > every call is paid (see [Rate Limits](/guides/rate-limits)). `/v1/keys/upgrade/{tier}` > is a `POST`. The section is left as it was published. The API key tier ladder is `free` / `sandbox`, `indie`, `starter`, `growth`, `pro`. There is no `enterprise` tier: it has been removed from the rate-limit and error-handling tables. Pro's monthly quota is 250,000 calls, not 50,000. Only `free` and `sandbox` keys can be provisioned directly through `POST /v1/keys/create`. All other tiers are reached by paying via x402 against `GET /v1/keys/upgrade/{tier}`. See [Authentication](/authentication#api-key-authentication). ### MCP tool names > [!NOTE] > > Superseded by [September 7](/changelog/2026-09-07): two of the five names below are > wrong. The MCP server answers to `get_trust_score` and `get_risk_score`, not > `trust_score` and `risk_score`. The paragraph is left as it was published, because a > changelog entry records what was said on a date. The manifest at `/.well-known/mcp.json` declares `check_entity`. Documentation examples that called it `check_entity_trust` have been corrected. The five tools are `check_entity`, `check_agent`, `trust_score`, `verify_wallet`, and `risk_score`. ### Discovery response shape The `/.well-known/x402.json` examples now match the live response. Endpoint entries carry `price_usdc`, `price_raw`, and `category`. The listing does not include a `quality_tiers` object: per-tier prices come from [Pricing](/pricing#tiered-pricing) or from the `amount` in the 402 response. # September 7, 2026 Source: https://docs.limitguard.ai/changelog/2026-09-07 MCP tool names corrected, and these docs start generating from the API source ## Kept Current Automatically The price and tool-name table cells on this site are now produced by a generator that reads the Limitguard API's own source instead of transcribing it by hand. This entry is the first such render, run by hand. Once the sync workflow lands, a pull request will open against this repository whenever a price or an MCP tool name changes there, with the affected cells already updated. Until then these pages stay hand-maintained. > [!NOTE] > > The [September 5](/changelog/2026-09-05) corrections were found by reading the docs > against the live API by hand. The generator is meant to make that sweep unnecessary for > the values it covers: the prices and the MCP tool names in the tables listed below. ### MCP tool names corrected [Pricing](/pricing#mcp-tool-endpoints) paired two of the five REST mirror paths with tool names the MCP server does not answer to: | Endpoint | Was | Is | | - | - | - | | `POST /v1/mcp/trust-score` | `trust_score` | `get_trust_score` | | `POST /v1/mcp/risk-score` | `risk_score` | `get_risk_score` | The sample `/.well-known/mcp.json` response in [AI agent integration](/guides/ai-agent-integration#mcp-model-context-protocol) named the same two tools the same wrong way. It now matches what that endpoint returns. The names only matter over the MCP transport: `tools/call` with the old name returns `Unknown tool`. The REST paths themselves are unchanged, so nothing calling `/v1/mcp/trust-score` over plain HTTP was affected. The [September 5](/changelog/2026-09-05) entry lists the five tools with the same two mistakes in it. It is left as written: a changelog records what was said on a date, and these pages are now generated with that directory excluded for exactly that reason. ### What is generated | Page | Generated from | | - | - | | [Pricing](/pricing) | every per-call price, tier price and USDC amount, and the tool behind each REST mirror | | [Quickstart](/quickstart) | the quality-tier prices for `/v1/entity/check` | | [Authentication](/authentication) | the four API key tier upgrade prices | | [AI agent integration](/guides/ai-agent-integration) | the quality-tier price matrix | Prose is not generated, and neither are the JSON samples. The `/.well-known/mcp.json` sample corrected above is a hand fix, and tool names quoted outside a table stay hand-maintained. Only the table cells that quote a number or a tool name are generated, so an endpoint that gains a price but no row here is reported rather than invented: the sync says so instead of writing a description nobody wrote. # September 8, 2026 Source: https://docs.limitguard.ai/changelog/2026-09-08 Outage post-mortem published for the June 19 to September 5 event-loop block ## Post-mortem Published A new **Post-mortems** section collects write-ups of production incidents. The first entry covers the outage that ran from 2026-06-19 to 2026-09-05. ### June 19 to September 5 outage [Outage post-mortem, 2026-06-19 to 2026-09-05](/postmortems/2026-09-langfuse-event-loop) covers 78 days during which `api.limitguard.ai` returned HTTP 503. The process stayed alive throughout: its asyncio event loop was blocked in one synchronous call to the tracing backend that had no timeout, and a blocked process still counted as running, so the platform never restarted it. > [!NOTE] > > No API behavior changed with this entry, and no customer data was involved. The fixes > it describes shipped to the API between September 5 and September 6, 2026. The page documents the timeline, the root cause, why no monitor reached a person, and the changes made since: probes moved off the event loop with a bounded pool and timeouts, a 30 s loop watchdog that turns a hung process into an exited one, host-side alerting and restart, and settlement reconciliation for rows stranded by a hard exit. # September 17, 2026 Source: https://docs.limitguard.ai/changelog/2026-09-17 GET /v1/compliance/report withdrawn ## `GET /v1/compliance/report/{entity_id}` withdrawn The endpoint returned the same EU AI Act briefing for every `entity_id`, so it was not the per-entity assessment it was priced as. It now answers `410 Gone` with `errorCode` `compliance_report_unavailable`, is no longer priced or listed in discovery, and a call to it is not charged. For an EU AI Act readiness score from inputs you supply, use `GET /v1/compliance/readiness/{entity_id}`. For a per-entity report built from a real check, use `POST /v1/reports/entity` (see [September 24](/changelog/2026-09-24)). # September 24, 2026 Source: https://docs.limitguard.ai/changelog/2026-09-24 Company age in trust scores, the enhanced tier retired, the entity report, webhooks and A2A ## Company age now counts for Dutch and Belgian companies KVK and KBO (CBE) return a company's founding date without a time of day (`20180115`, `2018-01-15`). The API could not compute an age from that format, so for most Dutch and Belgian companies `registry.age_years` came back `null` and the age-based parts of the trust score never applied. From today they do: * The registry component adds its age credit: +7 for a company registered more than 5 years ago, +3 for more than 2, +1 for more than 1. * Older verified EU companies can reach the `established_eu_enterprise` and `established_eu_sme` clusters. * `correlations.registry_domain_age_consistency` is computed when both the registry age and the domain age are known. > [!WARNING] > > A fresh check of an older NL or BE company can now score higher than the same check did > before this date. If you store trust scores or compare them over time, expect that step. > Responses served from the result cache (`quality: "cached"`) keep the score of the > fresh check they came from. ## `enhanced` tier retired where it added nothing `POST /v1/entity/check`, `/v1/risk/score`, `/v1/reputation/score` and `/v1/kyb/check` sold `enhanced` above `fresh` for the same sources. An `enhanced` request to these four is now served and charged as `fresh`, and the response says so. `/v1/entity/deep-check` keeps its `enhanced` tier, which adds adverse media. ## Per-entity report `POST /v1/reports/entity` builds a report from one real check: registry identity, sanctions and PEP screens, domain signals, the risk score with the rules that fired, and a status for every source. It costs \$1.50. `GET /v1/reports/{report_id}` reads a report back at no charge. > [!NOTE] > > The report has cost \$1.85 since [October 4](/changelog/2026-10-04). ## Webhooks are delivered Webhook registrations are now stored, so they survive deploys, and `sanctions.match.new` is sent when a sanctions-list change matches an entity or wallet you checked or an entry on your watchlist. Failed deliveries are retried with backoff. `trust.score.changed`, `trust.level.downgrade` and `certificate.expired` can be registered but are not sent yet; `delivered_events` in each registration response says which of yours are live. See [Webhooks](/guides/webhooks). ## A2A JSON-RPC at `/a2a` The Agent Card at `/.well-known/agent.json` declared A2A protocol 0.3.0, but nothing answered JSON-RPC. `POST /a2a` now serves `message/send`, `tasks/get` and `tasks/cancel`. A skill call runs the REST endpoint's own handler, so the task result is the REST response, and priced skills are paid the same way as the REST call. ## MCP tool annotations The MCP tools and the server card now carry annotations (`title`, `readOnlyHint`, `destructiveHint`, `openWorldHint`), and the server card no longer marks the API key as required to list the tools. # September 25, 2026 Source: https://docs.limitguard.ai/changelog/2026-09-25 Compliance alerts priced, identifier change webhooks, and the compliance report over MCP ## Compliance alerts are priced `GET /v1/compliance/alerts`, the feed of daily OFAC, EU and UN sanctions-list changes that match what you checked, costs \$0.10 per call over x402 or from a key's balance. The dashboard's Growth, Pro and Enterprise plans include it. > [!NOTE] > > The feed has cost \$0.11 since [October 5](/changelog/2026-10-05). ## `identifier.change.new` webhooks Watchlist entries are now re-checked weekly on the key tiers that include monitoring, and a change found in one of an entry's signals (for example registry status, VAT validity, insolvency, legal form or domain expiry) is sent as an `identifier.change.new` webhook. See [Webhooks](/guides/webhooks). ## `get_compliance_report` over MCP The per-entity report is now also the MCP tool `get_compliance_report`, at the price of `POST /v1/reports/entity`. ## Group structure in KYB `POST /v1/kyb/check` and the entity report now include `group_structure` from GLEIF: the company's LEI and its direct and ultimate parent, when GLEIF links them. # October 3, 2026 Source: https://docs.limitguard.ai/changelog/2026-10-03 Lead Verify and the agent wallet check launch, and get_trust_score returns ## Lead Verify `POST /v1/leads/verify` checks one Dutch or Belgian sales lead in one call: is it a real, active company in the KVK or KBO register, and do its VAT number, mail server, IBAN country and name hold up, including a check against the OFAC, EU and UN sanctions lists. It returns a verdict, a 0-100 lead score and flags. It costs \$0.24. Over MCP it is the tool `verify_lead`. > [!NOTE] > > Lead Verify has cost \$0.27 since [October 4](/changelog/2026-10-04). ## Agent wallet check `POST /v1/agent/check` checks a counterparty agent's EVM wallet in one call: a match against the OFAC SDN digital-currency address list, its Base USDC and ETH balance, its ERC-8004 identity registration and open ERC-8004 feedback, which is not scored. It costs \$0.75. Over MCP it is the tool `check_agent_wallet`. ## `get_trust_score` returns The MCP tool `get_trust_score`, removed on 24 September because it returned placeholder data, is back as a real lookup: your own most recent stored trust score for an entity you checked before, with when, which product and the trend. It runs no new check and is not charged. # October 4, 2026 Source: https://docs.limitguard.ai/changelog/2026-10-04 New per-call prices ## Price changes These per-call prices changed today. A key's prepaid balance is debited at the new prices from today; the balance itself is unchanged. | Endpoint | Was | Now | | - | - | - | | `POST /v1/entity/check` (fresh) | \$0.85 | \$1.05 | | `POST /v1/risk/score` (fresh) | \$0.65 | \$0.90 | | `POST /v1/reputation/score` (fresh) | \$0.65 | \$0.90 | | `POST /v1/reports/entity` | \$1.50 | \$1.85 | | `POST /v1/leads/verify` | \$0.24 | \$0.27 | | `POST /v1/sanctions/screen` | \$0.10 | \$0.11 | | `POST /v1/mcp/check-entity` | \$0.85 | \$1.05 | | `POST /v1/mcp/risk-score` | \$0.65 | \$0.90 | `/v1/reputation/score` is now priced the same as `/v1/risk/score`, since both use the same sources. Current prices are always on [Pricing](/pricing) and in the 402 response. # October 5, 2026 Source: https://docs.limitguard.ai/changelog/2026-10-05 Small per-call prices move from $0.10 to $0.11, and the deep check is repriced ## Price changes | Endpoint | Was | Now | | - | - | - | | `cached` tier of `/v1/entity/check`, `/v1/risk/score` and `/v1/reputation/score` | \$0.10 | \$0.11 | | `GET /v1/wallet/balance` | \$0.10 | \$0.11 | | `GET /v1/compliance/alerts` | \$0.10 | \$0.11 | | `GET /v1/compliance/readiness/{entity_id}` | \$0.10 | \$0.11 | | `GET /v1/reputation/history/{entity_hash}` | \$0.10 | \$0.11 | | `POST /v1/entity/deep-check` (fresh) | \$0.75 | \$0.88 | | `POST /v1/entity/deep-check` (`enhanced`) | \$1.50 | \$1.71 | The `cached` tier of `/v1/kyb/check` stays at \$0.25. Current prices are on [Pricing](/pricing). # October 6, 2026 Source: https://docs.limitguard.ai/changelog/2026-10-06 Sanctions screening by name: a yes/no preview and the full screen ## Sanctions screening Two new endpoints screen a company or person name against the OFAC SDN, EU and UN sanctions lists, which Limitguard holds locally and refreshes daily: * `POST /v1/sanctions/preview` (MCP: `sanctions_preview`) answers yes or no and never shows an entry. It is not charged, up to 10 calls per caller per UTC day. * `POST /v1/sanctions/screen` (MCP: `sanctions_screen`) returns each matched entry: list, entry id, programmes, countries, listing date and match score. It costs \$0.11. A name match is not a determination. # October 7, 2026 Source: https://docs.limitguard.ai/changelog/2026-10-07 Python SDK 0.1.6: Lead Verify, the agent check, and LangChain and CrewAI tools ## Python SDK 0.1.6 [`limitguard` 0.1.6](https://pypi.org/project/limitguard/) is on PyPI: * `verify_lead` and `agent_check` call [Lead Verify](/changelog/2026-10-03) and the agent wallet check. * `limitguard.integrations.langchain` and `limitguard.integrations.crewai` wrap the checks as LangChain and CrewAI tools, with a spend cap that is on by default. ```bash theme={null} pip install --upgrade limitguard ``` # October 8, 2026 Source: https://docs.limitguard.ai/changelog/2026-10-08 Trust badges withdrawn, no charge for a rejected MCP mirror call, and error responses that match the docs ## Trust badges withdrawn `GET /v1/badge/{entity_id}`, `GET /v1/badge/{entity_id}.json` and `GET /v1/verify/{entity_id}` showed a demo score that was not based on any check. They now answer `410 Gone`. See [Trust Badge Unavailable](/guides/errors#trust-badge-unavailable). ## A rejected `/v1/mcp/*` call is not charged The REST mirrors of the MCP tools (`/v1/mcp/check-entity`, `/v1/mcp/risk-score` and the others) returned a rejected request as a 200, so the call was paid. They now answer the standard 422 validation error, and nothing is charged, as on `/v1/entity/check`. ## Error responses * A 401 or 404 raised by an endpoint now uses the RFC 7807 problem body, like the other errors. * The monthly-cap 429 now carries `Retry-After`: the seconds until 00:00 UTC on the 1st. See [Errors](/guides/errors) and [Rate Limits](/guides/rate-limits). ## `/v1/audit/verify` is scoped to your key `GET /v1/audit/verify` checked the whole service's audit chain and counted every customer's records. It now checks only the entries made with your API key. # October 10, 2026 Source: https://docs.limitguard.ai/changelog/2026-10-10 A yes/no wallet sanctions check, and the full wallet screen is priced ## Wallet sanctions check `POST /v1/sanctions/wallet` (MCP: `wallet_sanctions_preview`) answers whether one wallet address is on the OFAC SDN digital-currency address list, with the list date. It needs no API key and is not charged, up to 10 calls per caller per UTC day, separate from the name preview. ## The full wallet screen is priced `verify_wallet` and `POST /v1/mcp/verify-wallet` now cost \$0.11. The screen reads the wallet's history on Base and Solana as well as the OFAC match. It is also an A2A skill on the Agent Card. # October 11, 2026 Source: https://docs.limitguard.ai/changelog/2026-10-11 x402 payments inside A2A, Coinbase Bazaar listing, the MCP registry name, and an EU list notice ## x402 payments inside A2A An agent can now pay for a priced skill inside an A2A conversation, following the a2a-x402 extension (v0.2): the task asks for payment with the REST endpoint's price, and the agent answers with an x402 payment in the same task. The Agent Card declares the payment rails. See [AI Agent Integration](/guides/ai-agent-integration). ## Listed on the Coinbase Bazaar `POST /v1/entity/check`, `/v1/risk/score`, `/v1/kyb/check`, `/v1/agent/check`, `/v1/leads/verify`, `/v1/mcp/verify-wallet` and `GET /v1/compliance/readiness/{entity_id}` are listed on the Coinbase x402 Bazaar under the name Limitguard, with tags and an icon. ## MCP registry name The official MCP registry lists the server as `ai.limitguard.api/limitguard`. The old name `ai.limitguard.api/trust-intelligence` is retired. The server URL, `https://api.limitguard.ai/mcp`, and the tools are unchanged. ## EU sanctions list date A sanctions preview or screen now says, in `list_note`, the date of the EU's published file it checked. Listings the EU adopted after that date may not be in it yet. # October 12, 2026 Source: https://docs.limitguard.ai/changelog/2026-10-12 The 402 response names the service ## Service name, tags and icon on the 402 The `resource` object of every 402 response now carries `serviceName` (`"Limitguard"`), `tags` and `iconUrl`, which x402 directories read to show the service. See [x402 Protocol](/x402-protocol). # Discovery Source: https://docs.limitguard.ai/discovery Machine-readable discovery for AI agents: MCP, A2A, x402, and llms.txt Limitguard publishes machine-readable discovery files for three AI agent protocols. All discovery endpoints are **free and require no authentication**. ## Discovery Endpoints | Endpoint | Protocol | Purpose | | - | - | - | | `GET /.well-known/x402.json` | x402 Bazaar | AI marketplace service listing with pricing | | `GET /.well-known/agent.json` | A2A (Agent-to-Agent) | Agent Card for capability discovery | | `GET /.well-known/mcp.json` | MCP (Model Context Protocol) | Tool manifest for LLM agents | | `GET /.well-known/security.txt` | RFC 9116 | Security contact information | | `GET /llms.txt` | llms.txt | Concise LLM-readable API summary | | `GET /llms-full.txt` | llms.txt | Full LLM-readable API reference | > [!NOTE] > > All `/.well-known/*` requests bypass x402 payment middleware completely: no payment or API key needed. ## x402 Bazaar Listing Enables AI agents to discover available endpoints and their payment requirements automatically. ```bash theme={null} curl https://api.limitguard.ai/.well-known/x402.json ``` ```json Response theme={null} { "service": "Limitguard.ai", "version": "1.0", "protocol": "x402-v2", "x402Version": 2, "discoverable": true, "description": "Limitguard is a lead validation service for lead generation agencies, B2B marketing and sales teams: it checks the company behind each lead against official business registers (full coverage in the Netherlands and Belgium), EU VAT and sanctions lists, ...", "capabilities": ["lead_verification", "entity_verification", "risk_scoring", "reputation_tracking", "compliance_monitoring", "wallet_verification"], "endpoints": [ { "path": "/v1/entity/check", "method": "POST", "price_usdc": 0.29, "price_raw": 290000, "account_price_usdc": 1.05, "account_price_raw": 1050000, "description": "Full entity trust check across multiple verification layers: ...", "category": "entity_verification" }, { "path": "/v1/leads/verify", "method": "POST", "price_usdc": 0.1, "price_raw": 100000, "account_price_usdc": 0.27, "account_price_raw": 270000, "description": "Lead verify for one NL or BE sales lead: is it a real, active company? ...", "category": "lead_verification" } ] } ``` Trimmed here: the live response lists every priced endpoint, each with its `inputSchema`, plus `payment` (networks and assets), `extensions`, `a2a` and `sla` blocks. `price_raw` is the default (`fresh`) x402 agent price in USDC 6-decimal units; `account_price_raw` is the account price an API key, the dashboard or the Claude connector is debited. See [Pricing](/pricing) for the complete, current table. Also available at `/v1/sales/listing` for the same data. ## A2A Agent Card Google's Agent-to-Agent (A2A) protocol for agent capability discovery. ```bash theme={null} curl https://api.limitguard.ai/.well-known/agent.json ``` Returns capabilities, skills, and how to invoke Limitguard as an A2A agent. Other agents can discover what Limitguard can do and how to interact with it programmatically. ## MCP Manifest Model Context Protocol tools for LLM agents (Claude, GPT-4, etc.). ```bash theme={null} curl https://api.limitguard.ai/.well-known/mcp.json ``` Returns tool definitions that LLM agents can use to call Limitguard endpoints as native tools. See the [AI Agent Integration guide](/guides/ai-agent-integration) for usage examples. ## llms.txt Standard machine-readable format for LLM consumption. ```bash theme={null} # Concise summary for quick context loading curl https://api.limitguard.ai/llms.txt # Full reference with all endpoints, pricing, and examples curl https://api.limitguard.ai/llms-full.txt ``` ## Cross-Sell Recommendations AI agents calling one endpoint can discover complementary services: ```bash theme={null} curl "https://api.limitguard.ai/v1/sales/recommendations?current_endpoint=/v1/risk/score" \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" ``` Needs an API key (a free or sandbox key works). Returns the complementary endpoints for the one you name, with their prices; for `/v1/risk/score` that is the full `/v1/entity/check`. ## Integration Example An AI agent discovering and using Limitguard autonomously: ```python Python theme={null} import httpx # Step 1: Discover capabilities listing = httpx.get("https://api.limitguard.ai/.well-known/x402.json").json() entity_check = next(e for e in listing["endpoints"] if e["path"] == "/v1/entity/check") # Step 2: Check price (the default fresh price, in USDC 6-decimal units) amount = int(entity_check["price_raw"]) # Step 3: Build x402 payment and call from my_wallet import build_x402_payment x_payment = build_x402_payment(amount=amount) response = httpx.post( "https://api.limitguard.ai/v1/entity/check", headers={"X-PAYMENT": x_payment}, json={"entity_name": "Acme Corp BV", "country": "NL"}, ) print(response.json()["trust_score"]) # 87 ``` ```javascript JavaScript theme={null} // Step 1: Discover capabilities const listing = await fetch("https://api.limitguard.ai/.well-known/x402.json") .then((r) => r.json()); const entityCheck = listing.endpoints.find((e) => e.path === "/v1/entity/check"); // Step 2: Check price (the default fresh price, in USDC 6-decimal units) const amount = Number(entityCheck.price_raw); // Step 3: Build x402 payment and call const xPayment = await buildX402Payment(amount); const response = await fetch("https://api.limitguard.ai/v1/entity/check", { method: "POST", headers: { "X-PAYMENT": xPayment, "Content-Type": "application/json" }, body: JSON.stringify({ entity_name: "Acme Corp BV", country: "NL" }), }); const result = await response.json(); console.log(result.trust_score); // 87 ``` # AI Agent Integration Source: https://docs.limitguard.ai/guides/ai-agent-integration How AI agents discover and use Limitguard: MCP, A2A, and x402 AI agents now qualify leads, onboard suppliers and pay invoices with little or no human review. Most have no way to check whether the company on the other side is real, active and not sanctioned. Limitguard gives them the checks a person would run: the company behind a lead or invoice is looked up in the official business register (KVK in the Netherlands, KBO in Belgium), its VAT number in VIES and its name on the OFAC, EU and UN sanctions lists, with the source on every line. It exposes those checks through three agent-native protocols, MCP, A2A and x402, so any capable agent can discover, pay for, and act on them without human configuration. > **[MCP](#mcp-model-context-protocol)** > > Native tools for Claude, GPT-4, and any LLM that supports the Model Context Protocol > **[A2A](#a2a-agent-to-agent)** > > Google's Agent-to-Agent protocol: structured capability discovery and invocation > **[x402](#x402-micropayments)** > > Pay per call with USDC. No subscription, no API key, no human in the loop > [!NOTE] > > All discovery endpoints (`/.well-known/*`, `/llms.txt`, `/llms-full.txt`) are **free and unauthenticated**. An agent can discover Limitguard's full capabilities without a wallet or API key. *** ## Why Lead and Company Checks Matter for Agents An autonomous agent qualifying a lead or executing a payment faces a fundamental asymmetry: it can verify its own instructions perfectly, but it has no ground truth about the company on the other side. A lead or supplier claiming to be "Acme Corp BV" in Amsterdam could be: * A legitimate, 12-year-old company with verified KVK registration * A recently-incorporated shell with no trading history * An entity on an OFAC or EU sanctions list * A domain registered last week pointing to a known fraud cluster Without trust verification, agents must either halt for human review (defeating the purpose of automation) or proceed blind (accepting counterparty risk they cannot quantify). Limitguard resolves this in a single API call. Lead Verify returns a verdict, a 0-100 lead score and flags; the company check returns a 0-100 trust score, a recommendation (`proceed` / `review` / `enhanced_due_diligence` / `block`), and the evidence behind it. ### Agent Decision Framework | Trust Score | Recommendation | Suggested Agent Behavior | | - | - | - | | 80-100 | `proceed` | Execute autonomously | | 60-79 | `review` | Execute with audit log entry | | 40-59 | `enhanced_due_diligence` | Pause and request human confirmation | | 0-39 | `block` | Abort transaction, alert operator | *** ## Protocol Overview | Protocol | Discovery Endpoint | Best For | | - | - | - | | MCP | `/.well-known/mcp.json` | LLM agents (Claude, GPT-4, Gemini) | | A2A | `/.well-known/agent.json` | Agent-to-agent workflows (Google ADK, LangGraph) | | x402 | `/.well-known/x402.json` | Autonomous agents paying per call with USDC | | llms.txt | `/llms.txt`, `/llms-full.txt` | Context loading for any LLM session | *** ## MCP (Model Context Protocol) MCP is Anthropic's standard for exposing APIs as native tools to LLM agents. When an LLM is configured with Limitguard's MCP manifest, it can call Limitguard's checks the same way it calls any built-in tool, with no prompt engineering required. ### Discovery ```bash theme={null} curl https://api.limitguard.ai/.well-known/mcp.json ``` ```json Response theme={null} { "name": "limitguard", "version": "1.0", "description": "Limitguard is a lead validation service for lead generation agencies, B2B marketing and sales teams: it checks the company behind each lead against official business registers (full coverage in the Netherlands and Belgium), EU VAT and sanctions lists, with website age in the company check, and returns proceed, review or block with the source on every line. Developers and AI agents can use its HTTP API, MCP server and A2A service, hosted in the EU. ...", "tools": [ { "name": "verify_lead", "description": "Verify a NL/BE sales lead against the registers in one call: real and active, VAT, mail server, IBAN, sanctions; a 0-100 lead score. $0.27." }, { "name": "check_agent_wallet", "description": "Check a counterparty agent's EVM wallet in one call: OFAC SDN digital-currency address list match, Base USDC and ETH balance, ERC-8004 identity registration (and, given an agent id, that agent's owner and payment wallet) and open ERC-8004 feedback, which is not scored. $0.75." }, { "name": "check_entity", "description": "Company check on a business: sanctions screening and country risk, the Dutch KVK register for an NL company, and the website domain when you send it. Returns trust_score (0-100, 100 = best), trust_level (high means low risk), cluster, recommendation, confidence, top_factors and sources_checked." }, { "name": "get_trust_score", "description": "Look up your own most recent trust score for an entity you checked before, from your stored checks: score, level, when, which product, trend and how many checks are on record. Runs no new check and calls no data source. Free ($0)." }, { "name": "verify_wallet", "description": "Screen a wallet: OFAC SDN address match, on-chain signals (contract check, native and USDC balance, transaction count, first seen on Base) and named risk rules with up to 3 advice items. On Base, also reports any ERC-8004 agent the wallet owns and its open on-chain reputation as descriptive signals, never scored. $0.11. Supports EVM and Solana addresses." }, { "name": "get_risk_score", "description": "Quick risk score from sanctions screening and country risk only, without the register or domain lookups of check_entity. Returns risk_score (0-100, 100 = riskiest), risk_level (high means high risk, the reverse of check_entity's trust_level), sanctions_match and fatf_status; no recommendation or factors." }, { "name": "get_compliance_report", "description": "Per-entity report built from one real check: registry identity, sanctions and PEP screens, domain signals, risk score with the rules that fired, correlations, every finding as a ranked action, a per-source status table (ok / unavailable / error) and a report hash." }, { "name": "sanctions_preview", "description": "Free yes/no sanctions preview against the local OFAC SDN, EU and UN lists. Returns possible_match, lists_checked, list_dates and list_note only, never an entry. 10 per caller per UTC day." }, { "name": "sanctions_screen", "description": "Sanctions screen against the local OFAC SDN, EU and UN lists: matched entries with list, entry id, programmes, countries, listing date and match score. A name match is not a determination." }, { "name": "wallet_sanctions_preview", "description": "Free yes/no check of a wallet address against the OFAC SDN list: sanctioned, lists, the list date and its freshness, no programmes or entry ids. 10 per caller per UTC day, separate from sanctions_preview. The full wallet screen is verify_wallet ($0.11)." } ], "a2a_endpoint": "https://api.limitguard.ai/a2a" } ``` Trimmed here: the top-level `description` goes on to the sandbox and prices, and each tool in the live manifest also carries an `inputSchema` and `annotations` (title and read-only hints). `check_entity` and `get_risk_score` cost the same as the `fresh` tier of the endpoint they mirror; `get_trust_score`, `sanctions_preview` and `wallet_sanctions_preview` are free; `verify_wallet` costs \$0.11; `get_compliance_report`, `sanctions_screen`, `check_agent_wallet` and `verify_lead` are billed at the price of the REST endpoint they call. See [Pricing](/pricing#mcp-tool-endpoints) for the amounts. ### Configuring an LLM Agent ```python Python (Claude SDK) theme={null} import anthropic client = anthropic.Anthropic() # Register Limitguard as an MCP server # Claude will call check_entity automatically when it needs to verify an entity response = client.beta.messages.create( model="claude-opus-4-6", max_tokens=1024, mcp_servers=[ { "type": "url", "url": "https://api.limitguard.ai/mcp", "name": "limitguard", "authorization_token": "lg_live_xxxxxxxxxxxxxxxxxxxx", } ], messages=[ { "role": "user", "content": ( "I need to pay invoice #INV-2024-447 from Acme Corp BV " "(KVK: 12345678, NL). Should I proceed?" ), } ], betas=["mcp-client-2025-04-04"], ) print(response.content) # Claude calls check_entity internally, interprets the score, # and returns a recommendation with evidence. ``` ```javascript JavaScript (OpenAI SDK) theme={null} import OpenAI from "openai"; const client = new OpenAI(); // Define Limitguard tools from the MCP manifest const tools = [ { type: "function", function: { name: "check_entity", description: "Verify the trustworthiness of a business entity before transacting. " + "Returns a 0-100 trust score and recommendation.", parameters: { type: "object", properties: { entity_name: { type: "string", description: "Legal business name" }, country: { type: "string", description: "ISO 3166-1 alpha-2 country code" }, kvk_number: { type: "string", description: "Dutch KVK registration number (optional)" }, domain: { type: "string", description: "Company domain (optional)" }, vat_number: { type: "string", description: "EU VAT number (optional)" }, }, required: ["entity_name", "country"], }, }, }, ]; // Tool execution handler async function executeTool(name, args) { if (name === "check_entity") { const response = await fetch("https://api.limitguard.ai/v1/entity/check", { method: "POST", headers: { "X-API-Key": process.env.LIMITGUARD_API_KEY, "Content-Type": "application/json", }, body: JSON.stringify(args), }); return response.json(); } } // Agentic loop const messages = [ { role: "user", content: "Should I pay invoice #INV-2024-447 from Acme Corp BV (KVK: 12345678, NL)?", }, ]; let response = await client.chat.completions.create({ model: "gpt-4o", messages, tools, }); // Handle tool calls while (response.choices[0].finish_reason === "tool_calls") { const toolCall = response.choices[0].message.tool_calls[0]; const result = await executeTool( toolCall.function.name, JSON.parse(toolCall.function.arguments) ); messages.push(response.choices[0].message); messages.push({ role: "tool", tool_call_id: toolCall.id, content: JSON.stringify(result), }); response = await client.chat.completions.create({ model: "gpt-4o", messages, tools, }); } console.log(response.choices[0].message.content); ``` > [!TIP] > > When writing system prompts, instruct the agent explicitly: "Before executing any payment or onboarding a new supplier, always call `check_entity`. Only proceed if `recommendation` is `proceed` or `review`." LLMs follow clear tool-use instructions reliably. *** ## A2A (Agent-to-Agent) Google's Agent-to-Agent protocol defines a standard for agents to discover and invoke other agents as structured services. Limitguard publishes an Agent Card that exposes its capabilities, skills, and invocation interface to any A2A-compatible agent. ### Discovery ```bash theme={null} curl https://api.limitguard.ai/.well-known/agent.json ``` ```json Response theme={null} { "name": "Limitguard Lead Verification", "description": "Limitguard is a lead validation service for lead generation agencies, B2B marketing and sales teams: it checks the company behind each lead against official business registers (full coverage in the Netherlands and Belgium), EU VAT and sanctions lists, with website age in the company check, and returns proceed, review or block with the source on every line. Developers and AI agents can use its HTTP API, MCP server and A2A service, hosted in the EU. ...", "protocolVersion": "0.3.0", "version": "1.0", "url": "https://api.limitguard.ai/a2a", "preferredTransport": "JSONRPC", "provider": { "organization": "Limitguard", "url": "https://limitguard.ai" }, "iconUrl": "https://limitguard.ai/icon-512.png", "documentationUrl": "https://docs.limitguard.ai/api-reference/leads/lead-verify", "capabilities": { "streaming": false, "pushNotifications": false, "stateTransitionHistory": false }, "defaultInputModes": [ "application/json" ], "defaultOutputModes": [ "application/json" ], "securitySchemes": { "apiKey": { "type": "apiKey", "in": "header", "name": "X-API-Key", "description": "Limitguard key (lg_live_...); free via POST /v1/keys/create" }, "bearer": { "type": "http", "scheme": "bearer", "description": "The same key as Authorization: Bearer lg_live_..." } }, "security": [ { "apiKey": [] }, { "bearer": [] } ], "skills": [ { "id": "lead_verify", "name": "lead_verify", "tags": [ "lead_verification", "company_registry", "sales" ], "description": "Lead verify for one NL or BE sales lead: is it a real, active company? Checks the KVK or KBO register and cross-checks what the lead holds: VAT with VIES, mail server and disposable domain, IBAN country and bank (not the holder), and the company name against the OFAC, EU and UN sanctions lists. Returns a verdict, a 0-100 lead score and flags, each with one action. An input not given is not checked.", "endpoint": "/v1/leads/verify", "method": "POST", "price_usdc": 0.1, "account_price_usdc": 0.27 }, { "id": "agent_check", "name": "agent_check", "tags": [ "wallet_screening", "sanctions", "agent_identity" ], "description": "Agent wallet check in one call: screens an EVM wallet against the OFAC SDN digital-currency address list, reads its Base USDC and ETH balance, looks up its ERC-8004 identity registration (and, given an agent id, that agent's owner and payment wallet) and lists open ERC-8004 feedback, which is not scored. Returns one verdict and each part's status; a part that could not be read says so.", "endpoint": "/v1/agent/check", "method": "POST", "price_usdc": 0.005, "account_price_usdc": 0.75 }, { "id": "entity_check", "name": "entity_check", "tags": [ "entity_verification", "risk_scoring", "reputation_tracking", "wallet_verification", "sanctions", "kyb" ], "description": "Full entity trust check ... Returns trust score 0-100, cluster, and recommendation.", "endpoint": "/v1/entity/check", "method": "POST", "price_usdc": 0.29, "account_price_usdc": 1.05 }, { "id": "risk_score", "name": "risk_score", "tags": [ "risk_scoring" ], "description": "Quick risk score assessment. Faster than full entity check.", "endpoint": "/v1/risk/score", "method": "POST", "price_usdc": 0.25, "account_price_usdc": 0.9 }, { "id": "kyb_check", "name": "kyb_check", "tags": [ "kyb_verification", "sanctions", "compliance_monitoring" ], "description": "Know Your Business verification with sanctions check and company registration.", "endpoint": "/v1/kyb/check", "method": "POST", "price_usdc": 0.29, "account_price_usdc": 1.5 } ], "authentication": { "schemes": [ "x402", "api_key" ], "x402": { "protocol": "x402-v2", "chains": [ "eip155:8453", "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" ], "currency": "USDC" }, "api_key": { "header": "X-API-Key", "prefix": "lg_live_" } }, "documentation_url": "https://docs.limitguard.ai/x402-protocol?utm_source=api&utm_medium=agent&utm_campaign=docs&utm_content=x402_protocol", "sandbox": { "url": "https://api.limitguard.ai/v1/keys/create", "curl": "curl -s -X POST https://api.limitguard.ai/v1/keys/create -H 'Content-Type: application/json' -d '{\"email\": \"you@example.com\", \"tier\": \"sandbox\"}'", "note": "Free sandbox key, no wallet. POST here with tier=sandbox to get an lg_sandbox_ key; send it as X-API-Key for mock data at no charge (10 req/min). The sandbox covers entity, risk and KYB checks; Lead Verify and the agent check need a live key or an x402 payment. Or screen a name against the OFAC, EU and UN sanctions lists free first: POST https://api.limitguard.ai/v1/sanctions/preview." } } ``` Trimmed here: the live card's `description` goes on to the sandbox and prices, and the `entity_check` skill's description is shortened. Each skill names the REST `endpoint` and `method` to call and its `price_usdc`. ### How an Agent Uses A2A ```python Python (Google ADK) theme={null} import httpx class LimitguardA2AClient: """A2A client for Limitguard trust verification.""" AGENT_CARD_URL = "https://api.limitguard.ai/.well-known/agent.json" BASE_URL = "https://api.limitguard.ai" def __init__(self, api_key: str): self.api_key = api_key self._card = None def discover(self) -> dict: """Fetch and cache the agent card.""" if self._card is None: self._card = httpx.get(self.AGENT_CARD_URL).json() return self._card def get_skill(self, skill_id: str) -> dict | None: """Look up a skill by ID from the agent card.""" card = self.discover() return next( (s for s in card["skills"] if s["id"] == skill_id), None, ) def invoke(self, skill_id: str, payload: dict) -> dict: """Invoke a Limitguard skill via A2A.""" skill = self.get_skill(skill_id) if skill is None: raise ValueError(f"Skill '{skill_id}' not found in agent card") # Every skill in the agent card names its own REST endpoint and method response = httpx.request( skill["method"], f"{self.BASE_URL}{skill['endpoint']}", headers={"X-API-Key": self.api_key, "Content-Type": "application/json"}, json=payload, timeout=10.0, ) response.raise_for_status() return response.json() # Usage in an orchestrator agent client = LimitguardA2AClient(api_key="lg_live_xxxxxxxxxxxxxxxxxxxx") # Discover what Limitguard can do card = client.discover() print(f"Available skills: {[s['id'] for s in card['skills']]}") # Available skills: ['lead_verify', 'agent_check', 'entity_check', 'risk_score', 'kyb_check', 'verify_wallet', 'wallet_sanctions'] # Invoke entity trust check result = client.invoke( "entity_check", {"entity_name": "Acme Corp BV", "country": "NL", "kvk_number": "12345678"}, ) print(f"Trust score: {result['trust_score']}, {result['recommendation']}") ``` ```javascript JavaScript theme={null} class LimitguardA2AClient { constructor(apiKey) { this.apiKey = apiKey; this.baseUrl = "https://api.limitguard.ai"; this._card = null; } async discover() { if (!this._card) { const res = await fetch(`${this.baseUrl}/.well-known/agent.json`); this._card = await res.json(); } return this._card; } async getSkill(skillId) { const card = await this.discover(); return card.skills.find((s) => s.id === skillId) ?? null; } async invoke(skillId, payload) { const skill = await this.getSkill(skillId); if (!skill) throw new Error(`Skill '${skillId}' not found in agent card`); // Every skill in the agent card names its own REST endpoint and method const res = await fetch(`${this.baseUrl}${skill.endpoint}`, { method: skill.method, headers: { "X-API-Key": this.apiKey, "Content-Type": "application/json", }, body: JSON.stringify(payload), }); if (!res.ok) throw new Error(`Limitguard error: ${res.status}`); return res.json(); } } // Usage const client = new LimitguardA2AClient("lg_live_xxxxxxxxxxxxxxxxxxxx"); const card = await client.discover(); console.log("Skills:", card.skills.map((s) => s.id)); const result = await client.invoke("entity_check", { entity_name: "Acme Corp BV", country: "NL", kvk_number: "12345678", }); console.log(`Trust score: ${result.trust_score}, ${result.recommendation}`); ``` ### Pay inside A2A with x402 (no API key) An agent without a Limitguard key can pay per call inside the A2A conversation itself, with the [a2a-x402 extension v0.2](https://github.com/google-agentic-commerce/a2a-x402/blob/main/spec/v0.2/spec.md). The Agent Card declares it under `capabilities.extensions` (not required: an API key still works). 1. **Ask.** Send `message/send` to `https://api.limitguard.ai/a2a` with the header `X-A2A-Extensions: https://github.com/google-agentic-commerce/a2a-x402/blob/main/spec/v0.2` and a data part `{"skill": "verify_wallet", "input": {...}}`. For a priced skill you get a Task in state `input-required` whose status message carries `x402.payment.status: "payment-required"` and `x402.payment.required` (the price, the USDC asset and the recipient, on Base and Solana). 2. **Pay.** Sign one of those requirements and send `message/send` again with the same `taskId` and the metadata `x402.payment.status: "payment-submitted"` and `x402.payment.payload` (the signed payment). 3. **Result.** The payment is checked against the quote issued for that task, the skill runs, and the payment is settled only if the skill succeeded. The completed Task carries the result as an artifact and `x402.payment.receipts`. A task can be paid once. Free skills, such as `wallet_sanctions` (a yes or no against the OFAC list for a wallet, with a daily limit), need no key and no payment. A working Python client that asks for a quote, shows it and asks before signing is in the public limitguard-mcp repository: [`examples/a2a_x402_pay.py`](https://github.com/jwconsultancyteam/limitguard-mcp/blob/main/examples/a2a_x402_pay.py). *** ## x402 Micropayments x402 is the HTTP native payment protocol for AI agents. An agent with a funded USDC wallet can call Limitguard endpoints **without a subscription or API key**: it discovers pricing, builds a cryptographic payment signature, and includes it in the request header. This is the fully autonomous path: no human creates an account, no API key is provisioned, no billing is configured. ### Discovery ```bash theme={null} curl https://api.limitguard.ai/.well-known/x402.json ``` ```json Response theme={null} { "service": "Limitguard.ai", "version": "1.0", "protocol": "x402-v2", "x402Version": 2, "discoverable": true, "description": "Limitguard is a lead validation service for lead generation agencies, B2B marketing and sales teams: it checks the company behind each lead against official business registers (full coverage in the Netherlands and Belgium), EU VAT and sanctions lists, with website age in the company check, and returns proceed, review or block with the source on every line. Developers and AI agents can use its HTTP API, MCP server and A2A service, hosted in the EU. ...", "capabilities": ["lead_verification", "entity_verification", "risk_scoring", "reputation_tracking", "compliance_monitoring", "wallet_verification"], "endpoints": [ { "path": "/v1/entity/check", "method": "POST", "price_usdc": 0.29, "price_raw": 290000, "account_price_usdc": 1.05, "account_price_raw": 1050000, "category": "entity_verification" }, { "path": "/v1/risk/score", "method": "POST", "price_usdc": 0.25, "price_raw": 250000, "account_price_usdc": 0.9, "account_price_raw": 900000, "category": "entity_verification" }, { "path": "/v1/kyb/check", "method": "POST", "price_usdc": 0.29, "price_raw": 290000, "account_price_usdc": 1.5, "account_price_raw": 1500000, "category": "regulatory_compliance" } ] } ``` Truncated to three entries; the live response lists every priced endpoint. `price_raw` is the default (`fresh`) price in USDC 6-decimal units. The listing does **not** break out per-quality-tier prices: for `cached` amounts, see [Pricing](/pricing#tiered-pricing) or read the `amount` from the 402 response for the quality you requested. ### How x402 Works **1. Probe the endpoint (optional)** Make a request without payment. The server returns HTTP 402 with the exact payment requirements for this call. You can skip this step if you already read requirements from `/.well-known/x402.json`. **2. Build the payment signature** Construct an EIP-3009 `TransferWithAuthorization` signature authorizing the USDC transfer. Sign it with your agent's wallet private key. **3. Base64-encode the payment object** Serialize the payment payload to JSON and base64-encode it. This becomes the `X-PAYMENT` header value. **4. Retry the request with X-PAYMENT** Send the original request again, including the `X-PAYMENT` header. Limitguard verifies the signature on-chain, executes the transfer, and returns the trust score. **5. Check response headers** Confirm `X-Payment-Verified: true`. If you see `X-Payment-Fallback: true`, the circuit breaker triggered a cached-wallet path (rare). ### Full x402 Implementation ```python Python theme={null} import base64 import json import secrets import time import httpx from eth_account import Account from eth_account.messages import encode_typed_data USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" CHAIN_ID = "eip155:8453" def build_x402_payment( amount_usdc: int, # in 6-decimal units (1_000_000 = $1.00), from the 402 sender_key: str, # agent wallet private key recipient: str, # payTo address from the 402 response ) -> str: sender = Account.from_key(sender_key).address chain_num = int(CHAIN_ID.split(":")[1]) # 8453 nonce = "0x" + secrets.token_hex(32) now = int(time.time()) domain = { "name": "USD Coin", "version": "2", "chainId": chain_num, "verifyingContract": USDC_BASE, } types = { "EIP712Domain": [ {"name": "name", "type": "string"}, {"name": "version", "type": "string"}, {"name": "chainId", "type": "uint256"}, {"name": "verifyingContract", "type": "address"}, ], "TransferWithAuthorization": [ {"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "validAfter", "type": "uint256"}, {"name": "validBefore", "type": "uint256"}, {"name": "nonce", "type": "bytes32"}, ], } message = { "from": sender, "to": recipient, "value": amount_usdc, "validAfter": now - 10, "validBefore": now + 300, "nonce": bytes.fromhex(nonce[2:]), } signable = encode_typed_data( full_message={"types": types, "primaryType": "TransferWithAuthorization", "domain": domain, "message": message} ) signed = Account.sign_message(signable, private_key=sender_key) payload = { "chainId": CHAIN_ID, "amount": str(amount_usdc), "sender": sender, "recipient": recipient, "nonce": nonce, "signature": signed.signature.hex(), "validAfter": now - 10, "validBefore": now + 300, } return base64.b64encode(json.dumps(payload).encode()).decode() def verify_entity_x402( entity_name: str, country: str, sender_key: str, quality: str = "fresh", # cached | fresh ) -> dict: # Step 1: Probe for the quote. The 402 carries the exact amount for this # endpoint and quality tier, so no price is hard-coded here. probe = httpx.post( "https://api.limitguard.ai/v1/entity/check", headers={"X-Response-Quality": quality, "Content-Type": "application/json"}, json={"entity_name": entity_name, "country": country}, ) assert probe.status_code == 402, f"Expected 402, got {probe.status_code}" accepted = next( a for a in probe.json()["accepts"] if a["network"] == CHAIN_ID and a["scheme"] == "exact" ) amount = int(accepted["amount"]) # Step 2: Build payment and call x_payment = build_x402_payment(amount, sender_key, accepted["payTo"]) response = httpx.post( "https://api.limitguard.ai/v1/entity/check", headers={ "X-PAYMENT": x_payment, "X-Response-Quality": quality, "Content-Type": "application/json", }, json={"entity_name": entity_name, "country": country}, timeout=15.0, ) response.raise_for_status() return response.json() # Usage result = verify_entity_x402( entity_name="Acme Corp BV", country="NL", sender_key="0xYOUR_AGENT_WALLET_PRIVATE_KEY", quality="fresh", ) print(f"Trust score: {result['trust_score']}, {result['recommendation']}") ``` ```javascript JavaScript theme={null} import { ethers } from "ethers"; const USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"; const CHAIN_ID = "eip155:8453"; async function buildX402Payment(amountUsdc, signer, recipient) { const chainNum = parseInt(CHAIN_ID.split(":")[1]); const nonce = "0x" + [...crypto.getRandomValues(new Uint8Array(32))] .map((b) => b.toString(16).padStart(2, "0")) .join(""); const now = Math.floor(Date.now() / 1000); const domain = { name: "USD Coin", version: "2", chainId: chainNum, verifyingContract: USDC_BASE, }; const types = { TransferWithAuthorization: [ { name: "from", type: "address" }, { name: "to", type: "address" }, { name: "value", type: "uint256" }, { name: "validAfter", type: "uint256" }, { name: "validBefore", type: "uint256" }, { name: "nonce", type: "bytes32" }, ], }; const message = { from: signer.address, to: recipient, value: amountUsdc, validAfter: now - 10, validBefore: now + 300, nonce, }; const signature = await signer.signTypedData(domain, types, message); return btoa( JSON.stringify({ chainId: CHAIN_ID, amount: String(amountUsdc), sender: signer.address, recipient, nonce, signature, validAfter: now - 10, validBefore: now + 300, }) ); } async function verifyEntityX402(entityName, country, signer, quality = "fresh") { // Step 1: Probe for the quote. The 402 carries the exact amount for this // endpoint and quality tier, so no price is hard-coded here. const probe = await fetch("https://api.limitguard.ai/v1/entity/check", { method: "POST", headers: { "X-Response-Quality": quality, "Content-Type": "application/json", }, body: JSON.stringify({ entity_name: entityName, country }), }); if (probe.status !== 402) throw new Error(`Expected 402, got ${probe.status}`); const { accepts } = await probe.json(); const accepted = accepts.find((a) => a.network === CHAIN_ID && a.scheme === "exact"); const amount = parseInt(accepted.amount, 10); // Step 2: Build payment and call const xPayment = await buildX402Payment(amount, signer, accepted.payTo); const response = await fetch("https://api.limitguard.ai/v1/entity/check", { method: "POST", headers: { "X-PAYMENT": xPayment, "X-Response-Quality": quality, "Content-Type": "application/json", }, body: JSON.stringify({ entity_name: entityName, country }), }); if (!response.ok) throw new Error(`Limitguard error: ${response.status}`); return response.json(); } // Usage const provider = new ethers.JsonRpcProvider("https://mainnet.base.org"); const signer = new ethers.Wallet(process.env.AGENT_PRIVATE_KEY, provider); const result = await verifyEntityX402("Acme Corp BV", "NL", signer, "fresh"); console.log(`Trust score: ${result.trust_score}, ${result.recommendation}`); ``` ### Quality Tiers Control cost vs. freshness with the `X-Response-Quality` header. The payment amount must match or exceed the tier price. | Tier | Header Value | /v1/entity/check (x402 agent price) | /v1/risk/score (x402 agent price) | /v1/kyb/check (x402 agent price) | Data Freshness | | - | - | - | - | - | - | | Cached | `cached` | \$0.11 (110,000) | \$0.11 (110,000) | \$0.25 (250,000) | From cache: 1 h for entity and KYB, 7 days for risk | | Fresh | `fresh` | \$0.29 (290,000) | \$0.25 (250,000) | \$0.29 (290,000) | Live fan-out (default) | These are the x402 agent prices. An API key is debited the account prices instead: \$1.05, \$0.90 and \$1.50 on `fresh`, and \$0.11, \$0.11 and \$0.25 on `cached`. `enhanced` was retired on these endpoints on 2026-09-24: it ran the same sources as `fresh`, so it is now quoted, charged and served at the `fresh` price. For more sources, use `POST /v1/entity/deep-check`. > [!TIP] > > For high-frequency screening (e.g., checking every inbound invoice), start with `cached` for pre-screening and only upgrade to `fresh` when the cached score is below 70. A cached entity check costs about 9.5x less than a fresh one with an API key and about 2.6x less with x402 (see [Pricing](/pricing#agent-prices-x402)), which is what this saves on clean counterparties. *** ## End-to-End Agent Example This example shows a complete autonomous payment agent, from cold start to decision, using discovery, x402 payment, and trust-gated execution. ```mermaid theme={null} sequenceDiagram participant Agent participant Limitguard participant Blockchain Agent->>Limitguard: GET /.well-known/x402.json Limitguard-->>Agent: Pricing + endpoints + networks Note over Agent: Invoice received: Acme Corp BV, €500 Agent->>Limitguard: POST /v1/risk/score (cached, probe, no payment) Limitguard-->>Agent: HTTP 402, amount 110000, payTo 0xFaci... Agent->>Blockchain: EIP-3009 TransferWithAuthorization signature Note over Agent: Signs locally, no on-chain tx yet Agent->>Limitguard: POST /v1/risk/score (X-PAYMENT header) Limitguard->>Blockchain: Verify + settle signature Blockchain-->>Limitguard: Confirmed Limitguard-->>Agent: risk_score: 22, recommendation: review Note over Agent: Risk score low, upgrade to full check Agent->>Limitguard: POST /v1/entity/check (fresh, amount from its own 402) Limitguard-->>Agent: trust_score: 87, recommendation: proceed Note over Agent: Score ≥ 80, proceed autonomously Agent->>Agent: Execute payment, log trust_score in audit trail ``` ### Complete Implementation ```python Python theme={null} import base64 import json import os import secrets import time from dataclasses import dataclass from enum import Enum import httpx from eth_account import Account from eth_account.messages import encode_typed_data class TrustDecision(Enum): PROCEED = "proceed" REVIEW = "review" ENHANCED_DUE_DILIGENCE = "enhanced_due_diligence" BLOCK = "block" @dataclass class TrustResult: score: int level: str decision: TrustDecision cluster: str sources_checked: int processing_ms: int paid_usdc: float class TrustGatedAgent: """ An autonomous payment agent that verifies counterparty trust before executing transactions — no human in the loop. """ DISCOVERY_URL = "https://api.limitguard.ai/.well-known/x402.json" BASE_URL = "https://api.limitguard.ai" USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" CHAIN_ID = "eip155:8453" # Prices are read from each 402 quote, never hard-coded: the quote carries the # exact amount (USDC 6-decimal units) for the endpoint and quality tier asked for. def __init__(self, wallet_private_key: str): self.wallet = Account.from_key(wallet_private_key) self._discovery_cache: dict | None = None # ------------------------------------------------------------------ # # Discovery # # ------------------------------------------------------------------ # def discover(self) -> dict: """Fetch and cache the x402 service listing.""" if self._discovery_cache is None: response = httpx.get(self.DISCOVERY_URL, timeout=5.0) response.raise_for_status() self._discovery_cache = response.json() return self._discovery_cache def is_listed(self, endpoint: str) -> bool: """True if the x402 listing sells this endpoint.""" return any(e["path"] == endpoint for e in self.discover()["endpoints"]) # ------------------------------------------------------------------ # # Payment # # ------------------------------------------------------------------ # def _quote(self, endpoint: str, payload: dict, quality: str) -> dict: """Probe an endpoint without payment and return its Base "exact" quote.""" if not self.is_listed(endpoint): raise ValueError(f"Endpoint {endpoint} not in discovery listing") probe = httpx.post( f"{self.BASE_URL}{endpoint}", headers={"X-Response-Quality": quality, "Content-Type": "application/json"}, json=payload, timeout=10.0, ) if probe.status_code != 402: raise RuntimeError(f"Expected 402 probe, got {probe.status_code}") for option in probe.json()["accepts"]: if option["network"] == self.CHAIN_ID and option["scheme"] == "exact": return option raise RuntimeError(f"No {self.CHAIN_ID} option in the 402 quote") def _build_payment(self, amount: int, recipient: str) -> str: """Build an EIP-3009 x402 payment header.""" chain_num = int(self.CHAIN_ID.split(":")[1]) nonce = "0x" + secrets.token_hex(32) now = int(time.time()) domain = { "name": "USD Coin", "version": "2", "chainId": chain_num, "verifyingContract": self.USDC_BASE, } types = { "EIP712Domain": [ {"name": "name", "type": "string"}, {"name": "version", "type": "string"}, {"name": "chainId", "type": "uint256"}, {"name": "verifyingContract", "type": "address"}, ], "TransferWithAuthorization": [ {"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "validAfter", "type": "uint256"}, {"name": "validBefore", "type": "uint256"}, {"name": "nonce", "type": "bytes32"}, ], } message = { "from": self.wallet.address, "to": recipient, "value": amount, "validAfter": now - 10, "validBefore": now + 300, "nonce": bytes.fromhex(nonce[2:]), } signable = encode_typed_data( full_message={"types": types, "primaryType": "TransferWithAuthorization", "domain": domain, "message": message} ) signed = Account.sign_message(signable, private_key=self.wallet.key) payload = { "chainId": self.CHAIN_ID, "amount": str(amount), "sender": self.wallet.address, "recipient": recipient, "nonce": nonce, "signature": signed.signature.hex(), "validAfter": now - 10, "validBefore": now + 300, } return base64.b64encode(json.dumps(payload).encode()).decode() def _call(self, endpoint: str, payload: dict, quality: str) -> tuple[dict, int]: """Make a paid API call. Returns the response and the amount paid.""" quote = self._quote(endpoint, payload, quality) amount = int(quote["amount"]) # exactly what the 402 asked for x_payment = self._build_payment(amount, quote["payTo"]) response = httpx.post( f"{self.BASE_URL}{endpoint}", headers={ "X-PAYMENT": x_payment, "X-Response-Quality": quality, "Content-Type": "application/json", }, json=payload, timeout=15.0, ) response.raise_for_status() return response.json(), amount # ------------------------------------------------------------------ # # Trust verification logic # # ------------------------------------------------------------------ # def _score_to_decision(self, score: int) -> TrustDecision: if score >= 80: return TrustDecision.PROCEED elif score >= 60: return TrustDecision.REVIEW elif score >= 40: return TrustDecision.ENHANCED_DUE_DILIGENCE else: return TrustDecision.BLOCK def verify(self, entity_name: str, country: str, **kwargs) -> TrustResult: """ Verify an entity using a two-pass strategy: 1. Cheap risk score pre-screen 2. Full entity check only if pre-screen passes """ payload = {"entity_name": entity_name, "country": country, **kwargs} total_paid = 0.0 # Pass 1: Fast pre-screen (cached tier). /v1/risk/score takes only # entity_name and country; any other field is rejected with a 422. risk_payload = {"entity_name": entity_name, "country": country} risk_data, paid = self._call("/v1/risk/score", risk_payload, quality="cached") total_paid += paid / 1_000_000 pre_score = risk_data.get("risk_score", 50) if pre_score > 80: # High risk — block immediately without paying for full check return TrustResult( score=100 - pre_score, level="high_risk", decision=TrustDecision.BLOCK, cluster="unknown", sources_checked=0, # the risk response does not report sources_checked processing_ms=risk_data.get("processing_time_ms", 0), paid_usdc=total_paid, ) # Pass 2: Full entity check (fresh tier) trust_data, paid = self._call("/v1/entity/check", payload, quality="fresh") total_paid += paid / 1_000_000 trust_score = trust_data["trust_score"] decision = self._score_to_decision(trust_score) return TrustResult( score=trust_score, level=trust_data["trust_level"], decision=decision, cluster=trust_data.get("cluster", "unknown"), sources_checked=trust_data.get("sources_checked", 0), processing_ms=trust_data.get("processing_time_ms", 0), paid_usdc=total_paid, ) def should_pay_invoice( self, invoice_id: str, supplier_name: str, country: str, amount_eur: float, **entity_kwargs, ) -> tuple[bool, TrustResult]: """ Top-level decision: should this invoice be paid autonomously? Returns (approved, trust_result). """ result = self.verify(supplier_name, country, **entity_kwargs) approved = result.decision in (TrustDecision.PROCEED, TrustDecision.REVIEW) print( f"Invoice {invoice_id} | Supplier: {supplier_name} | " f"Amount: €{amount_eur:.2f} | " f"Trust: {result.score}/100 ({result.decision.value}) | " f"Cost: ${result.paid_usdc:.3f} USDC" ) return approved, result # ------------------------------------------------------------------ # # Usage # # ------------------------------------------------------------------ # agent = TrustGatedAgent(wallet_private_key=os.environ["AGENT_WALLET_KEY"]) approved, trust = agent.should_pay_invoice( invoice_id="INV-2024-447", supplier_name="Acme Corp BV", country="NL", amount_eur=500.00, kvk_number="12345678", domain="acme-corp.nl", ) if approved: print(f"Proceeding with payment. Cluster: {trust.cluster}") # execute_payment(...) else: print(f"Payment blocked. Score: {trust.score}. Alerting operator.") # alert_operator(...) ``` ```javascript JavaScript theme={null} import { ethers } from "ethers"; const USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"; const CHAIN_ID = "eip155:8453"; const BASE_URL = "https://api.limitguard.ai"; const TrustDecision = { PROCEED: "proceed", REVIEW: "review", ENHANCED_DUE_DILIGENCE: "enhanced_due_diligence", BLOCK: "block", }; // Prices are read from each 402 quote, never hard-coded: the quote carries the // exact amount (USDC 6-decimal units) for the endpoint and quality tier asked for. class TrustGatedAgent { constructor(privateKey) { const provider = new ethers.JsonRpcProvider("https://mainnet.base.org"); this.signer = new ethers.Wallet(privateKey, provider); this._discoveryCache = null; } async discover() { if (!this._discoveryCache) { const res = await fetch(`${BASE_URL}/.well-known/x402.json`); this._discoveryCache = await res.json(); } return this._discoveryCache; } async quote(endpoint, payload, quality) { const listing = await this.discover(); if (!listing.endpoints.some((e) => e.path === endpoint)) { throw new Error(`Endpoint ${endpoint} not in discovery listing`); } const probe = await fetch(`${BASE_URL}${endpoint}`, { method: "POST", headers: { "X-Response-Quality": quality, "Content-Type": "application/json" }, body: JSON.stringify(payload), }); if (probe.status !== 402) throw new Error(`Expected 402, got ${probe.status}`); const { accepts } = await probe.json(); const base = accepts.find((a) => a.network === CHAIN_ID && a.scheme === "exact"); if (!base) throw new Error(`No ${CHAIN_ID} option in the 402 quote`); return base; } async buildPayment(amount, recipient) { const chainNum = parseInt(CHAIN_ID.split(":")[1]); const nonce = "0x" + [...crypto.getRandomValues(new Uint8Array(32))] .map((b) => b.toString(16).padStart(2, "0")) .join(""); const now = Math.floor(Date.now() / 1000); const domain = { name: "USD Coin", version: "2", chainId: chainNum, verifyingContract: USDC_BASE, }; const types = { TransferWithAuthorization: [ { name: "from", type: "address" }, { name: "to", type: "address" }, { name: "value", type: "uint256" }, { name: "validAfter", type: "uint256" }, { name: "validBefore", type: "uint256" }, { name: "nonce", type: "bytes32" }, ], }; const message = { from: this.signer.address, to: recipient, value: amount, validAfter: now - 10, validBefore: now + 300, nonce, }; const signature = await this.signer.signTypedData(domain, types, message); return btoa( JSON.stringify({ chainId: CHAIN_ID, amount: String(amount), sender: this.signer.address, recipient, nonce, signature, validAfter: now - 10, validBefore: now + 300, }) ); } async call(endpoint, payload, quality) { const quote = await this.quote(endpoint, payload, quality); const amount = parseInt(quote.amount, 10); // exactly what the 402 asked for const xPayment = await this.buildPayment(amount, quote.payTo); const res = await fetch(`${BASE_URL}${endpoint}`, { method: "POST", headers: { "X-PAYMENT": xPayment, "X-Response-Quality": quality, "Content-Type": "application/json", }, body: JSON.stringify(payload), }); if (!res.ok) throw new Error(`Limitguard error: ${res.status}`); return { data: await res.json(), amount }; } scoreToDecision(score) { if (score >= 80) return TrustDecision.PROCEED; if (score >= 60) return TrustDecision.REVIEW; if (score >= 40) return TrustDecision.ENHANCED_DUE_DILIGENCE; return TrustDecision.BLOCK; } async verify(entityName, country, extras = {}) { const payload = { entity_name: entityName, country, ...extras }; let totalPaid = 0; // Pass 1: Fast pre-screen (cached tier). /v1/risk/score takes only // entity_name and country; any other field is rejected with a 422. const riskPayload = { entity_name: entityName, country }; const { data: riskData, amount: riskPaid } = await this.call("/v1/risk/score", riskPayload, "cached"); totalPaid += riskPaid / 1_000_000; const preScore = riskData.risk_score ?? 50; if (preScore > 80) { return { score: 100 - preScore, level: "high_risk", decision: TrustDecision.BLOCK, cluster: "unknown", paidUsdc: totalPaid, }; } // Pass 2: Full entity check (fresh tier) const { data: trustData, amount: trustPaid } = await this.call("/v1/entity/check", payload, "fresh"); totalPaid += trustPaid / 1_000_000; return { score: trustData.trust_score, level: trustData.trust_level, decision: this.scoreToDecision(trustData.trust_score), cluster: trustData.cluster ?? "unknown", sourcesChecked: trustData.sources_checked ?? 0, processingMs: trustData.processing_time_ms ?? 0, paidUsdc: totalPaid, }; } async shouldPayInvoice(invoiceId, supplierName, country, amountEur, extras = {}) { const result = await this.verify(supplierName, country, extras); const approved = [TrustDecision.PROCEED, TrustDecision.REVIEW].includes( result.decision ); console.log( `Invoice ${invoiceId} | ${supplierName} | €${amountEur} | ` + `Trust: ${result.score}/100 (${result.decision}) | ` + `Cost: $${result.paidUsdc.toFixed(3)} USDC` ); return { approved, result }; } } // Usage const agent = new TrustGatedAgent(process.env.AGENT_WALLET_KEY); const { approved, result } = await agent.shouldPayInvoice( "INV-2024-447", "Acme Corp BV", "NL", 500.0, { kvk_number: "12345678", domain: "acme-corp.nl" } ); if (approved) { console.log(`Proceeding. Cluster: ${result.cluster}`); } else { console.log(`Blocked. Score: ${result.score}. Alerting operator.`); } ``` *** ## llms.txt: LLM Context Loading Limitguard implements the [llms.txt standard](https://llmstxt.org/): machine-readable files that let any LLM load a structured API summary into its context window. ### Endpoints | File | Size | Use | | - | - | - | | `/llms.txt` | \~16 KB | Quick context loading: overview + key endpoints | | `/llms-full.txt` | \~24 KB | Complete reference: all endpoints, pricing, examples | ```bash theme={null} # Load into a Claude session curl https://api.limitguard.ai/llms.txt # Load full reference for agent coding tasks curl https://api.limitguard.ai/llms-full.txt ``` ### When to Use llms.txt ```python Python theme={null} import httpx def load_limitguard_context(full: bool = False) -> str: """Load Limitguard API context for injection into an LLM prompt.""" url = "https://api.limitguard.ai/llms-full.txt" if full else "https://api.limitguard.ai/llms.txt" response = httpx.get(url, timeout=5.0) response.raise_for_status() return response.text # Inject into a system prompt for a coding assistant context = load_limitguard_context(full=True) system_prompt = f"""You are a payment automation assistant. You have access to the Limitguard lead and company check API. {context} Before authorizing any payment, call the entity check endpoint. Block all transactions where recommendation is 'block'. """ ``` ```javascript JavaScript theme={null} async function loadLimitguardContext(full = false) { const url = full ? "https://api.limitguard.ai/llms-full.txt" : "https://api.limitguard.ai/llms.txt"; const res = await fetch(url); return res.text(); } // Inject into a system prompt const context = await loadLimitguardContext(true); const systemPrompt = `You are a payment automation assistant. You have access to the Limitguard lead and company check API. ${context} Before authorizing any payment, call the entity check endpoint. Block all transactions where recommendation is 'block'.`; ``` > [!TIP] > > Use `/llms.txt` (concise) for general-purpose agents where token budget matters. Use `/llms-full.txt` when the agent needs to generate code that calls Limitguard: the full reference includes request/response schemas and error codes. *** ## Cross-Sell Recommendations Agents calling one endpoint can discover complementary services at runtime: ```bash theme={null} curl "https://api.limitguard.ai/v1/sales/recommendations?current_endpoint=/v1/risk/score" \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" ``` ```json Response theme={null} { "current_endpoint": "/v1/risk/score", "recommendations": [ { "endpoint": "/v1/entity/check", "reason": "Full entity check for deeper intelligence", "price_usdc": 1.05 } ] } ``` The endpoint needs an API key (a free or sandbox key works). An optional `trust_score` parameter is accepted but does not change the answer today. Agents can use this to self-direct their verification strategy without hardcoded decision trees. *** ## Sandbox Mode for Agent Development Build and test your agent integration without spending USDC or calling real data sources. ### Activating Sandbox for Agents Sandbox mode is decided by the key: create a free `lg_sandbox_` key once and send it like any other key. There is no sandbox header, and `lg_test_` keys are refused in production. ```python Python theme={null} import httpx # Once: a free sandbox key (no wallet, no payment) SANDBOX_KEY = httpx.post( "https://api.limitguard.ai/v1/keys/create", json={"email": "you@example.com", "tier": "sandbox"}, ).json()["api_key"] # lg_sandbox_... def verify_entity(entity_name: str, country: str, api_key: str) -> dict: """The same call in sandbox and production; only the key differs.""" response = httpx.post( "https://api.limitguard.ai/v1/entity/check", headers={"X-API-Key": api_key, "Content-Type": "application/json"}, json={"entity_name": entity_name, "country": country}, timeout=10.0, ) response.raise_for_status() return response.json() # Sandbox response is deterministic: useful for unit tests result = verify_entity("Any Company", "NL", api_key=SANDBOX_KEY) # Always returns: trust_score: 75, recommendation: "review", sandbox: true ``` ```javascript JavaScript theme={null} // Pick the key by environment: the sandbox key can never trigger a paid call const apiKey = process.env.NODE_ENV === "production" ? process.env.LIMITGUARD_API_KEY // lg_live_... : process.env.LIMITGUARD_SANDBOX_KEY; // lg_sandbox_... async function verifyEntity(entityName, country) { const res = await fetch("https://api.limitguard.ai/v1/entity/check", { method: "POST", headers: { "X-API-Key": apiKey, "Content-Type": "application/json" }, body: JSON.stringify({ entity_name: entityName, country }), }); return res.json(); } ``` ### Sandbox Behavior Reference | Property | Sandbox | Production | | - | - | - | | Data sources | Mock only: no real KVK, sanctions, VIES | Live sources (which ones run depends on the identifiers you send) | | Responses | Deterministic (same input = same output), `sandbox: true` | Live results | | x402 payment | Skipped entirely | Required (or API key) | | Balance | Not debited | Debited per call (or paid per call with x402) | | Rate limit | 10 req/min per IP | Tier-based | ### Writing Agent Tests with Sandbox ```python theme={null} import httpx API_KEY = "lg_sandbox_xxxxxxxxxxxxxxxxxxxx" # a sandbox key: mock data on the endpoints the sandbox covers def score_to_decision(score: int) -> str: """The same thresholds as TrustGatedAgent above.""" if score >= 80: return "proceed" if score >= 60: return "review" if score >= 40: return "enhanced_due_diligence" return "block" def test_score_routing(): """The routing logic, without a network call.""" assert score_to_decision(85) == "proceed" assert score_to_decision(75) == "review" assert score_to_decision(30) == "block" def test_sandbox_response_routes(): """A sandbox check returns a well-formed score the agent can route.""" # The sandbox answers with mock data (trust_score 75, so "review"). response = httpx.post( "https://api.limitguard.ai/v1/entity/check", headers={"X-API-Key": API_KEY}, json={"entity_name": "Test Corp", "country": "NL"}, ) assert response.status_code == 200 data = response.json() # Verify response schema assert "trust_score" in data assert "recommendation" in data assert isinstance(data["trust_score"], int) assert 0 <= data["trust_score"] <= 100 # Test agent decision logic decision = score_to_decision(data["trust_score"]) assert decision in ("proceed", "review", "enhanced_due_diligence", "block") def test_discovery_returns_pricing(): """Agent should be able to read pricing from discovery endpoint.""" response = httpx.get("https://api.limitguard.ai/.well-known/x402.json") assert response.status_code == 200 listing = response.json() entity_check = next( (e for e in listing["endpoints"] if e["path"] == "/v1/entity/check"), None, ) assert entity_check is not None assert float(entity_check["price_usdc"]) > 0 ``` *** ## Best Practices ### 1. Cache Discovery Responses Discovery endpoints don't change between deploys. Cache them aggressively. ```python theme={null} from functools import lru_cache import httpx @lru_cache(maxsize=1) def get_discovery() -> dict: """Cache the x402 discovery listing for the lifetime of the process.""" return httpx.get("https://api.limitguard.ai/.well-known/x402.json").json() ``` > [!NOTE] > > The discovery files carry no `Cache-Control` header, so choose your own refresh interval: an hour is plenty, and refreshing more often adds latency with no benefit. ### 2. Handle HTTP 402 Gracefully A well-built agent treats 402 as a normal flow, not an error. ```python theme={null} import httpx def call_with_payment_fallback( endpoint: str, payload: dict, build_payment_fn, ) -> dict: # Attempt 1: without payment (returns 402 with requirements) probe = httpx.post(endpoint, json=payload) if probe.status_code == 402: # Normal flow — extract requirements and retry with payment requirements = probe.json() x_payment = build_payment_fn(requirements) response = httpx.post( endpoint, headers={"X-PAYMENT": x_payment}, json=payload, ) response.raise_for_status() return response.json() elif probe.status_code == 200: # Unexpected free response (e.g., cached hit or sandbox) return probe.json() else: probe.raise_for_status() ``` ### 3. Use Quality Tiers Strategically Don't pay for `fresh` when `cached` is sufficient. | Scenario | Recommended Tier | Reason | | - | - | - | | First-time supplier onboarding | `POST /v1/entity/deep-check` | High stakes: adds PEP/RCA screening and the Dutch insolvency register | | Repeat invoice from known supplier | `cached` | Already verified, use cached result | | Pre-screening inbound leads | `cached` | Volume operation, cost matters | | Transaction >\$10,000 | `fresh` | High value, needs live data | | Compliance audit trigger | `POST /v1/reports/entity` | Stored report with every source's status and an evidence hash | ### 4. Log Trust Scores in Your Audit Trail For regulated workflows, store the trust score alongside the transaction: ```python theme={null} import datetime def execute_payment_with_audit( invoice_id: str, supplier: str, amount: float, trust_result: TrustResult, ) -> None: audit_entry = { "invoice_id": invoice_id, "supplier": supplier, "amount": amount, "timestamp": datetime.datetime.utcnow().isoformat(), "trust_score": trust_result.score, "trust_level": trust_result.level, "trust_decision": trust_result.decision.value, "trust_cluster": trust_result.cluster, "sources_checked": trust_result.sources_checked, "verification_cost_usdc": trust_result.paid_usdc, } # Store to your audit database db.insert("payment_audit_log", audit_entry) ``` ### 5. Set Nonce Expiry Windows Conservatively The server remembers each x402 nonce for ten minutes, the quote's `maxTimeoutSeconds` (600). Keep `validBefore` inside that window: `now + 300` (five minutes) is tight enough to prevent replay attacks and wide enough to survive network retries. ### 6. Never Hardcode Facilitator Addresses The facilitator address is returned dynamically in each 402 response, as `payTo`. Always read it from the response: never hardcode it. The address can change during upgrades. *** ## Protocol Comparison | | MCP | A2A | x402 | | - | - | - | - | | **Best for** | LLM agents (Claude, GPT) | Multi-agent workflows | Fully autonomous agents | | **Authentication** | API key via manifest config | API key or x402 | USDC wallet (no account) | | **Discovery** | `/.well-known/mcp.json` | `/.well-known/agent.json` | `/.well-known/x402.json` | | **Human setup required** | Minimal (configure MCP server) | Minimal (discover card) | None | | **Cost model** | Prepaid API key balance | Prepaid balance or x402 per call | Pay-per-call USDC | | **Capability negotiation** | Tool definitions | Skill catalog | Endpoint + pricing listing | | **Production maturity** | GA | Beta | GA | *** ## Next Steps > **[x402 Protocol](/x402-protocol)** > > Full x402 implementation guide with EVM and Solana examples > **[Discovery](/discovery)** > > All machine-readable discovery endpoints > **[Sandbox](/sandbox)** > > Test your agent integration for free > **[API Reference](/api-reference/introduction)** > > Interactive playground for every endpoint # Chrome extension Source: https://docs.limitguard.ai/guides/chrome-extension Check the Dutch or Belgian company on the page you are on: install the Limitguard extension, add your API key and run a lead check in one click The Limitguard Chrome extension checks the company behind the page you are looking at, while you prospect. Open it on a company website or a LinkedIn company page: it fills in what the page shows, you confirm, and one click tells you whether the company is real, active and safe to deal with. > **[Add to Chrome](https://chromewebstore.google.com/detail/limitguard-check-nl-and-b/klkeagihibnkdlaahdbnpihgidghanbh)** > > Install Limitguard from the Chrome Web Store. ## Set up **1. Install and pin** [Install the extension](https://chromewebstore.google.com/detail/limitguard-check-nl-and-b/klkeagihibnkdlaahdbnpihgidghanbh) from the Chrome Web Store, then open the puzzle icon in the Chrome toolbar and pin **Limitguard** so it is one click away. **2. Add your API key** Create a key in the [dashboard](https://dashboard.limitguard.ai?utm_source=docs\&utm_medium=docs\&utm_campaign=signup\&utm_content=chrome_extension) under **Keys**, open the extension, click **Add your API key** and paste it. The key is stored on this device only, never synced and never shown in full again. Checks are paid from the credit of the key's workspace. **3. Check a company** Open the extension on a company page. Check the filled-in details, edit anything that is wrong, and click **Check this company**. ## What you see Before a check the popup shows the price of one check and your credit left. After the check: * the verdict: real and active, inactive, not found, ambiguous, unverifiable or sanctioned * a risk word: **Low risk**, **Review first** or **High risk** (see below) * the register status, legal form and start date * the VAT number: valid, not valid or not checked * sanctions: a possible match, no match, or not screened * the lead score from 0 to 100 and any signals behind it * a link to run a full check of the company in your dashboard (that check has its own price and runs only when you click there) | Risk word | When | | - | - | | High risk | A sanctions match, or the company is inactive or not in the register | | Review first | The register gave no clear answer, any signal was raised, or the sanctions screen did not run | | Low risk | Real and active, screened with no sanctions match, no signals | A check is a [lead check](/guides/ai-agent-integration) (`POST /v1/leads/verify`); its price is on the [Pricing](/pricing) page. ## What it fills in The extension reads a page only when you open it there. It suggests: * **Website domain** from the page address. * **Company name** from the site name the page declares, or on a LinkedIn company page from the page heading. On LinkedIn it reads the company name only, never people or posts. * **KVK, KBO or VAT number** from the text at the bottom of the page. A KVK number is taken only right after a word such as KvK or Kamer van Koophandel; a Belgian enterprise number must pass its checksum. * **Country** from the number it found, else the `.nl` or `.be` domain (the default is the Netherlands). Under the form it says where each value came from. You can change every field. ## No number on the page * **Netherlands:** a company name is enough. Type the name and click Check: Limitguard looks it up in the KVK register and checks it when exactly one company matches. If several match, the answer is *ambiguous*; add the KVK number. * **Belgium:** a check needs the 10-digit KBO number. A Belgian VAT number is `BE` plus that number, so `BE0460370809` gives `0460370809`. Belgian websites must show the enterprise number, usually on their legal, disclaimer or terms page: open the extension on that page and it fills the number in. * **Only a website:** a domain alone does not identify a company in the register. Add the name (Netherlands) or the number. ## Messages | Message | What to do | | - | - | | Add your API key to start | Paste a key from the dashboard in Settings | | Your API key was not accepted | Check or replace the key in Settings | | Not enough credit for this check | Top up in the dashboard | | Your workspace spending limit is reached | Change the limit in the dashboard | | Too many checks in a short time | Wait the time the message names | | The register did not answer | Nothing was charged; try again later | | Limitguard did not answer in time | The check may still have been charged: look at your credit before you try again | ## Privacy and permissions Nothing from the page is sent until you click **Check this company**. When you open the extension it asks Limitguard only for the price and, with your key, your credit left. A check sends only the company name, number, VAT number, website and country you confirmed. The extension has no analytics or tracking and loads no code from other servers. | Permission | Why | | - | - | | `storage` | Keeps your API key and language on this device | | `activeTab` | Reads the address and title of the tab you opened the extension on, only then | | `scripting` | Reads the site name and the text at the bottom of that tab, only after you open the extension | | `api.limitguard.ai` | Sends the check you confirmed to the Limitguard API | Full details are in the [privacy policy](https://limitguard.ai/privacy/?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=chrome_extension#chrome-extension). Remove your key in the extension's Settings, or uninstall the extension, at any time. # Use Limitguard in Claude Source: https://docs.limitguard.ai/guides/claude-connector Add the Limitguard connector to Claude, sign in with your Limitguard account and run checks from a chat, paid from a workspace balance The Limitguard connector lets Claude check a Dutch or Belgian company, a sales lead, a name on the sanctions lists or a wallet while you chat. You sign in with your Limitguard account: there is no API key to copy, and checks are paid from the credit balance of a workspace you choose. > [!NOTE] > > This page is about the connector you sign in to. Developers and agents that connect with an API key or pay per call with x402 use `https://api.limitguard.ai/mcp` instead; see [AI Agent Integration](/guides/ai-agent-integration#mcp-model-context-protocol) and [Pay Per Call](/guides/pay-per-call). ## Before you start * A Limitguard account. Create one for free at [dashboard.limitguard.ai](https://dashboard.limitguard.ai?utm_source=docs\&utm_medium=docs\&utm_campaign=signup\&utm_content=claude_connector). * A workspace. Signing up creates one; the connector charges it for paid checks. * Credit in that workspace for paid checks. Top up in the dashboard. The free tools work without credit. ## Connect **1. Add the connector** In Claude, open **Customize > Connectors**, then **+ Add > Add custom connector**. Name it `Limitguard` and use the URL `https://api.limitguard.ai/mcp-oauth`. Claude detects that the server needs a sign-in and registers itself; no headers or client ID are needed. On a Team or Enterprise plan, an owner adds connectors under Organization settings. **2. Sign in and choose the workspace that pays** Claude opens the Limitguard page **Connect Claude to Limitguard?**. Sign in if asked, choose the **Workspace that pays** and click **Allow**. Checks Claude runs are paid from that workspace's balance. Your role in the workspace must allow connecting apps; owners and admins can. **3. Ask in plain words** In a chat with the connector on, ask for example: *"Verify the Dutch company ASML Holding N.V., KVK 17085815, as a sales lead"* or *"Screen the name Proximus NV against the sanctions lists"*. Claude asks you to approve each tool call unless you allow it permanently. ## Tools The connector has the same tools as the Limitguard MCP server. Each runs one check and returns what it found, where and when. | Tool | What it does | | - | - | | `verify_lead` | Checks a Dutch or Belgian sales lead against the KVK or KBO register, VIES, the mail server, an IBAN if given and the sanctions lists, with a 0-100 lead score | | `check_entity` | Company check: register, sanctions, country risk and the website domain if given, with a trust score and recommendation | | `get_compliance_report` | A per-company report with identity, sanctions and PEP screens, financials where filed, a status per source and a report hash. It saves the report to the workspace history, which is why Claude lists it as a tool that writes | | `get_risk_score` | Quick risk score from sanctions and country risk only | | `get_trust_score` | Your own latest stored trust score for a company you checked before (free) | | `sanctions_preview` | Free yes/no preview of a name against the OFAC, EU and UN lists | | `sanctions_screen` | The matched sanctions entries for a name | | `wallet_sanctions_preview` | Free yes/no check of a wallet address against the OFAC list | | `verify_wallet` | Wallet screen: sanctions, balances, activity and risk rules, on Base and Solana | | `check_agent_wallet` | Checks an AI agent's wallet and its ERC-8004 identity before you pay it | Prices per call are on the [Pricing](/pricing#mcp-tool-endpoints) page. The free previews allow 10 calls per caller per UTC day each. ## Paying * A paid check is taken from the balance of the workspace you chose when you connected. Without enough credit the call is refused with a plain message and nothing is charged. * A call that returns an error, for example because a register did not answer, is not charged. * If you turned on automatic top-up in the dashboard, a balance that falls below your threshold can trigger that top-up to your own card, as it does for any other check. * The connector moves no money or crypto to anyone else. The wallet tools only read public chain data. ## Manage or disconnect * **In Limitguard:** a workspace owner sees every connected app under **Settings > Connected apps**, and can disconnect one at once or move it to another workspace they own. * **In Claude:** remove the connector under Customize > Connectors. ## Privacy Limitguard receives only what a tool needs: the company name, number, country, website or wallet you ask about, never your conversation. Data is processed in the EU. See the [privacy policy](https://limitguard.ai/privacy/?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=claude_connector). # Error Handling Source: https://docs.limitguard.ai/guides/errors Complete error catalog with causes and fixes All Limitguard API errors follow [RFC 7807 Problem Details](https://www.rfc-editor.org/rfc/rfc7807) for consistent, machine-readable responses. Every error has a `type`, `title`, `status`, and `detail` field, which makes automated error handling straightforward for both human developers and AI agents. > [!NOTE] > > The `type` field is `"about:blank"` for most errors. Validation errors, entity report errors (see [Entity report errors](#entity-report-errors)) and withdrawn trust badge calls (see [Trust Badge Unavailable](#trust-badge-unavailable)) use a `type` URI that links to their entry on this page. ## Status Code Reference | Code | Name | Common Cause | | - | - | - | | `200` | OK | Successful GET or POST with result | | `201` | Created | Resource successfully created (e.g., API key, webhook) | | `204` | No Content | Successful DELETE, no body returned | | `400` | Bad Request | A path segment is still a `:name` placeholder, or an invalid tier on key creation or upgrade | | `401` | Unauthorized | Missing or invalid `X-API-Key` | | `402` | Payment Required | x402: no payment header sent, or insufficient amount | | `403` | Forbidden | Key exists but lacks permission for this endpoint or tier | | `404` | Not Found | Entity, webhook, or resource ID does not exist | | `410` | Gone | Withdrawn endpoint, such as the trust badge routes | | `422` | Unprocessable Entity | Missing field, invalid value or malformed JSON body | | `429` | Too Many Requests | Per-minute or rolling 24-hour rate limit exceeded | | `500` | Internal Server Error | Unexpected server error, safe to retry | | `503` | Service Unavailable | Planned maintenance or cascading dependency failure | *** ## Error Response Format ### Standard Error All non-2xx responses return RFC 7807 problem details: ```json theme={null} { "type": "about:blank", "title": "Unauthorized", "status": 401, "detail": "Invalid API key. Create one: POST https://api.limitguard.ai/v1/keys/create with JSON {\"email\": \"you@example.com\", \"tier\": \"free\"}, then send header Authorization: Bearer lg_... MCP setup: https://limitguard.ai/mcp", "instance": "/v1/keys/usage" } ``` ### Validation Error (422) Field-level validation errors return a `detail` array instead of a string. A missing field, an invalid value and a malformed JSON body all answer this way. Field names are sanitized, so internal paths are not exposed: ```json theme={null} { "type": "https://docs.limitguard.ai/errors#validation-error", "title": "Validation Error", "status": 422, "detail": [ {"field": "entity_name", "message": "Invalid value"} ], "instance": "/v1/entity/check", "errorCode": "validation_error", "note": "Nothing was charged." } ``` Most messages are the generic `Invalid value`. A few rules that Limitguard checks itself carry their own message. > [!TIP] > > When `detail` is an array, iterate over it to surface all field errors at once. This avoids fixing one error only to encounter the next on retry. *** ## 400 Bad Request > **Unsubstituted path parameter** > > **Cause:** A path segment is a `:name` placeholder, such as `:entity_id`, copied from a discovery listing instead of a real identifier. > > ```json theme={null} > { > "error": "unsubstituted_path_parameter", > "parameter": "entity_id", > "detail": "Replace :entity_id with a real identifier.", > "example": "/v1/reputation/history/acme-bv-nl" > } > ``` > > **Fix:** Replace the placeholder with a real value. The `example` field shows the shape of a call; it is not a guaranteed-valid identifier. > **Invalid tier on key creation or upgrade** > > **Cause:** `POST /v1/keys/create` accepts only the free and sandbox tiers, and `POST /v1/keys/upgrade/{tier}` accepts only a tier you can upgrade to. `detail` says which. > > **Fix:** Create a free or sandbox key, then use `POST /v1/keys/upgrade/{tier}` with an x402 payment to upgrade. A missing required field or a malformed JSON body is not a 400. It answers [422](#422-unprocessable-entity). *** ## 401 Unauthorized > **Missing X-API-Key header** > > **Cause:** The request reached an authenticated endpoint without an `X-API-Key` header, and no payment header (`PAYMENT-SIGNATURE` or `X-PAYMENT`) was provided either. > > ```json theme={null} > { > "type": "about:blank", > "title": "Unauthorized", > "status": 401, > "detail": "Authentication required. Get a key: POST https://api.limitguard.ai/v1/keys/create with JSON {\"email\": \"you@example.com\", \"tier\": \"free\"}, send header Authorization: Bearer lg_... MCP setup: https://limitguard.ai/mcp", > "instance": "/v1/keys/usage" > } > ``` > > **Fix:** Add `X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx` to every request. Free endpoints (health, key creation, well-known routes) never require authentication. > **Revoked or expired key** > > **Cause:** The key was valid but has since been revoked or expired. > > **Fix:** Create a new key via `POST /v1/keys/create`. Keys are returned once: if lost, create a new one. > **Test key in production** > > **Cause:** A key starting with `lg_test_` was sent to the production API, which refuses it: `401 Test keys not accepted in production`. > > **Fix:** For mock data use a sandbox key (`lg_sandbox_...`, free from `POST /v1/keys/create` with `"tier": "sandbox"`); for real data use an `lg_live_` key. There is no sandbox header: `X-Limitguard-Mode` is ignored. *** ## 402 Payment Required HTTP 402 is a **protocol response**, not just an error. Limitguard implements the x402 V2 micropayment protocol. When you receive a 402, the response body is not an RFC 7807 error: it is a payment requirements object. > [!NOTE] > > For AI agents, 402 is the expected first response when no payment or API key is provided. The correct flow is: receive 402 → build payment → retry with the `PAYMENT-SIGNATURE` header (or the V1 `X-PAYMENT` header). ### Payment Requirements Response ```json theme={null} { "x402Version": 2, "error": "Payment Required", "errorCode": "payment_required", "resource": { "url": "https://api.limitguard.ai/v1/entity/check", "description": "Full entity trust check across multiple verification layers...", "mimeType": "application/json", "serviceName": "Limitguard", "tags": ["kyb", "sanctions", "lead-verification", "wallet-screening", "compliance"], "iconUrl": "https://limitguard.ai/icon-512.png" }, "accepts": [ { "scheme": "exact", "network": "eip155:8453", "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "amount": "290000", "maxAmountRequired": "290000", "payTo": "0xFacilitatorAddress", "maxTimeoutSeconds": 600, "extra": {"name": "USD Coin", "version": "2", "decimals": 6} }, { "scheme": "exact", "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "amount": "290000", "maxAmountRequired": "290000", "payTo": "SolanaFacilitatorAddress", "maxTimeoutSeconds": 600, "extra": {"name": "USDC", "version": "2", "decimals": 6, "feePayer": "SolanaFeePayerAddress"} } ], "extensions": {"bazaar": {"info": {"...": "sandbox, recovery and documentation hints"}}} } ``` Trimmed: each `accepts` entry also repeats `resource`, `description` and `mimeType`, and a third entry offers the `settled-transfer` scheme. The field reference is on the [x402 Protocol](/x402-protocol) page. ### x402 Payment Flow **1. Receive 402** Parse the `accepts` array. Choose an entry whose `network` (a CAIP-2 chain ID) your agent can pay on. **2. Check the amount** The `amount` field uses 6 decimal places: `290000` is \$0.29 USDC, the x402 agent price of the `fresh` tier of `POST /v1/entity/check` (an API key is debited the account price instead). Pay the `amount` the 402 quotes, and verify your wallet has sufficient balance before signing. **3. Build EIP-3009 signature (EVM) or SPL transfer (Solana)** Sign a `TransferWithAuthorization` to the entry's `payTo`, with a unique nonce and a `validBefore` no more than ten minutes ahead (the quote's `maxTimeoutSeconds` is 600). See the [x402 Protocol](/x402-protocol) guide for full code examples. **4. Retry with the payment header** Base64-encode your payment payload and send it as `PAYMENT-SIGNATURE` (x402 V2) or `X-PAYMENT` (V1). Retry the exact same endpoint and body. ### Common 402 Sub-Cases > **Insufficient payment amount** > > **Cause:** The `amount` in your payment object is less than the minimum required for the endpoint and quality tier. > > ```json theme={null} > { > "x402Version": 2, > "error": "Insufficient payment: 10000 < 290000", > "errorCode": "insufficient_funds", > "accepts": [...] > } > ``` > > **Fix:** Use the `amount` value from the 402 response exactly. If using a non-default `X-Response-Quality` tier, the required amount changes: `cached` requires less. See the [pricing table](/pricing) for per-endpoint amounts. > **Expired payment signature (validBefore exceeded)** > > **Cause:** The `validBefore` timestamp in the EIP-3009 signature has passed (`errorCode: expired_payment`). The quote's `maxTimeoutSeconds` is 600, so sign a `validBefore` no more than ten minutes ahead. > > **Fix:** Rebuild the payment with a fresh timestamp. Do not cache signatures for reuse: build a new one per request. > **Nonce replay detected** > > **Cause:** The same nonce was used in a previous request within the last ten minutes. > > ```json theme={null} > { > "x402Version": 2, > "error": "Nonce already used (replay detected)", > "errorCode": "duplicate_settlement", > "accepts": [...] > } > ``` > > **Fix:** Generate a cryptographically random 32-byte nonce for every request. Never reuse nonces, even if the previous request failed. > **Invalid payment signature** > > **Cause:** The EIP-712 signature does not verify against the claimed sender address, or the Solana signature is malformed. > > **Fix:** Ensure the `sender` field matches the wallet that signed the transaction. Verify the EIP-712 domain parameters match exactly: `name: "USD Coin"`, `version: "2"`, `chainId` as integer, `verifyingContract` as the USDC contract address. > **Unsupported chain** > > **Cause:** The `network` (or `chainId`) in your payment is not one the quote listed in `accepts` (`errorCode: unsupported_network`). > > **Fix:** Pay one of the networks in the 402's `accepts` array. The production API quotes `eip155:8453` (Base Mainnet) and `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` (Solana Mainnet). > [!TIP] > > For testing x402 without spending real USDC, use Base Sepolia or Solana Devnet against a test environment that lists them in its `accepts` array. The production API does not accept testnet payments (`testnet_supported: false` in `/.well-known/x402.json`). ### x402 error codes A 402 that rejects a payment carries `errorCode` in its body beside `error`; the facilitator endpoints `/x402/verify` and `/x402/settle` return the same values as `invalidReason`. This table is generated from the API's `X402ErrorCode` enum. | `errorCode` | Meaning | What to do | | - | - | - | | `insufficient_funds` | `Insufficient payment: X < Y`: the amount is below the price for this endpoint and quality tier. | Use the `amount` from the quote exactly; a non-default `X-Response-Quality` changes it. | | `invalid_nonce` | Defined for facilitator compatibility. The current server reports a malformed nonce as `invalid_payment` and never emits this value. | Treat it as `invalid_payment` if a client library surfaces it. | | `invalid_signature` | The EIP-3009 signature does not verify against `sender`, or a settled-transfer transaction hash failed or was rejected on chain. | Check that the signer is `sender` and the EIP-712 domain matches; for a transaction hash, confirm the transfer succeeded before presenting it. | | `unsupported_network` | The payload's `network` / `chainId` is not one the quote listed in `accepts`. | Pick a network from the `accepts` array. This is not a signature problem. | | `duplicate_settlement` | `Nonce already used (replay detected)`: the nonce was submitted within the last ten minutes, or a settled-transfer proof (EVM `txHash`, confirmed Solana `txSignature`) was already redeemed within its 24-hour window. | Use a fresh random nonce per request. A settled transfer pays exactly once. | | `expired_payment` | `validBefore` has passed. Authorizations are valid for ten minutes. | Sign a fresh authorization; never reuse a signed payload. | | `payment_required` | No API key on a paid tier and no payment header. The body is the quote: `accepts` lists the ways to pay and `extensions.bazaar.info` the recovery path. | Pay one of the `accepts` entries and retry, or create a key. | | `invalid_payment` | The payment header could not be parsed, the amount exceeds the maximum, or `validAfter` is still in the future. | Rebuild the payload from the quote; the envelope is documented on the x402 Protocol page. | | `server_error` | `Payment verification unavailable`: the server could not reach its own state store, or verification failed internally. | Retry with backoff. Nothing was charged. | | `fee_payer_not_configured` | Defined for the Solana co-sign path. The current server does not emit it. | Treat it as `server_error` if a client library surfaces it. | | `settlement_challenge_required` | A settled-transfer proof was presented without the `X-Payment-Challenge` minted with the 402 that quoted this resource, so the caller cannot be tied to the payment request. | Retry with the `X-Payment-Challenge` header from that 402 (also in the settled-transfer entry's `extra.challengeId`). A challenge is bound to one resource and expires. | | `settlement_claim_stuck` | An earlier verification of this proof hit a temporary internal error and its deduplication claim could not be released afterwards. | Retry later with the same proof. This is not a double charge and not a replay. | | `settlement_signature_invalid` | A settled-transfer proof was presented with an `X-Payment-Challenge-Signature` that does not verify against the wallet the transfer came from on chain. The transfer itself is genuine; the signature does not prove the caller sent it. | Sign the challenge message with the wallet that sent the USDC -- see the x402 Protocol page for the exact layout -- or omit the header entirely while it is still optional. Your proof is not consumed by this rejection. | | `insufficient_balance` | `Insufficient prepaid balance`: the API key is on a paid tier but its prepaid balance is below this call's price. `extensions.bazaar.info.prepaidBalance` carries the balance, the price and the top-up path. | Top up via x402 at `POST /v1/keys/topup/{usd}` (or a `/v1/keys/upgrade/{tier}` path), or pay this one call directly by x402 using `accepts`; a key holder who pays by x402 is served like any x402 caller and is not debited. | | `settlement_not_yet_visible` | Our RPC node could not see this settled-transfer hash yet (receipt not found, or its chain head still behind the transaction's block) even after re-reading for a few seconds, or another request with the same hash is still being verified. Nothing is wrong with the proof. | Wait the `Retry-After` seconds and send the same request again, same hash and same `X-Payment-Challenge`. The hash is not consumed and stays valid for the rest of the 150-block window. | *** ## 403 Forbidden > **Entity report with a sandbox key** > > **Cause:** `POST /v1/reports/entity` (and the MCP `get_compliance_report` tool) was called with a sandbox key. Reports are built only from real checks. > > ```json theme={null} > { > "type": "https://docs.limitguard.ai/errors#report-not-available-in-sandbox", > "title": "Report Not Available In Sandbox", > "status": 403, > "detail": "Entity reports are built only from real checks; sandbox keys get no report.", > "instance": "/v1/reports/entity", > "errorCode": "report_not_available_in_sandbox" > } > ``` > > **Fix:** Use an `lg_live_` key or pay per call with x402. > **Operator route** > > **Cause:** The route is for the service operator (for example `/v1/admin/*`). Customer keys carry the least-privileged role, so the API answers `403` with `Insufficient role` or `Insufficient permissions`. > > **Fix:** None needed on your side: these routes are not part of the customer API. > **Watchlist without an API key** > > **Cause:** The watchlist routes (`/v1/watchlist`) belong to an API key's own tenant. A call that reached them without a key-bound tenant, for example one paid only by x402, is answered `403 Tenant context required`. > > **Fix:** Call the watchlist routes with an API key. *** ## Entity report errors `POST /v1/reports/entity` and `GET /v1/reports/{report_id}` answer errors as [RFC 7807](https://www.rfc-editor.org/rfc/rfc7807) problem details whose `type` links to the entries below. Each body also carries `instance` (the request path) and `errorCode`. | `type` anchor | Status | `errorCode` | Meaning | | - | - | - | - | | `entity-reports-not-available` | 404 | `entity_reports_not_available` | Entity reports are switched off on this server. Nothing was charged. | | `report-not-available-in-sandbox` | 403 | `report_not_available_in_sandbox` | A sandbox key was used; reports are built only from real checks. | | `check-not-found` | 404 | `check_not_found` | The `check_id` is not a check stored by `/v1/reports/entity` for this key. | | `report-store-unavailable` | 503 | `report_store_unavailable` | The report could not be stored, so it is not returned. Nothing was charged; retry. | | `invalid-report-id` | 400 | `invalid_report_id` | `report_id` must be a lower-case UUID. | | `report-not-found` | 404 | `report_not_found` | No report with this id for this key or report token. | *** ## 404 Not Found > **Webhook not found** > > **Cause:** A `DELETE /v1/webhooks/{webhook_id}` or test call was made with an unknown `webhook_id`, or with the ID of a webhook another API key registered. > > **Fix:** Use `GET /v1/webhooks` to list all registered webhooks and confirm the correct `webhook_id`. > **Unknown endpoint path** > > **Cause:** The URL path does not exist, often because of a typo (e.g., `/v1/entity/checks` instead of `/v1/entity/check`) or a missing version prefix. > > **Fix:** All API endpoints are under `/v1/`. Refer to the [API Reference](/api-reference/introduction) for the exact path of each endpoint. ### No History `GET /v1/reputation/history/{entity_hash}` answers 404 for an entity that has never been scored, so there is no trend to return. The payment is not settled, so nothing is charged. ```json theme={null} { "type": "https://docs.limitguard.ai/errors#no-history", "title": "No Reputation History", "status": 404, "detail": "This entity has never been scored, so there is no history to return. Run POST /v1/entity/check first; every check is recorded and becomes a point on this trend.", "instance": "/v1/reputation/history/", "errorCode": "no_reputation_history" } ``` **Fix:** Run `POST /v1/entity/check` for the entity first. Every check is recorded and becomes a point on the trend. *** ## 410 Gone ### Trust Badge Unavailable `GET /v1/badge/{entity_id}`, `GET /v1/badge/{entity_id}.json` and `GET /v1/verify/{entity_id}` were withdrawn on 8 Oct 2026. They showed a demo score that was not based on any check. They take no API key and charge nothing. The SVG route answers with this JSON body, not an image. ```json theme={null} { "type": "https://docs.limitguard.ai/errors#trust-badge-unavailable", "title": "Trust Badge Unavailable", "status": 410, "detail": "Trust badges and verification pages have been withdrawn. ...", "instance": "", "errorCode": "trust_badge_unavailable", "alternatives": ["/v1/entity/check"] } ``` `instance` echoes the path you called, for example a `/v1/badge/` path. All three routes give the same 410 body. **What to do:** Remove the badge or link. To check a company, use `POST /v1/entity/check`. ### Compliance Report Unavailable `GET /v1/compliance/report/{entity_id}` is withdrawn. It returned the same EU AI Act briefing for every entity, so it was not the per-entity assessment it was priced as. It answers 410 with `errorCode` `compliance_report_unavailable` and charges nothing. **What to do:** For an EU AI Act readiness score from inputs you supply, use `GET /v1/compliance/readiness/{entity_id}`. For a per-entity report built from a real check, use `POST /v1/reports/entity`; when it is offered, `alternatives` in the 410 body names it. *** ## 422 Unprocessable Entity 422 errors occur when the request body is missing a required field, a value is invalid, or the body is not valid JSON. For field validation the `detail` field is an **array** of field-level errors; a few checks made after validation (such as the webhook URL check) return a single string `detail` instead. Nothing is charged. ```json theme={null} { "type": "https://docs.limitguard.ai/errors#validation-error", "title": "Validation Error", "status": 422, "detail": [ {"field": "country", "message": "Invalid value"} ], "instance": "/v1/entity/check", "errorCode": "validation_error", "note": "Nothing was charged." } ``` A body that is not valid JSON (for example a trailing comma) answers the same way. Its `field` is the character position of the parse error, such as `"19"`. Send `Content-Type: application/json` and build the body with `json.dumps()` in Python or `JSON.stringify()` in JavaScript rather than by hand. > [!WARNING] > > 422 responses are sanitized: internal field paths and database details are never exposed. The `field` name matches the key in your request body. ### Common Validation Errors > **Invalid country code** > > **Cause:** `country` is not a valid [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code, or uses the alpha-3 format. > > **Fix:** Use two-letter uppercase codes: `NL`, `BE`, `DE`, `FR`, `US`. Not `NLD`, `Netherlands`, or lowercase `nl`. > **entity\_name too short or too long** > > **Cause:** `entity_name` is fewer than 2 characters or more than 255 characters. > > **Fix:** Pass the legal entity name as registered. Single-character values and very long strings are rejected. > **Invalid KVK number format** > > **Cause:** `kvk_number` contains non-numeric characters or is not exactly 8 digits. > > **Fix:** KVK numbers are always 8 digits: `"12345678"`. Do not include spaces, dashes, or the `KVK:` prefix. > **Invalid IBAN format** > > **Cause:** `iban` fails structural validation (country prefix, check digits, or length for the given country). > > **Fix:** Pass a complete IBAN including country code and check digits: `"NL91ABNA0417164300"`. Strip spaces before sending. > **Invalid VAT number format** > > **Cause:** `vat_number` does not match the expected format for the given country prefix. > > **Fix:** Include the country prefix: `"NL123456789B01"`, `"BE0123456789"`. Format rules vary by country: see the [European Commission VIES guidelines](https://ec.europa.eu/taxation_customs/vies/) for country-specific formats. > **Invalid wallet address** > > **Cause:** `wallet_address` is not a valid EVM (0x..., 42 chars) or Solana (base58, 32-44 chars) address. > > **Fix:** Validate the address client-side before sending. EVM addresses must be checksummed or all-lowercase hex. Solana addresses must be valid base58. > **Invalid domain format** > > **Cause:** `domain` contains a protocol prefix, path, or query string instead of a bare hostname. > > **Fix:** Send the bare domain only: `"acmecorp.nl"`, not `"https://acmecorp.nl/about?lang=en"`. > **Invalid webhook event type** > > **Cause:** `events` array in `POST /v1/webhooks` contains an unrecognized event name. > > **Fix:** Use event types from the list in the [Webhooks guide](/guides/webhooks#event-types): `sanctions.match.new`, `trust.score.changed`, `trust.level.downgrade`, `certificate.expired` or `identifier.change.new`. There is no `*` wildcard. Only `sanctions.match.new` and `identifier.change.new` are sent today; `delivered_events` in the registration response lists which of yours are live. > **Invalid webhook URL** > > **Cause:** The `url` in `POST /v1/webhooks` is not `https://`, its host does not resolve, or it resolves to a private, loopback, link-local, reserved or cloud-metadata address. This error carries a plain string `detail` instead of the field array above: > > ```json theme={null} > { > "detail": "Webhook URL resolves to a private/reserved IP — SSRF protection blocks this address" > } > ``` > > Other `detail` values: `"URL must use HTTPS"` and `"Cannot resolve hostname '': ..."`. > > **Fix:** Use a public `https://` URL whose host resolves in public DNS. *** ## 429 Too Many Requests Limitguard enforces three independent limits per key: a per-minute limit, a rolling 24-hour limit and a calendar-month cap. A verified x402 payer has a per-minute limit only. ### Rate Limit Response ```json theme={null} { "type": "about:blank", "title": "Rate Limit Exceeded", "status": 429, "detail": "Exceeded per-minute limit of 10 requests for free tier.", "retry_after": 60 } ``` ### Retry-After Header Every 429 response includes a `Retry-After` header with the number of seconds to wait: ``` HTTP/1.1 429 Too Many Requests Retry-After: 60 X-RateLimit-Limit: 10 X-RateLimit-Remaining: 0 ``` | Header | Description | | - | - | | `Retry-After` | Seconds to wait: 60 for a per-minute limit, 3600 for the 24-hour limit, and the seconds until 00:00 UTC on the 1st of next month for the monthly cap | | `X-RateLimit-Limit` | The limit that was hit, in requests per its window | | `X-RateLimit-Remaining` | Requests remaining in that window (0 on a 429) | ### Rate Limits by Tier | Tier | Requests/min | Requests / 24 h | Requests / month | | - | - | - | - | | Unauthenticated (per IP) | 10 | No daily cap | No monthly cap | | Free | 10 | 500 | 500 | | Indie | 30 | 1,000 | 1,000 | | Starter | 60 | 10,000 | 10,000 | | Growth | 120 | 50,000 | 50,000 | | Pro | 300 | 250,000 | 250,000 | | x402 payer (no key) | 60 | No daily cap | No monthly cap | See [Rate Limits](/guides/rate-limits#rate-limits-by-tier) for the authoritative table and [Pricing](/pricing#api-key-tier-upgrades) for upgrade prices. ### Daily Limit Reached When a key hits its rolling 24-hour limit, the `detail` names it: ```json theme={null} { "type": "about:blank", "title": "Rate Limit Exceeded", "status": 429, "detail": "Exceeded per-day limit of 500 requests for free tier.", "retry_after": 3600 } ``` **Fix:** Wait for `Retry-After`, top up to a higher tier for a higher limit, or pay per call with x402, which has no daily cap. The daily caps on keys are abuse limits, not a usage allowance you buy. ### Monthly Cap Reached Each key also has a calendar-month cap equal to its tier's number in the table above. It resets at 00:00 UTC on the 1st. The 429 carries `Retry-After` set to the seconds until then, and no `X-RateLimit-*` headers: ```json theme={null} { "type": "about:blank", "title": "Too Many Requests", "status": 429, "detail": "Monthly limit exceeded (500/500): a per-key abuse cap, not prepaid balance; resets monthly. ...", "instance": "/v1/entity/check" } ``` **Fix:** Wait for the reset, top up to a higher tier for a higher cap (the highest tier has none above it), or pay that call keyless with x402. For a priced endpoint the `detail` quotes the price and names the keyless x402 call. A call you pay for with x402 counts toward the cap but is not refused by it. > [!TIP] > > Use the `X-Response-Quality: cached` header where acceptable: a cached answer costs less when the entity was already scored within the cache TTL. *** ## 500 Internal Server Error ```json theme={null} { "type": "about:blank", "title": "Internal Server Error", "status": 500, "detail": "An unexpected error occurred. Request ID: req_abc123xyz" } ``` **Cause:** An unhandled exception occurred server-side. This is always a Limitguard bug, never a client error. **Fix:** 1. Note the `Request ID` from the `detail` field. 2. Retry with exponential backoff: most 500s are transient. 3. If the error persists for more than 5 minutes, check [api.limitguard.ai/health](https://api.limitguard.ai/health) for service status. 4. Report persistent 500s to [support@limitguard.ai](mailto:support@limitguard.ai) with the Request ID. > [!WARNING] > > 500 errors on write operations (webhook creation, compliance subscription) should not be retried blindly: the operation may have partially succeeded. Check the resource state first with a GET before retrying. *** ## 503 Service Unavailable ```json theme={null} { "type": "about:blank", "title": "Service Unavailable", "status": 503, "detail": "Limitguard is undergoing maintenance. Expected recovery: 14:30 UTC." } ``` **Cause:** Planned maintenance window or a cascading failure in a critical dependency (e.g., the sanctions list provider is unreachable and the circuit breaker is open). **Fix:** * Check `Retry-After` header if present. * Subscribe to status updates at [api.limitguard.ai/health](https://api.limitguard.ai/health). * For x402 users: the circuit breaker fallback (cached wallet verification) handles most dependency failures transparently. A 503 indicates a more severe outage. *** ## Request validation errors ### Validation Error HTTP `422`, `errorCode` `validation_error`. **What happened:** The request body does not fit the endpoint. `detail` lists every field that failed with what is wrong with it; a rule about two fields names both. Nothing was charged. **What to do:** Fix the fields `detail` names and send the request again. *** ## Lead Verify errors ### Lead Verify Not Available HTTP `404`, `errorCode` `lead_verify_not_available`. The MCP tool answers `status` `rejected` with the same sentence as `error` and `lead_verify_not_available` as `code`. **What happened:** Lead Verify is switched off on this server. Nothing was charged. **What to do:** Try again later. ### Lead Verify Not Available In Sandbox HTTP `403`, `errorCode` `lead_verify_not_available_in_sandbox`. The MCP tool answers `status` `rejected` with the same sentence as `error` and `lead_verify_not_available_in_sandbox` as `code`. **What happened:** Lead Verify only runs on the live company registers, so it does not work with a sandbox key. Use a live key. Nothing was charged. **What to do:** Use a live key. ### Lead Verify Invalid HTTP `422`, `errorCode` `lead_verify_invalid`. The MCP tool answers `status` `rejected` with the same sentence as `error` and `lead_verify_invalid` as `code`. **What happened:** The `company_number` cannot be checked: it is not a KVK or KBO number, or it belongs to the other country. Nothing was charged. **What to do:** Enter an 8-digit KVK number (NL) or a 10-digit KBO number (BE); put a VAT number in vat\_number. Check that `country` matches the number. ### Lead Verify Unavailable HTTP `503`, `errorCode` `lead_verify_unavailable`. The MCP tool answers `status` `rejected` with the same sentence as `error` and `lead_verify_unavailable` as `code`. **What happened:** The company register could not be reached. Nothing was charged. **What to do:** Try again in a few minutes. *** ## Agent check errors ### Agent Check Not Available HTTP `404`, `errorCode` `agent_check_not_available`. The MCP tool answers `status` `rejected` with the same sentence as `error` and `agent_check_not_available` as `code`. **What happened:** The agent check is not available yet. Nothing was charged. **What to do:** The agent check is switched off for now. Try again later. ### Agent Check Not Available In Sandbox HTTP `403`, `errorCode` `agent_check_not_available_in_sandbox`. The MCP tool answers `status` `rejected` with the same sentence as `error` and `agent_check_not_available_in_sandbox` as `code`. **What happened:** The agent check only runs on live sources, so it does not work with a sandbox key. Use a live key. Nothing was charged. **What to do:** Use a live key. ### Agent Check Unavailable HTTP `503`, `errorCode` `agent_check_unavailable`. The MCP tool answers `status` `rejected` with the same sentence as `error` and `agent_check_unavailable` as `code`. **What happened:** None of the wallet checks could be completed. Nothing was charged. **What to do:** Try again in a few minutes. *** ## Cached result errors ### Not Cached HTTP `404`, `errorCode` `not_cached`. **What happened:** No cached result for this entity; no data source was called. Nothing was charged. **What to do:** Send the request again with `X-Response-Quality: fresh` for a full check. *** ## Error Handling Patterns ### Recommended Client Logic ```python Python theme={null} import httpx import time import json RETRYABLE = {500, 502, 503, 504} MAX_RETRIES = 3 def call_limitguard(endpoint: str, payload: dict, api_key: str) -> dict: headers = { "X-API-Key": api_key, "Content-Type": "application/json", } for attempt in range(MAX_RETRIES): response = httpx.post( f"https://api.limitguard.ai{endpoint}", headers=headers, json=payload, timeout=10.0, ) # Success if response.status_code in (200, 201): return response.json() error = response.json() # Rate limited — respect Retry-After if response.status_code == 429: wait = int(response.headers.get("Retry-After", 60)) print(f"Rate limited. Waiting {wait}s...") time.sleep(wait) continue # Transient server error — exponential backoff if response.status_code in RETRYABLE: wait = 2 ** attempt print(f"Server error ({response.status_code}). Retrying in {wait}s...") time.sleep(wait) continue # Validation error — surface all field errors if response.status_code == 422: errors = error.get("detail", []) if isinstance(errors, list): for err in errors: print(f" Field '{err['field']}': {err['message']}") raise ValueError(f"Validation failed: {errors}") # Payment required (x402) — handle separately if response.status_code == 402: raise PaymentRequiredError(error) # Non-retryable client error raise LimitguardError( status=response.status_code, title=error.get("title"), detail=error.get("detail"), ) raise LimitguardError(status=429, title="Max retries exceeded", detail=None) class LimitguardError(Exception): def __init__(self, status: int, title: str, detail): self.status = status self.title = title self.detail = detail super().__init__(f"HTTP {status}: {title}: {detail}") class PaymentRequiredError(Exception): def __init__(self, body: dict): self.accepts = body.get("accepts", []) super().__init__("Payment required (x402)") ``` ```javascript JavaScript theme={null} const RETRYABLE = new Set([500, 502, 503, 504]); const MAX_RETRIES = 3; async function callLimitguard(endpoint, payload, apiKey) { const headers = { "X-API-Key": apiKey, "Content-Type": "application/json", }; for (let attempt = 0; attempt < MAX_RETRIES; attempt++) { const response = await fetch(`https://api.limitguard.ai${endpoint}`, { method: "POST", headers, body: JSON.stringify(payload), }); // Success if (response.status === 200 || response.status === 201) { return response.json(); } const error = await response.json(); // Rate limited — respect Retry-After if (response.status === 429) { const wait = parseInt(response.headers.get("Retry-After") ?? "60", 10); console.log(`Rate limited. Waiting ${wait}s...`); await sleep(wait * 1000); continue; } // Transient server error — exponential backoff if (RETRYABLE.has(response.status)) { const wait = Math.pow(2, attempt); console.log(`Server error (${response.status}). Retrying in ${wait}s...`); await sleep(wait * 1000); continue; } // Validation error — surface all field errors if (response.status === 422) { const errors = Array.isArray(error.detail) ? error.detail : []; errors.forEach(({ field, message }) => { console.error(` Field '${field}': ${message}`); }); throw Object.assign(new Error("Validation failed"), { errors }); } // Payment required (x402) if (response.status === 402) { throw Object.assign(new Error("Payment required (x402)"), { accepts: error.accepts ?? [], }); } // Non-retryable client error throw Object.assign(new Error(`HTTP ${response.status}: ${error.title}`), { status: response.status, detail: error.detail, }); } throw new Error("Max retries exceeded"); } const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); ``` ```bash curl theme={null} # Check status code and handle errors in shell scripts headers_file=$(mktemp) # -D keeps this response's own headers, so a 429's Retry-After can be read below response=$(curl -s -D "$headers_file" -w "\n%{http_code}" -X POST https://api.limitguard.ai/v1/entity/check \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"entity_name": "Acme Corp BV", "country": "NL"}') http_code=$(echo "$response" | tail -1) body=$(echo "$response" | sed '$d') case $http_code in 200|201) echo "Success: $body" ;; 401) echo "Error: Invalid API key. Check X-API-Key header." ;; 422) echo "Validation error: $(echo $body | jq '.detail')" ;; 429) retry_after=$(grep -i "^retry-after:" "$headers_file" | awk '{print $2}' | tr -d '\r') echo "Rate limited. Retry after ${retry_after}s" ;; 5*) echo "Server error $http_code: retry with backoff" ;; *) echo "Unexpected status $http_code: $body" ;; esac rm -f "$headers_file" ``` ### x402 Auto-Payment Handler For AI agents that need to handle 402 responses automatically: ```python Python theme={null} import httpx import base64 import json import secrets import time from eth_account import Account from eth_account.messages import encode_typed_data def call_with_x402( endpoint: str, payload: dict, sender_key: str, chain_id: str = "eip155:8453", ) -> dict: """Make an API call, automatically handling x402 payment if required.""" url = f"https://api.limitguard.ai{endpoint}" # First attempt — no payment response = httpx.post(url, json=payload, timeout=10.0) if response.status_code != 402: response.raise_for_status() return response.json() # Parse payment requirements: pay the "exact" entry for our chain requirements = response.json() accepted = next( ( a for a in requirements["accepts"] if a["network"] == chain_id and a["scheme"] == "exact" ), None, ) if not accepted: raise ValueError(f"No accepted payment option for chain {chain_id}") # Build payment for exactly the quoted amount x_payment = build_evm_payment( chain_id=chain_id, amount=int(accepted["amount"]), sender_key=sender_key, recipient=accepted["payTo"], usdc_address=accepted["asset"], ) # Retry with payment paid_response = httpx.post( url, headers={"X-PAYMENT": x_payment, "Content-Type": "application/json"}, json=payload, timeout=10.0, ) paid_response.raise_for_status() return paid_response.json() def build_evm_payment(chain_id, amount, sender_key, recipient, usdc_address): sender = Account.from_key(sender_key).address chain_num = int(chain_id.split(":")[1]) nonce = "0x" + secrets.token_hex(32) now = int(time.time()) domain = {"name": "USD Coin", "version": "2", "chainId": chain_num, "verifyingContract": usdc_address} message = {"from": sender, "to": recipient, "value": amount, "validAfter": now - 10, "validBefore": now + 300, "nonce": bytes.fromhex(nonce[2:])} types = { "EIP712Domain": [{"name": "name", "type": "string"}, {"name": "version", "type": "string"}, {"name": "chainId", "type": "uint256"}, {"name": "verifyingContract", "type": "address"}], "TransferWithAuthorization": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "validAfter", "type": "uint256"}, {"name": "validBefore", "type": "uint256"}, {"name": "nonce", "type": "bytes32"}], } signed = Account.sign_message(encode_typed_data(full_message={"types": types, "primaryType": "TransferWithAuthorization", "domain": domain, "message": message}), private_key=sender_key) payload = {"chainId": chain_id, "amount": str(amount), "sender": sender, "recipient": recipient, "nonce": nonce, "signature": signed.signature.hex(), "validAfter": now - 10, "validBefore": now + 300} return base64.b64encode(json.dumps(payload).encode()).decode() ``` ```javascript JavaScript theme={null} import { ethers } from "ethers"; async function callWithX402(endpoint, payload, signer, chainId = "eip155:8453") { const url = `https://api.limitguard.ai${endpoint}`; // First attempt — no payment let response = await fetch(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload), }); if (response.status !== 402) { if (!response.ok) throw new Error(`HTTP ${response.status}`); return response.json(); } // Parse payment requirements const requirements = await response.json(); const accepted = requirements.accepts.find( (a) => a.network === chainId && a.scheme === "exact", ); if (!accepted) throw new Error(`No accepted payment option for chain ${chainId}`); // Build payment for exactly the quoted amount const xPayment = await buildEvmPayment( chainId, parseInt(accepted.amount, 10), signer, accepted.payTo, accepted.asset, ); // Retry with payment response = await fetch(url, { method: "POST", headers: { "X-PAYMENT": xPayment, "Content-Type": "application/json" }, body: JSON.stringify(payload), }); if (!response.ok) throw new Error(`Payment rejected: HTTP ${response.status}`); return response.json(); } async function buildEvmPayment(chainId, amount, signer, recipient, usdcAddress) { const chainNum = parseInt(chainId.split(":")[1]); const nonce = "0x" + [...crypto.getRandomValues(new Uint8Array(32))].map((b) => b.toString(16).padStart(2, "0")).join(""); const now = Math.floor(Date.now() / 1000); const domain = { name: "USD Coin", version: "2", chainId: chainNum, verifyingContract: usdcAddress }; const types = { TransferWithAuthorization: [{ name: "from", type: "address" }, { name: "to", type: "address" }, { name: "value", type: "uint256" }, { name: "validAfter", type: "uint256" }, { name: "validBefore", type: "uint256" }, { name: "nonce", type: "bytes32" }] }; const message = { from: signer.address, to: recipient, value: amount, validAfter: now - 10, validBefore: now + 300, nonce }; const signature = await signer.signTypedData(domain, types, message); const payloadObj = { chainId, amount: String(amount), sender: signer.address, recipient, nonce, signature, validAfter: now - 10, validBefore: now + 300 }; return btoa(JSON.stringify(payloadObj)); } ``` *** ## Debugging Checklist > **Getting 401 even with a valid key?** > > * Confirm the header name is exactly `X-API-Key` (capital X, capital A, capital K) > * Confirm the key value starts with `lg_live_` or `lg_sandbox_` (`lg_test_` keys are refused in production) > * Check for leading/trailing whitespace in the header value > * Verify the key has not been revoked: create a new one at `POST /v1/keys/create` > **Getting 422 but my JSON looks correct?** > > * Check that `country` is exactly 2 uppercase characters: `"NL"` not `"nl"` or `"Netherlands"` > * Check that `entity_name` is at least 2 characters > * For `kvk_number`: digits only, exactly 8 characters, as a string: `"12345678"` not `12345678` > * For `iban`: strip all spaces before sending > * The `detail` array in the response will list every failing field: read all of them before retrying > **Getting 403 but my key is valid?** > > * Run `GET /v1/usage/summary` with your key to see your current tier > * Check the [403 causes above](#403-forbidden): sandbox keys get no entity reports, operator routes are not part of the customer API, and the watchlist needs a key-bound tenant > **x402 payment keeps returning 402?** > > * Confirm `validBefore` is at least 60 seconds in the future and within the quote's `maxTimeoutSeconds` (600, ten minutes) > * Confirm `chainId` in the payment payload exactly matches the `network` of the `accepts` entry you pay > * Confirm `recipient` is that entry's `payTo`: do not substitute your own address > * Confirm `amount` matches or exceeds the `amount` the 402 quoted > * Generate a new random nonce for every attempt: do not reuse > * Confirm the USDC contract address is that entry's `asset` (each network has its own) > **Intermittent 500 errors on entity checks?** > > * 500 on entity checks is usually a transient timeout in a data source (e.g., KVK API slow response) > * Retry up to 3 times with exponential backoff: 1s, 2s, 4s > * If the error persists, try `X-Response-Quality: cached` to bypass live source queries > * Include the `Request ID` from the error body when contacting support *** ## Free Endpoints (Never Error on Auth) These endpoints never require authentication or payment, so they never return 401, 402, or 403: | Endpoint | Purpose | | - | - | | `GET /health` | API health and version | | `POST /v1/keys/create` | Self-service key provisioning | | `GET /.well-known/x402.json` | x402 payment discovery | | `GET /.well-known/agent.json` | A2A agent card | | `GET /.well-known/mcp.json` | MCP manifest | | `GET /v1/self-verify` | Limitguard's own trust score | | `GET /v1/methodology` | Scoring methodology | | `GET /llms.txt` | LLM-readable API summary | *** ## Further Reading > **[Rate Limits](/guides/rate-limits)** > > Per-tier limits and burst handling > **[x402 Protocol](/x402-protocol)** > > Full x402 implementation guide with EVM and Solana examples > **[Authentication](/authentication)** > > API keys, sandbox mode, and key management > **[Sandbox](/sandbox)** > > Test all error scenarios for free # Framework Integrations Source: https://docs.limitguard.ai/guides/frameworks Connect LangChain, CrewAI, or the OpenAI Agents SDK to Limitguard, through the Python SDK tools or the remote MCP server Limitguard's MCP server is a standard remote **Streamable HTTP** endpoint at `https://api.limitguard.ai/mcp`. Any framework with a generic MCP client can connect to it directly. The examples below use each framework's own remote-MCP client against that single URL. LangChain and CrewAI also have ready-made Limitguard tools in the Python SDK, from version 0.1.6. Install the extra for your framework (`pip install 'limitguard[langchain]'` or `pip install 'limitguard[crewai]'`), then import `limitguard_tools` from `limitguard.integrations.langchain` or `limitguard.integrations.crewai`. `limitguard_tools(api_key="lg_live_...")` returns three tools: `limitguard_check_entity`, `limitguard_risk_score` and `limitguard_verify_lead`. They share a default cap of 20 calls and USD 5. There is no Limitguard-specific package for the OpenAI Agents SDK, so use the MCP example for that one. > [!NOTE] > > For the raw MCP manifest (`/.well-known/mcp.json`), the tools it lists, and their pricing, see [AI Agent Integration](/guides/ai-agent-integration#mcp-model-context-protocol). This page is about wiring a framework's MCP client to that server, not about the tool catalog itself. ## Authenticating the MCP Connection `tools/list` never requires authentication - any MCP client can discover Limitguard's tools without a key or a wallet. Calling a tool is different: * **With an API key** - send it as a Bearer token on the MCP connection: `Authorization: Bearer lg_live_xxxxxxxxxxxxxxxxxxxx`. A paid-tier key debits its prepaid balance per call, the same as REST. * **Without a key** - `tools/list` still works. A tool called without a key or a payment header gets back a JSON-RPC error naming the price and how to pay - there is no HTTP 402 on this transport, since a JSON-RPC error has no status-code channel. The free tools (`sanctions_preview`, `wallet_sanctions_preview` and `get_trust_score`) cost nothing but still need a key, and a free key is enough (`POST /v1/keys/create`). Every example below shows the Bearer-token form; drop the `headers` entry (or the `Authorization` key inside it) to connect keyless. > [!WARNING] > > Verify each framework's MCP client API against its own current docs before shipping - these client classes change between minor releases. The imports and parameters below were checked against `langchain-mcp-adapters` 0.3.2, `openai-agents` 0.22.3, and `crewai-tools` 1.15.22. ## LangChain `langchain-mcp-adapters` turns any MCP server into LangChain tools via `MultiServerMCPClient`. Its `streamable_http` transport takes the URL and an optional `headers` dict - that's where the Bearer token goes. ```bash theme={null} pip install langchain-mcp-adapters langchain ``` ```python theme={null} import asyncio from langchain_mcp_adapters.client import MultiServerMCPClient async def main() -> None: client = MultiServerMCPClient( { "limitguard": { "transport": "streamable_http", "url": "https://api.limitguard.ai/mcp", # Omit "headers" entirely to connect without a key: tools/list # still works, but every tool call (free or paid) needs a key. "headers": {"Authorization": "Bearer lg_live_xxxxxxxxxxxxxxxxxxxx"}, } } ) tools = await client.get_tools() print([tool.name for tool in tools]) # Bind the tools to a LangChain chat model and let it call check_entity, # get_risk_score, or verify_wallet like any other LangChain tool. if __name__ == "__main__": asyncio.run(main()) ``` `get_tools()` opens a new MCP session per call by default. For an agent that calls Limitguard tools repeatedly in one process, keep the `MultiServerMCPClient` instance alive and reuse it rather than constructing it per request. ## OpenAI Agents SDK The Agents SDK's `MCPServerStreamableHttp` takes a `params` dict with `url` and `headers`, and is passed to an `Agent` via `mcp_servers`. ```bash theme={null} pip install openai-agents ``` ```python theme={null} import asyncio from agents import Agent, Runner from agents.mcp import MCPServerStreamableHttp async def main() -> None: async with MCPServerStreamableHttp( name="Limitguard", params={ "url": "https://api.limitguard.ai/mcp", # Omit "headers" to connect without a key. "headers": {"Authorization": "Bearer lg_live_xxxxxxxxxxxxxxxxxxxx"}, }, ) as server: agent = Agent( name="Payments Assistant", instructions=( "Before approving any payment, call check_entity or " "verify_wallet on the counterparty. Block if the " "recommendation is 'block'." ), mcp_servers=[server], ) result = await Runner.run( agent, "Should I pay an invoice from Acme Corp BV (NL, KVK 12345678)?", ) print(result.final_output) if __name__ == "__main__": asyncio.run(main()) ``` The `async with MCPServerStreamableHttp(...)` block opens the connection for the lifetime of the run and closes it on exit - construct the `Agent` inside that block, as shown. ## CrewAI `crewai-tools` ships `MCPServerAdapter`, built on the framework-agnostic `mcpadapt` library. Pass a plain dict with `transport: "streamable-http"` (hyphenated, unlike LangChain's `streamable_http`) plus `url` and `headers`. ```bash theme={null} pip install crewai crewai-tools ``` ```python theme={null} from crewai import Agent, Crew, Task from crewai_tools import MCPServerAdapter server_params = { "url": "https://api.limitguard.ai/mcp", "transport": "streamable-http", # Omit "headers" to connect without a key. "headers": {"Authorization": "Bearer lg_live_xxxxxxxxxxxxxxxxxxxx"}, } with MCPServerAdapter(server_params) as limitguard_tools: print([tool.name for tool in limitguard_tools]) payments_agent = Agent( role="Payments Reviewer", goal="Verify a counterparty's trust score before any payment is approved", backstory="Checks every new supplier against Limitguard before sign-off.", tools=limitguard_tools, ) review_task = Task( description=( "Check the trust score for Acme Corp BV (NL, KVK 12345678) and " "recommend whether to proceed with payment." ), expected_output="A proceed/review/block recommendation with the trust score.", agent=payments_agent, ) crew = Crew(agents=[payments_agent], tasks=[review_task]) result = crew.kickoff() print(result) ``` `MCPServerAdapter` connects as soon as it's constructed and disconnects when the `with` block exits (or call `.stop()` manually if you construct it outside a context manager). ## Next Steps > **[AI Agent Integration](/guides/ai-agent-integration)** > > The full MCP tool catalog, A2A, and x402 - including pricing per tool > **[Pay Per Call](/guides/pay-per-call)** > > Skip the API key entirely and pay per call with a USDC wallet # Pay Per Call Source: https://docs.limitguard.ai/guides/pay-per-call Call Limitguard with a USDC wallet and a client library: no API key, no subscription No API key, no signup: an agent with a funded USDC wallet can call any priced Limitguard endpoint directly. Two paths are proven end to end against production: * **Base**: the official PyPI [`x402`](https://pypi.org/project/x402/) client, using the EIP-3009 `exact` scheme settled through Coinbase's facilitator. The wallet needs USDC on Base only, no ETH for gas. * **Solana**: the Limitguard SDK's co-sign mode. Limitguard's own fee payer covers the Solana network fee, so the wallet needs USDC only, no SOL. Both examples call `POST /v1/risk/score`. For the raw HTTP 402 flow behind both (useful if you're not on Python, or want to hand-roll the signature), see [x402 Protocol](/x402-protocol). For what each endpoint costs, see [Pricing](/pricing). ## Base (official `x402` client) ```bash theme={null} pip install "x402[evm,httpx]" ``` ```python theme={null} import asyncio import os import httpx from eth_account import Account from x402 import x402Client from x402.http.clients import x402_httpx_transport from x402.mechanisms.evm.exact import ExactEvmScheme API_URL = "https://api.limitguard.ai" RISK_PATH = "/v1/risk/score" # priced per call, fresh tier: see /pricing async def check_risk(entity_name: str, country: str) -> dict: """POST /v1/risk/score, paying the 402 automatically with USDC on Base.""" account = Account.from_key(os.environ["EVM_PRIVATE_KEY"]) # 0x-prefixed hex key # "eip155:*" matches Base (eip155:8453) and any other EVM chain Limitguard quotes. client = x402Client().register("eip155:*", ExactEvmScheme(account)) # Refuse to auto-pay more than $1 for any single call. Raise this for a # pricier tier (e.g. the deep-check `enhanced` tier at $1.71) before calling it. client.set_spend_controls({"max_amount_per_payment": "$1.00"}) async with httpx.AsyncClient( transport=x402_httpx_transport(client), base_url=API_URL, timeout=30, ) as http: response = await http.post( RISK_PATH, json={"entity_name": entity_name, "country": country} ) response.raise_for_status() return response.json() if __name__ == "__main__": result = asyncio.run(check_risk("Acme Corp BV", "NL")) print(f"Risk score: {result['risk_score']} - {result['recommendation']}") ``` Set `EVM_PRIVATE_KEY` to a wallet holding enough USDC on Base mainnet (`eip155:8453`) for the call: `POST /v1/risk/score` costs \$0.25 on the fresh tier when paid with x402 (the agent price; an API key is debited the account price instead, see [Pricing](/pricing#agent-prices-x402)). The transport handles the 402: it probes the endpoint, signs the EIP-3009 authorization for the quoted amount, retries with the payment header, and returns the paid response. Nothing else to wire up. ## Solana (Limitguard SDK, co-sign mode) ```bash theme={null} pip install "limitguard[solana]>=0.1.4" ``` > [!WARNING] > > Pin `limitguard[solana]>=0.1.4`, not just `limitguard[solana]`. 0.1.3 and earlier break against current `solana-py` releases: the SDK's `TransferCheckedParams` import moved in `solana-py` 0.36+, which the `solana>=0.34` floor lets a fresh install pull in, and their payment memo was not valid UTF-8, so the Memo program rejected the transaction. 0.1.4 (on PyPI since 2026-09-24) fixes both. ```python theme={null} import asyncio import os from limitguard import LimitGuardClient from limitguard.x402 import SolanaWallet from solders.keypair import Keypair async def check_risk(entity_name: str, country: str) -> dict: """POST /v1/risk/score, paying the 402 with USDC on Solana.""" keypair = Keypair.from_base58_string(os.environ["SOLANA_PRIVATE_KEY"]) # Co-sign mode (the default): Limitguard's fee payer pays the network fee, # so this wallet needs USDC only, no SOL. wallet = SolanaWallet(keypair=keypair) async with LimitGuardClient(wallet=wallet) as client: result = await client.risk_score(entity_name, country) return result.model_dump() if __name__ == "__main__": result = asyncio.run(check_risk("Acme Corp BV", "NL")) print(f"Risk score: {result['risk_score']} - {result['recommendation']}") ``` Set `SOLANA_PRIVATE_KEY` to a base58-encoded secret key for a wallet holding enough USDC for the call (Solana mainnet USDC mint `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`): `POST /v1/risk/score` costs \$0.25 on the fresh tier when paid with x402 (the agent price, see [Pricing](/pricing#agent-prices-x402)). `LimitGuardClient` retries any 402 automatically once a `wallet` is set. Note that, unlike the Base example above, the SDK has no built-in per-call spend cap, so only call methods (`risk_score`, `check_entity`, ...) whose price you already know rather than passing it an arbitrary path. > [!NOTE] > > `SolanaWallet(keypair=keypair, broadcast=True)` opts back into paying the network fee yourself instead of the co-sign path: that mode needs a small SOL balance in addition to USDC. The default (shown above) does not. ## Next Steps > **[x402 Protocol](/x402-protocol)** > > The raw HTTP 402 flow, response headers, and both chains' payment payloads > **[Pricing](/pricing)** > > What every endpoint costs, cached vs. fresh # Rate Limits Source: https://docs.limitguard.ai/guides/rate-limits Rate limit behavior, tiers, and Retry-After headers Limitguard enforces rate limits to ensure fair access and API stability. They are abuse limits, not a quota you buy: every call is paid for, either per call with x402 or from an API key's prepaid balance. A key's tier (bought as a prepaid top-up) only selects its burst limits and its monthly cap. ## Rate Limits by Tier | Tier | Requests / Minute | Requests / 24 h | Requests / month | Auth Method | | - | :-: | :-: | :-: | - | | **Unauthenticated** | 10 / min per IP | No daily cap | No monthly cap | No key, no payment | | **Unpaid 402 quote** | 120 / min per IP | No daily cap | No monthly cap | A request x402 answers with the price only | | **x402 payer** | 60 / min per payer | No daily cap | No monthly cap | `PAYMENT-SIGNATURE` or `X-PAYMENT` header (pay per call) | | **Free** | 10 / min | 500 | 500 | `lg_live_` API key, free tier (pays per call) | | **Indie** | 30 / min | 1,000 | 1,000 | `lg_live_` API key, \$29 prepaid top-up | | **Starter** | 60 / min | 10,000 | 10,000 | `lg_live_` API key, \$99 prepaid top-up | | **Growth** | 120 / min | 50,000 | 50,000 | `lg_live_` API key, \$299 prepaid top-up | | **Pro** | 300 / min | 250,000 | 250,000 | `lg_live_` API key, \$999 prepaid top-up | > [!NOTE] > > The per-minute and daily windows are rolling: the per-minute limit over the last 60 seconds, the daily limit over the last 24 hours. Only the monthly cap resets on a calendar boundary (see below). Entity checks also have a per-entity limit per caller, against enumeration. ## Monthly Cap per Key Every API key also has a calendar-month cap. It equals the tier's number in the table above. Like the other limits it is an abuse cap, not prepaid balance. * **What counts:** each authenticated call made with the key, over REST or MCP. A call that you also pay for with x402 counts but is never refused by the cap. A call the cap refuses is not counted. * **Reset:** at 00:00 UTC on the 1st of each month. * **When it is reached:** the next call gets a 429 with `Retry-After` set to the seconds left until the reset. The body is a problem details object. Its `detail` shows usage against the cap, and for a priced endpoint it quotes the price and offers to pay keyless with x402 instead. It does not carry the `X-RateLimit-*` headers. ```http theme={null} HTTP/1.1 429 Too Many Requests Retry-After: 1209600 Content-Type: application/json ``` ```json theme={null} { "type": "about:blank", "title": "Too Many Requests", "status": 429, "detail": "Monthly limit exceeded (500/500): a per-key abuse cap, not prepaid balance; resets monthly. ...", "instance": "/v1/entity/check" } ``` ## Middleware Execution Order Sandbox detection runs first, then rate limiting, then x402 payment verification. Rate limiting runs before x402 so that an anonymous caller cannot make the API spend upstream calls on fake payment proofs: ``` Request → Logging → Sandbox → Rate Limit → x402 → Tenant → Size Limit → Security → Router ``` A sandbox request that exceeds 10 req/min is rejected by the **Sandbox** step itself, which answers its own 429 before the Rate Limit step runs. ## HTTP 429: Rate Limit Exceeded When a rate limit is hit, the API returns **HTTP 429 Too Many Requests** with a `Retry-After` header and a JSON error body. ### Response Headers | Header | Type | Description | | - | - | - | | `X-RateLimit-Limit` | integer | Maximum requests allowed in the current window | | `X-RateLimit-Remaining` | integer | Requests remaining in the current window | | `X-RateLimit-Reset` | Unix timestamp | When the current window resets (UTC epoch seconds) | | `Retry-After` | integer | Seconds to wait before retrying | ### Example: Sandbox Limit Exceeded ```http theme={null} HTTP/1.1 429 Too Many Requests Retry-After: 60 Content-Type: application/json ``` The sandbox 429 carries only `Retry-After`, not the `X-RateLimit-*` headers. ```json theme={null} { "error": "Sandbox rate limit exceeded (10 req/min). Use a real API key for higher limits." } ``` ### Example: Free Tier Daily Limit Reached ```http theme={null} HTTP/1.1 429 Too Many Requests Retry-After: 3600 X-RateLimit-Limit: 500 X-RateLimit-Remaining: 0 Content-Type: application/problem+json ``` ```json theme={null} { "type": "about:blank", "title": "Rate Limit Exceeded", "status": 429, "detail": "Exceeded per-day limit of 500 requests for free tier.", "retry_after": 3600 } ``` > [!WARNING] > > Always read the `Retry-After` header rather than hard-coding a wait time: it is 60 seconds for a per-minute limit, 3600 seconds for the rolling 24-hour limit, and the seconds until the 1st of the next month (00:00 UTC) for the monthly cap. ## x402 Payers Have No Daily Cap Callers paying per call with x402 have no daily request cap: each successful payment authorizes exactly one API call, so cost is the throttle. A verified payer is still limited to 60 requests per minute, and entity checks keep their per-entity limit. > [!TIP] > > If you are building an AI agent that may need to make bursts of requests, x402 is the right choice. You pay per call and have no daily cap. See the [x402 Protocol](/x402-protocol) guide for implementation details. ### Cost-Based Throttling vs. Count-Based Throttling | Mechanism | API Key Tiers | x402 | | - | :-: | :-: | | Per-minute limit | Yes (by tier) | Yes (60 / min per payer) | | Rolling 24-hour limit | Yes (by tier) | No | | Monthly cap | Yes (by tier) | No | | Cost per call | Yes, debited from the prepaid balance | Yes, paid per call | | Suitable for AI agent bursts | Up to the tier's per-minute limit | Up to 60 / min | ## Best Practices ### 1. Always Respect `Retry-After` Never retry before `Retry-After` seconds have elapsed. Retrying too early counts against the same window and triggers the same 429 immediately. ### 2. Implement Exponential Backoff For transient errors (5xx) use exponential backoff. For 429 specifically, always use the exact `Retry-After` value. Do not apply additional multipliers on top of it. ### 3. Monitor `X-RateLimit-Remaining` Poll `X-RateLimit-Remaining` on each response to detect approaching limits before they are hit. Shed load or switch to x402 before reaching zero. ### 4. Never Load Test Production Use a sandbox key (`lg_sandbox_...`) for load testing. The 10 req/min sandbox limit exists to prevent accidental load on real data sources. *** ## Code Examples: Handling 429 with Retry Logic ```bash curl theme={null} #!/usr/bin/env bash # Retry with Retry-After backoff: handles both rate limit types API_KEY="lg_live_xxxxxxxxxxxxxxxxxxxx" MAX_ATTEMPTS=5 headers_file=$(mktemp) trap 'rm -f "$headers_file"' EXIT attempt=1 while [ $attempt -le $MAX_ATTEMPTS ]; do # -D keeps this response's own headers, so Retry-After comes from the 429 itself response=$(curl -s -D "$headers_file" -w "\n%{http_code}" -X POST https://api.limitguard.ai/v1/entity/check \ -H "X-API-Key: $API_KEY" \ -H "Content-Type: application/json" \ -d '{"entity_name": "Acme Corp BV", "country": "NL"}') http_code=$(echo "$response" | tail -n1) body=$(echo "$response" | sed '$d') if [ "$http_code" -eq 200 ]; then echo "$body" exit 0 elif [ "$http_code" -eq 429 ]; then retry_after=$(grep -i "^retry-after:" "$headers_file" | awk '{print $2}' | tr -d '\r') retry_after=${retry_after:-60} echo "Rate limited. Waiting ${retry_after}s before retry ${attempt}/${MAX_ATTEMPTS}..." >&2 sleep "$retry_after" else echo "Error $http_code: $body" >&2 exit 1 fi attempt=$((attempt + 1)) done echo "Exhausted $MAX_ATTEMPTS attempts." >&2 exit 1 ``` ```python Python theme={null} import time import httpx def check_entity( entity_name: str, country: str, api_key: str, max_attempts: int = 5, ) -> dict: """ POST /v1/entity/check with automatic 429 retry. Respects Retry-After for rate limits. Uses exponential backoff for 5xx transient errors. """ url = "https://api.limitguard.ai/v1/entity/check" headers = { "X-API-Key": api_key, "Content-Type": "application/json", } payload = {"entity_name": entity_name, "country": country} for attempt in range(1, max_attempts + 1): response = httpx.post(url, headers=headers, json=payload, timeout=30) if response.status_code == 200: return response.json() if response.status_code == 429: retry_after = int(response.headers.get("Retry-After", 60)) remaining = response.headers.get("X-RateLimit-Remaining", "0") reset_at = response.headers.get("X-RateLimit-Reset", "unknown") print( f"[attempt {attempt}/{max_attempts}] Rate limited. " f"Remaining: {remaining}. Reset at: {reset_at}. " f"Waiting {retry_after}s..." ) time.sleep(retry_after) continue if response.status_code >= 500: # Exponential backoff for transient server errors wait = min(2 ** attempt, 60) print( f"[attempt {attempt}/{max_attempts}] Server error " f"{response.status_code}. Waiting {wait}s..." ) time.sleep(wait) continue # Non-retryable error (4xx other than 429) response.raise_for_status() raise RuntimeError(f"Exhausted {max_attempts} attempts for entity check.") # Usage result = check_entity( entity_name="Acme Corp BV", country="NL", api_key="lg_live_xxxxxxxxxxxxxxxxxxxx", ) print(result) ``` ```javascript JavaScript theme={null} /** * POST /v1/entity/check with automatic 429 retry. * Respects Retry-After for rate limits. * Uses exponential backoff for 5xx transient errors. */ async function checkEntity( entityName, country, apiKey, { maxAttempts = 5 } = {} ) { const url = "https://api.limitguard.ai/v1/entity/check"; const headers = { "X-API-Key": apiKey, "Content-Type": "application/json", }; const body = JSON.stringify({ entity_name: entityName, country }); const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); for (let attempt = 1; attempt <= maxAttempts; attempt++) { const response = await fetch(url, { method: "POST", headers, body }); if (response.ok) { return response.json(); } if (response.status === 429) { const retryAfter = parseInt( response.headers.get("Retry-After") ?? "60", 10 ); const remaining = response.headers.get("X-RateLimit-Remaining") ?? "0"; const resetAt = response.headers.get("X-RateLimit-Reset") ?? "unknown"; console.warn( `[attempt ${attempt}/${maxAttempts}] Rate limited. ` + `Remaining: ${remaining}. Reset at: ${resetAt}. ` + `Waiting ${retryAfter}s...` ); await sleep(retryAfter * 1000); continue; } if (response.status >= 500) { const wait = Math.min(2 ** attempt, 60); console.warn( `[attempt ${attempt}/${maxAttempts}] Server error ${response.status}. ` + `Waiting ${wait}s...` ); await sleep(wait * 1000); continue; } // Non-retryable (4xx other than 429) const error = await response.json().catch(() => ({})); throw new Error( `Limitguard API error ${response.status}: ${error.detail ?? response.statusText}` ); } throw new Error(`Exhausted ${maxAttempts} attempts for entity check.`); } // Usage const result = await checkEntity( "Acme Corp BV", "NL", "lg_live_xxxxxxxxxxxxxxxxxxxx" ); console.log(result); ``` ## Upgrading Your Tier If you are consistently hitting rate limits on an API key, you have two options: > **[Top up to a higher tier](/authentication)** > > Top up to Indie, Starter, Growth, or Pro for higher per-minute and daily limits. > **[Switch to x402](/x402-protocol)** > > Pay per call with USDC. No daily cap; 60 requests per minute per payer. To create a key, then upgrade it: ```bash theme={null} # 1. Create a free key (only `free` or `sandbox` can be provisioned directly) curl -X POST https://api.limitguard.ai/v1/keys/create \ -H "Content-Type: application/json" \ -d '{"email": "you@example.com", "tier": "free"}' # 2. Upgrade by paying via x402 (POST; returns 402 first: sign and retry with X-PAYMENT) curl -X POST https://api.limitguard.ai/v1/keys/upgrade/pro \ -H "X-API-Key: lg_live_..." \ -H "X-PAYMENT: " ``` Available tiers: `free`, `sandbox`, `indie`, `starter`, `growth`, `pro`. See [Authentication](/authentication#api-key-authentication) for top-up prices and limits. # Trust Architecture Source: https://docs.limitguard.ai/guides/trust-architecture Zero-access model, data flow, and security architecture **Don't trust us. Verify us.** That is the operating philosophy behind every architectural decision at Limitguard. We check leads and companies against official registers, so every claim we make about ourselves should be checkable too. This document explains exactly how the system is built, what data it touches, where it lives, and how you can confirm every claim we make. > [!NOTE] > > Limitguard publishes its own trust signals at `GET /v1/self-verify`: public, free, no key needed. Every signal links to evidence you can check yourself, starting with the Dutch business register (KVK) entry of the company that operates Limitguard. *** ## Zero-Access Trust Model Limitguard is built on a zero-access principle: we minimize what we store, we make what we do store auditable, and we give you the tools to verify us independently. > **Data Minimisation** > > Only the fields you submit are processed. Check records are kept for 365 days, the audit log stores one-way hashes of entity identifiers, and `GET /v1/data/retention` lists every retention period. > **EU Data Residency** > > Application data is stored in the EU. Limitguard is operated by Ambulatio Consulting B.V. (trading as Limitguard), a Dutch company registered with the KVK under 77272471. > **Self-Verifying** > > Limitguard verifies itself with its own API. The result is public at `GET /v1/self-verify`, and each signal carries a link to its evidence. > **Hash Chain Audit Trail** > > Every verification event is recorded in a tamper-evident hash chain. No entry can be modified without breaking the chain. > **Certificate Records** > > Trust certificates are API records issued and verified via `/v1/certificate/*`, not written to any blockchain or contract. Limitguard's only on-chain footprint is its own ERC-8004 agent identity (agent 95545 on Base). > **Security Transparency** > > Responsible disclosure via RFC 9116. Our `/.well-known/security.txt` is public. The security mailbox is hosted on Proton Mail. *** ## Data Flow A single `POST /v1/entity/check` request moves through the following stages. Every data source the request's identifiers allow is queried in **parallel**, not sequentially, which is why median response time is under 500ms. ```mermaid theme={null} flowchart TD A([Client Request]) --> B[Logging Middleware] B --> C[Sandbox Detection] C --> D[Rate Limiter] D --> E[x402 Payment Verification] E --> F[Tenant Isolation] F --> G[Request Size Limit] G --> H[Security Headers] H --> J[Router] J --> K[Fan-out: Parallel Checks] K --> L1[KVK / KBO Registry] K --> L2[OpenSanctions] K --> L3[Country Risk] K --> L4[Domain Intelligence] K --> L5[IBAN Validation] K --> L6[VAT / VIES] K --> L7[Wallet Format Check] L1 & L2 & L3 & L4 & L5 & L6 & L7 --> M[Trust Score Engine] M --> N[Weighted Scoring] N --> O[Cluster Classification] O --> P[Recommendation Engine] P --> Q[Audit Trail Writer] Q --> R([Signed Response]) ``` > [!NOTE] > > The middleware chain runs top-to-bottom on every request. Sandbox detection fires **before** rate limiting and payment verification, so a sandbox key is recognized first and pays nothing on the endpoints the sandbox covers. See [Sandbox Mode](/sandbox) for details. *** ## Middleware Security Stack Every request passes through these main middleware layers before reaching the router. Order is fixed and cannot be bypassed. A few smaller layers (CORS, tracing, host checks) are left out here. | Position | Middleware | Purpose | | - | - | - | | 1 | **Logging** | Structured request logging with correlation IDs | | 2 | **Sandbox** | Detects a sandbox key by its prefix and applies the sandbox limit of 10 requests per minute per IP. Answers its own 429 | | 3 | **Rate Limiter** | Per-IP and per-key sliding window limits | | 4 | **x402 Payment** | Verifies EIP-3009 signature or checks API key tier. A sandbox request on a path with a sandbox mock skips payment | | 5 | **Tenant Isolation** | Scopes the request to the tenant context of its API key | | 6 | **Request Size Limit** | Blocks oversized payloads before parsing | | 7 | **Security Headers** | HSTS, CSP, X-Frame-Options, X-Content-Type-Options | | 8 | **Router** | Dispatches to endpoint handler | ``` Request → Logging → Sandbox → Rate Limit → x402 Payment → Tenant Isolation → Request Size Limit → Security Headers → Router ``` > [!TIP] > > Security headers are set at the middleware layer, not the application layer. This ensures they are present on every response a handler sends, including errors and health checks, regardless of which handler processes the request. *** ## The Data Sources Limitguard queries these independent data sources in parallel, as far as the identifiers in the request allow. No single source determines the outcome: the trust score is a weighted composite across all available signals. > **1. KVK / KBO Registry** > > **Dutch Chamber of Commerce (KVK) and the Belgian KBO/CBE (Crossroads Bank for Enterprises) business registers.** > > Verifies legal registration status, company age, registered address, SBI/NACE activity codes, and filing history. An active registration with multi-year history is a strong positive signal. Shell companies and recently dissolved entities are flagged. > **2. OpenSanctions** > > **80+ global sanctions and watchlist sources.** > > Checks against OFAC (US), EU consolidated list, UN Security Council, UK OFSI, and dozens of national and regional lists. OpenSanctions is the industry-standard open-source sanctions dataset, updated daily. > **3. Country Risk** > > **CPI (Corruption Perceptions Index) + FATF grey and blacklist.** > > Jurisdiction risk is evaluated using Transparency International's CPI score and the FATF (Financial Action Task Force) list status. High-risk jurisdictions, particularly FATF blacklisted or greylisted countries, reduce the trust score regardless of other signals. > **4. Domain Intelligence** > > **WHOIS registration age, DNS email records and the TLS certificate.** > > Domain age is a strong fraud signal: most fraudulent entities use recently registered domains. We also check the MX, SPF and DMARC email records, and connect to the website to check its TLS certificate: it must chain to a trusted certificate authority, match the domain name and not be expired. The issuer is recorded. > **5. IBAN Validation** > > **Bank account structure and BIC/SWIFT verification.** > > Validates the structural integrity of provided IBANs, and resolves the BIC. Mismatched country codes between the IBAN and the declared entity jurisdiction are flagged. > **6. VAT / VIES** > > **EU VAT number validation via the European Commission VIES system.** > > Confirms that the provided VAT number is active and registered to the declared entity name. VIES is the authoritative EU source for cross-border VAT verification, used by tax authorities across all 27 member states. > **7. Wallet Format Check** > > **Address-format validation for ETH/EVM, BTC, and SOL addresses.** > > The entity check only validates that a submitted wallet address is well-formed for its chain (regex match, no lookups). It does not screen against mixer, darknet, or sanctioned-wallet lists, and it is not factored into the trust score. For real wallet screening (OFAC SDN match, on-chain signals, and named risk rules), use the separate wallet screening tool (`verify_wallet` / `POST /v1/mcp/verify-wallet`, \$0.11). The OFAC SDN match alone is free, as a yes/no wallet sanctions check (see Pricing). ### Source Availability by Request Not every source is queried on every request. Source selection depends on which identifiers are provided and which tier (`cached` or `fresh`) is requested. | Source | Required Field | Always Queried? | | - | - | - | | KVK Registry | `kvk_number` or NL `country` | No: NL only | | KBO Registry | `cbe_number` | No: BE only | | OpenSanctions | `entity_name` | Yes | | Country Risk | `country` | Yes | | Domain Intelligence | `domain` | When provided | | IBAN Validation | `iban` | When provided | | VAT / VIES | `vat_number` | When provided | | Wallet Format Check | `wallet_address` | When provided | > [!NOTE] > > More identifiers = higher confidence. An entity check that includes a KVK number, domain, VAT number, and IBAN will produce a significantly more accurate score than one submitted with name and country only. ### Sanctions Check Scope Sanctions screening matches names only. A name match on its own is not proof, and we do not check who ultimately owns a company (no UBO check). *** ## Trust Scoring Methodology The trust score is not a black box. Every score comes with `top_factors` that explain exactly which signals drove the result, which source produced them, and how much weight they carried. ### Output Fields ```json theme={null} { "trust_score": 87, "trust_level": "high", "cluster": "established_eu_sme", "recommendation": "proceed", "confidence": 0.94, "top_factors": [ { "source": "sanctions", "signal": "No sanctions match found", "impact": "positive", "weight": 0.30 }, { "source": "registry", "signal": "Verified, active, established business", "impact": "positive", "weight": 0.30 }, { "source": "jurisdiction", "signal": "Low-risk jurisdiction (CPI: 82)", "impact": "positive", "weight": 0.20 }, { "source": "domain", "signal": "Established web presence (2412 days)", "impact": "positive", "weight": 0.10 } ] } ``` ### Score Bands | Score Range | `trust_level` | `recommendation` | Typical Action | | - | - | - | - | | 80 to 100 | `high` | `proceed` | Automated approval | | 60 to 79 | `medium` | `review` | Human review recommended | | 40 to 59 | `low` | `enhanced_due_diligence` | Enhanced KYB before proceeding | | 0 to 39 | `critical` | `block` | Do not transact | ### Entity Clusters The `cluster` field classifies entities into behavioural archetypes based on signal patterns across all sources. Cluster assignment improves interpretability: a `trust_score` of 72 means different things for an `established_eu_sme` versus a `high_risk_jurisdiction`. | Cluster | Description | | - | - | | `established_eu_enterprise` | Found in the register, older than 5 years, trust score 80 or more | | `established_eu_sme` | Found in the register, older than 2 years, trust score 60 or more | | `verified_startup` | Found in the register, under 2 years old: not inherently suspicious | | `unverified_new` | No register match | | `high_risk_jurisdiction` | Country is on the FATF black or grey list | | `sanctions_flagged` | Direct sanctions match: automatic `block` recommendation | | `insufficient_data` | Fewer than 3 sources answered, or the sanctions check could not run. Not a sanctions match | | `mixed_signals` | Found in the register, but the signals do not fit another cluster, for example a trust score under 50 | Wallets are not screened here; use `verify_wallet`. ### Confidence Score The `confidence` field (0 to 1) reflects how much data was available to produce the score. An entity verified by nearly every source scores `0.96+`. An entity verified with name and country only may score `0.55`. > [!TIP] > > Build confidence thresholds into your integration policy. For example: require `confidence >= 0.80` before automated approval, regardless of the trust score itself. *** ## Infrastructure and Data Residency ### Where Your Data Lives | Layer | Location | | - | - | | API, audit log and cache | European Union | | Dashboard application | European Union | | Database: dashboard accounts, workspaces and check records | Ireland | | CDN and web application firewall | Global edge network | Limitguard is operated by Ambulatio Consulting B.V. (trading as Limitguard), Breda, the Netherlands, KVK 77272471. The companies that process data for us are listed in section 4 of the [privacy policy](https://limitguard.ai/privacy?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=trust_architecture). > [!NOTE] > > Application data (API requests, check records, audit logs and dashboard accounts) is stored in the EU. The edge network that routes and filters traffic is run by a US company under the EU-US Data Privacy Framework; the [privacy policy](https://limitguard.ai/privacy?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=trust_architecture) names it and describes its role. ### How We Handle Personal Data Limitguard is hosted in the EU: API and dashboard in the EU, database in Ireland. The [data processing agreement](https://limitguard.ai/dpa?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=trust_architecture) and its sub-processor list (section 6) are published. These are the measures behind it: **1. Data minimization** Only the fields you submit are processed. We do not enrich requests with additional personal data beyond what is required for verification. **2. Limited retention** Each non-sandbox check is stored with its normalised identifiers (IBANs only as a keyed hash) for 365 days, then deleted. The audit log stores one-way hashes of entity identifiers, never the identifiers themselves. `GET /v1/data/retention` (any API key) lists every data category and its retention period. **3. Right to erasure (Art. 17)** GDPR Article 17 right to erasure is supported. Send `DELETE /v1/data/purge` with the `entity_name` (and optionally a `wallet_address`) to erase that entity's records held for your API key, including its check records. Matching audit entries are tombstoned rather than removed, so `GET /v1/audit/verify` can still check the chain. **4. EU data residency** Application data is stored in the EU (see the table above). Cloudflare routes traffic under the EU-US Data Privacy Framework. **5. Legal documents** The [privacy policy](https://limitguard.ai/privacy?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=trust_architecture), [data processing agreement](https://limitguard.ai/dpa?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=trust_architecture) and [terms of service](https://limitguard.ai/terms?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=trust_architecture) are published on limitguard.ai. The API also serves them at `GET /v1/legal/privacy`, `/v1/legal/dpa` and `/v1/legal/terms`. *** ## Audit Trail and Hash Chain Integrity Every verification event is recorded in a tamper-evident append-only log. Each entry includes a SHA-256 hash of the previous entry, forming a hash chain that makes retroactive modification detectable. ### How the Chain Works ```mermaid theme={null} flowchart LR A[Entry N-1\nhash: abc123] --> B[Entry N\nprev_hash: abc123\nhash: def456] B --> C[Entry N+1\nprev_hash: def456\nhash: ghi789] C --> D[Entry N+2\nprev_hash: ghi789\nhash: jkl012] ``` If any historical entry is modified, its hash changes, which breaks every subsequent entry in the chain. The break is immediately detectable by any verifier replaying the chain from the genesis entry. ### Audit Entry Structure ```json theme={null} { "event_id": "7f3c9a1e-...", "timestamp": "2026-02-20T09:14:33.421Z", "entity_hash": "b94d27b9...", "trust_score": 87, "trust_level": "high", "cluster": "established_eu_sme", "recommendation": "proceed", "sources_checked": 5, "processing_time_ms": 412, "previous_hash": "3e4f2a1c...", "entry_hash": "9c1b8d0e...", "erased_at": "", "erasure_request_id": "" } ``` > [!NOTE] > > Audit entries contain **hashes of entity identifiers**, not the identifiers themselves. The entity name, KVK number, and other submitted fields are never stored in the audit log: only a one-way hash that allows correlation without reconstruction. ### Querying the Audit Trail Both endpoints are scoped to your own API key. ```bash theme={null} # Your audit entries for one entity (entity_id is the entity_hash), newest first curl "https://api.limitguard.ai/v1/audit/query?entity_id=b94d27b9...&limit=100" \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" # Check the hash chain curl https://api.limitguard.ai/v1/audit/verify \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" ``` ```json theme={null} { "chain_valid": true, "records_checked": 1824 } ``` `GET /v1/audit/query` also takes `from`, `to` and `offset`, and returns `{"entries": [...], "count", "limit", "offset"}` with each entry in the shape above. *** ## Self-Verification Limitguard verifies itself using its own API. This endpoint is public, free, and unauthenticated. It returns six published signals about the operator, each with an evidence link, and the score they add up to. The sample below is abridged to five. ```bash theme={null} curl https://api.limitguard.ai/v1/self-verify ``` ```json theme={null} { "entity_name": "Ambulatio Consulting BV (trading as Limitguard)", "trust_score": 100, "trust_level": "HIGH", "verified_at": "2026-09-25T19:06:06Z", "signals": [ { "signal_name": "Dutch EU Entity", "status": "verified", "verifiable": true, "evidence_url": "https://www.kvk.nl/zoeken/", "description": "Registered Dutch entity (KVK 77272471, Ambulatio Consulting BV)" }, { "signal_name": "Open Methodology", "status": "verified", "verifiable": true, "evidence_url": "https://api.limitguard.ai/v1/methodology", "description": "Scoring algorithm and weights published publicly" }, { "signal_name": "Multi-Source Consensus", "status": "verified", "verifiable": true, "evidence_url": "https://api.limitguard.ai/v1/methodology", "description": "Trust scores derived from multiple independent sources" }, { "signal_name": "Audit Trail", "status": "verified", "verifiable": true, "evidence_url": "https://api.limitguard.ai/v1/audit/verify", "description": "Scored checks are recorded in a tamper-evident, hash-chained audit log; any API key can check the chain" }, { "signal_name": "ERC-8004 Identity", "status": "verified", "verifiable": true, "evidence_url": "https://api.limitguard.ai/.well-known/agent-registration.json", "description": "Registered as agent 95545 on the ERC-8004 Identity Registry (eip155:8453:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432)" } ], "scoring_methodology_url": "https://api.limitguard.ai/v1/methodology" } ``` The sixth signal is an EU data-protection signal: it points to the [privacy policy](https://limitguard.ai/privacy?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=trust_architecture) and describes EU hosting, data minimisation and erasure. It describes those measures; it is not a certification. > [!TIP] > > We recommend integrating `/v1/self-verify` into your vendor due diligence workflow. The response is computed on every request, not cached. *** ## Trust Certificates (API Records, Not On-Chain) Trust certificates are records Limitguard issues, stores, and verifies over its own REST API. They are **not** written to a blockchain, anchored to a contract, or backed by the ERC-8004 standard: nothing about certificate storage or verification touches a chain. The only on-chain element anywhere in Limitguard is its own agent identity: agent `95545` on the [ERC-8004 Identity Registry](https://basescan.org/address/0x8004A169FB4a3325136EB29fA0ceB6D2e539a432) on Base, which is unrelated to certificate issuance. ### How Certificates Work **1. Certificate requested** A caller with an admin-role API key sends `POST /v1/certificate/issue` with an entity name, country, and the `trust_score` / `trust_level` to record. **2. Not derived automatically** The trust score on a certificate is supplied by the caller in the request; it is not computed or re-verified server-side from a completed `/v1/entity/check`. Issuing and revoking therefore need the admin role: other keys get a 403. **3. Stored as an API record** Limitguard holds the certificate in its own store (`certificate_id`, entity name, country, trust score/level, `issued_at`, `expires_at`, and a SHA-256 `certificate_hash` of those fields). Certificates expire based on `valid_days` (default 365) and can be revoked by the admin key that issued them. **4. Public verification** Anyone can verify a certificate via `GET /v1/certificate/{certificate_hash}` (public, no auth). There is no separate on-chain copy to cross-check it against; this API response is the record. ### Certificate Fields | Field | Type | Description | | - | - | - | | `certificate_id` | `string` | Unique certificate UUID | | `entity_name` | `string` | Name of the certified entity | | `trust_score` | `int` | Score recorded at issuance (0 to 100), as supplied in the issue request | | `issued_at` / `expires_at` | `datetime` | Issuance timestamp and expiry (`valid_days` after issuance, default 365) | | `certificate_hash` | `string` | SHA-256 hash of the certificate's content fields | | `status` | `string` | `active` or `revoked` | ### Querying Certificates ```http theme={null} # Issue (admin-role API key required) POST /v1/certificate/issue # Verify (public, no auth) GET /v1/certificate/{certificate_hash} # Revoke (admin-role API key required; tenant-scoped to the issuing key) POST /v1/certificate/{certificate_hash}/revoke ``` > [!NOTE] > > Certificates do expire: `verify_certificate` checks the current time against `expires_at` and marks the certificate invalid once it has passed, alongside `active`/`revoked` status. There is no smart contract to query directly: verification is entirely through the endpoint above, so it depends on Limitguard's own uptime like any other endpoint. *** ## Security Transparency ### RFC 9116 Security Contact Limitguard publishes a machine-readable security contact per RFC 9116: ```bash theme={null} curl https://api.limitguard.ai/.well-known/security.txt ``` ``` Contact: mailto:security@limitguard.ai Expires: 2027-09-25T19:07:15.000Z Preferred-Languages: en, nl Canonical: https://api.limitguard.ai/.well-known/security.txt Canonical: https://limitguard.ai/.well-known/security.txt Policy: https://limitguard.ai/security ``` `Expires` is always one year ahead of the request. ### Encrypted Communications `security@limitguard.ai` is hosted on **Proton Mail** (Switzerland). Messages from other Proton Mail users are end-to-end encrypted; messages from other providers are encrypted at rest once received. ### Responsible Disclosure We operate a responsible disclosure programme. Security researchers who identify vulnerabilities in good faith will receive acknowledgement, coordinated disclosure timelines, and credit. See [limitguard.ai/security](https://limitguard.ai/security?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=trust_architecture) for the full programme terms. *** ## Summary: What We Claim vs. How You Verify It | Claim | How to Verify | | - | - | | EU data storage | [Privacy policy](https://limitguard.ai/privacy?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=trust_architecture) and [DPA](https://limitguard.ai/dpa?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=trust_architecture): providers, locations and purposes | | Dutch operator | KVK register: Ambulatio Consulting B.V. (trading as Limitguard), KVK 77272471 | | Limited retention | `GET /v1/data/retention`: every data category and its retention period | | GDPR Art. 17 erasure | `DELETE /v1/data/purge`: functional endpoint, not just a policy | | Hash chain integrity | `GET /v1/audit/verify` and `GET /v1/audit/query`: check the chain and your own entries | | Trust certificates | `GET /v1/certificate/{certificate_hash}`: public verification endpoint; the record lives in Limitguard's API, not on a blockchain | | Self-verifying | `GET /v1/self-verify`: our score, produced by our own API, public | | Security contact | `GET /.well-known/security.txt`: RFC 9116 compliant | > [!NOTE] > > Every claim in this document is backed by a verifiable endpoint or public record. We built it this way on purpose: we check leads against official registers, so asking you to "just trust us" would miss the point. *** ## Further Reading > **[Self-Verification Methodology](https://api.limitguard.ai/v1/methodology)** > > Machine-readable JSON: the signals, weights and evidence sources behind `GET /v1/self-verify` > **[x402 Protocol](/x402-protocol)** > > How x402 payment verification works > **[Sandbox Mode](/sandbox)** > > Test the full verification flow without touching real data sources > **[API Reference](/api-reference/introduction)** > > Full endpoint documentation including audit, certificate, and self-verify endpoints # Webhooks Source: https://docs.limitguard.ai/guides/webhooks Get sanctions-list changes that affect you pushed to your server Webhooks let Limitguard push events to your server as signed HTTP `POST` requests, so you do not have to poll. > [!NOTE] > > **Live today: `sanctions.match.new` and `identifier.change.new`.** When the OFAC SDN, EU or UN consolidated list changes an entry that matches an entity or wallet you checked, or an entry on your watchlist, Limitguard sends you the same alert `GET /v1/compliance/alerts` shows you. `identifier.change.new` is sent when a registry identifier of an entry on your watchlist changes. Registrations and pending deliveries are stored, so they survive restarts and deploys. > > `trust.score.changed`, `trust.level.downgrade` and `certificate.expired` can be registered, but nothing sends them yet. Every registration and list response carries `delivered_events`, the subset of your `events` that is actually sent today. > [!NOTE] > > Webhooks need an API key (`X-API-Key`). A webhook belongs to the key that registered it: only that key can list, test or delete it, and it receives alerts for that key's checks and watchlist only. ## How It Works When an event occurs, Limitguard sends an HTTP `POST` with a JSON body to every active webhook of yours that subscribed to that event type. Respond with any `2xx` status within 10 seconds to acknowledge it. Anything else (a non-`2xx` status, a redirect, a timeout, a TLS or connection error) counts as a failed attempt and is retried with backoff. Each request carries an `X-Limitguard-Signature` header: the hex HMAC-SHA256 of the raw request body, keyed with the webhook secret you received at registration. **Always verify it before processing the payload.** ## Setup **1. Register your endpoint** Send `POST /v1/webhooks` with your HTTPS URL and the event types you want. ```bash curl theme={null} curl -X POST https://api.limitguard.ai/v1/webhooks \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "url": "https://your-app.com/webhooks/limitguard", "events": ["sanctions.match.new"] }' ``` ```python Python theme={null} import httpx response = httpx.post( "https://api.limitguard.ai/v1/webhooks", headers={"X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx"}, json={ "url": "https://your-app.com/webhooks/limitguard", "events": ["sanctions.match.new"], }, ) webhook = response.json() print(webhook["id"]) # 3f6c2a9e-... print(webhook["secret"]) # 64 hex characters: store it securely now ``` ```javascript JavaScript theme={null} const response = await fetch("https://api.limitguard.ai/v1/webhooks", { method: "POST", headers: { "X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json", }, body: JSON.stringify({ url: "https://your-app.com/webhooks/limitguard", events: ["sanctions.match.new"], }), }); const webhook = await response.json(); console.log(webhook.id); // 3f6c2a9e-... console.log(webhook.secret); // 64 hex characters: store it securely now ``` ```json Response (201 Created) theme={null} { "id": "3f6c2a9e-8b41-4d7e-9a53-2c1f0e7b6d48", "url": "https://your-app.com/webhooks/limitguard", "events": ["sanctions.match.new"], "secret": "9f2c...64 hex characters...a71e", "active": true, "created_at": "2026-09-24T10:00:00.412907Z", "delivered_events": ["sanctions.match.new"] } ``` The URL must use `https://`, its host must resolve, and it must not resolve to a private, loopback, link-local, multicast, reserved or cloud-metadata address (IPv4 or IPv6). The same address check runs again before every delivery, since DNS can change after registration. A URL that fails any of these is refused with `422`. > [!WARNING] > > The `secret` is returned **once only**, in this response, and is never shown again (it is stored encrypted). Put it in a secret manager or an environment variable that is never committed. If you lose it, delete the webhook and register a new one. **2. Verify the signature** Compute the HMAC-SHA256 of the **raw request body** (the exact bytes you received, before any JSON parsing), keyed with your secret string, and compare its hex digest with `X-Limitguard-Signature` in constant time. The header is the bare hex digest, with no `sha256=` prefix. ```python Python theme={null} import hashlib import hmac def verify_signature(payload: bytes, signature_header: str, secret: str) -> bool: expected = hmac.new(secret.encode("utf-8"), payload, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, signature_header) # FastAPI example import os from fastapi import FastAPI, HTTPException, Request app = FastAPI() WEBHOOK_SECRET = os.environ["LIMITGUARD_WEBHOOK_SECRET"] @app.post("/webhooks/limitguard") async def handle_webhook(request: Request): payload = await request.body() signature = request.headers.get("X-Limitguard-Signature", "") if not verify_signature(payload, signature, WEBHOOK_SECRET): raise HTTPException(status_code=401, detail="Invalid signature") event = await request.json() await queue_for_processing(event) # respond fast, work in the background return {"received": True} ``` ```javascript JavaScript theme={null} import crypto from "crypto"; import express from "express"; const WEBHOOK_SECRET = process.env.LIMITGUARD_WEBHOOK_SECRET; function verifySignature(payload, signatureHeader, secret) { const expected = crypto.createHmac("sha256", secret).update(payload).digest("hex"); const a = Buffer.from(expected); const b = Buffer.from(signatureHeader || ""); // timingSafeEqual throws on a length mismatch, so check that first return a.length === b.length && crypto.timingSafeEqual(a, b); } const app = express(); app.post( "/webhooks/limitguard", // Keep the raw body: re-serialised JSON will not match the signature express.raw({ type: "application/json" }), (req, res) => { const signature = req.headers["x-limitguard-signature"]; if (!verifySignature(req.body, signature, WEBHOOK_SECRET)) { return res.status(401).json({ error: "Invalid signature" }); } const event = JSON.parse(req.body); res.json({ received: true }); // acknowledge first processEvent(event).catch(console.error); } ); ``` > [!WARNING] > > Compare signatures in constant time (`hmac.compare_digest` in Python, `crypto.timingSafeEqual` in Node.js). A plain `==` or `===` comparison leaks timing information. **3. Handle the event** Every delivery has the same envelope. Dispatch on `event`: ```json Delivery body theme={null} { "created_at": "2026-09-24T10:00:03.114233+00:00", "data": { "action_items": [ "Stop payouts to and freeze pending transfers with wallet 0x1da58215...", "Re-screen counterparties linked to this wallet", "File the hit with your compliance officer and keep this alert as evidence" ], "advice": [ { "action": "Stop payouts to and freeze pending transfers with wallet 0x1da58215...", "why": "Added to OFAC SDN on 2026-09-23 under programme CYBER2", "expected_result": "Avoids a sanctions breach on further transfers" }, { "action": "Re-screen counterparties linked to this wallet", "why": "Entities paying or paid by a listed wallet may be exposed too", "expected_result": "Finds indirect exposure before the next transfer" }, { "action": "File the hit with your compliance officer and keep this alert as evidence", "why": "Sanctions screening decisions must be documented", "expected_result": "An auditable record of when you learned of the listing" } ], "affected_sectors": ["financial_services"], "as_of": "2026-09-23", "content_hash": "4e1f...", "created_at": "2026-09-24T10:00:02Z", "effective_date": "2026-09-23", "entry_id": "54321", "event_type": "designated", "id": "b7d0e6a4-2f18-4c55-8e0b-1a9c3d7f5e21", "is_relevant_to_trust_scoring": true, "jurisdiction": "us", "list_name": "OFAC SDN", "match": {"basis": "checked", "kind": "crypto_address", "score": 1.0}, "relevance_score": 1.0, "severity": "critical", "source_id": "ofac_sdn", "source_name": "OFAC SDN", "source_url": "https://sanctionslist.ofac.treas.gov/Home/SdnList", "summary": "OFAC SDN: designated entity Example Exchange Ltd (CYBER2)" }, "event": "sanctions.match.new", "event_id": "9c41e2d07b5a4f86a3e1d2c4b6f80a17" } ``` | Field | Description | | - | - | | `event` | The event type, e.g. `sanctions.match.new`. A test delivery uses `test`. | | `event_id` | Stable ID of the event. A retry of the same event carries the same `event_id`: use it to de-duplicate. | | `created_at` | When the delivery was queued (ISO 8601, UTC). The same on every retry, so it is not a freshness check. | | `data` | The event payload. For `sanctions.match.new`, your alert exactly as `GET /v1/compliance/alerts` returns it: never another customer's data, never more than that endpoint shows you. | The body is JSON with its keys sorted. Always parse it rather than relying on key order or formatting, and verify the signature against the raw bytes before parsing. > [!WARNING] > > **`sanctions.match.new` is sent for every list change that touches you, not only new listings.** Read `data.event_type`: > > | `data.event_type` | Meaning | `data.severity` | > | - | - | - | > | `designated` | The entry was added to the list | `critical` | > | `amended` | The listing changed (names, identifiers, programmes and so on) | `high` | > | `delisted` | The entry was removed from the list | `informational` | > > `data.match.basis` says why the alert is yours: `checked` (an entity or wallet you checked) or `watchlist` (an entry on your watchlist). `data.match.kind` is how it matched (`crypto_address`, `registration`, `name_exact` or `name_tokens`) and `data.match.score` how strongly. ```python Python theme={null} async def process_event(event: dict): if event["event"] != "sanctions.match.new": return # test deliveries and future event types: acknowledge and ignore alert = event["data"] if alert["event_type"] == "designated": await freeze_and_escalate(alert) elif alert["event_type"] == "amended": await rescreen(alert) elif alert["event_type"] == "delisted": await review_restrictions(alert) ``` ```javascript JavaScript theme={null} async function processEvent(event) { if (event.event !== "sanctions.match.new") return; // test and future types const alert = event.data; switch (alert.event_type) { case "designated": await freezeAndEscalate(alert); break; case "amended": await rescreen(alert); break; case "delisted": await reviewRestrictions(alert); break; } } ``` ## Event Types These are the event types you can register. `sanctions.match.new` and `identifier.change.new` are sent today; the others are accepted so an integration can subscribe ahead of time, and `delivered_events` tells you which of yours are live. | Event | Sent today | Meaning | | - | - | - | | `sanctions.match.new` | Yes | A sanctions-list change (designation, amendment or delisting) matches an entity or wallet you checked, or your watchlist | | `identifier.change.new` | Yes | A registry identifier of an entry on your watchlist changed (seen in a check made with your key) | | `trust.score.changed` | Not yet | A monitored entity's trust score changed | | `trust.level.downgrade` | Not yet | A monitored entity's `trust_level` moved to a lower band | | `certificate.expired` | Not yet | A certificate passed its `expires_at` | `events` must list at least one of these names; there is no wildcard. An unknown name is refused with `422`. ## Delivery Headers | Header | Example | Description | | - | - | - | | `Content-Type` | `application/json` | Always JSON | | `X-Limitguard-Signature` | `a3f8c1...` (64 hex characters) | HMAC-SHA256 of the raw body, keyed with your secret | | `X-Limitguard-Event` | `sanctions.match.new` | The event type (same as `event` in the body) | | `X-Limitguard-Event-Id` | `9c41e2d07b5a...` | Same as `event_id` in the body; unchanged across retries | There is no timestamp header. Protect against replays by storing the `event_id`s you have processed and ignoring repeats. ## Retries A failed attempt is retried with exponential backoff (doubling from 30 seconds, plus up to 20% random jitter), up to 6 attempts per event: | Attempt | Delay after the previous attempt | About this long after the first | | - | - | - | | 1 | Within seconds of the alert | 0 | | 2 | 30 s | 30 s | | 3 | 1 min | 1.5 min | | 4 | 2 min | 3.5 min | | 5 | 4 min | 7.5 min | | 6 (last) | 8 min | 15.5 min | After the 6th failed attempt that event is marked failed and is not retried again. Other events keep being delivered. Limitguard waits up to **10 seconds** for your response and does not follow redirects. Respond `2xx` immediately and do the work asynchronously. > [!WARNING] > > **Deactivation.** When 10 events in a row fail all their attempts for the same webhook, that webhook is deactivated: its queued deliveries are dropped and it no longer appears in `GET /v1/webhooks`. Any successful delivery resets the count. To resume, fix your endpoint and register the webhook again; you will get a new secret. You can still poll `GET /v1/compliance/alerts` for anything you missed. ## Managing Webhooks ### List your webhooks `GET /v1/webhooks` returns your active webhooks as a JSON array. Secrets are never included. ```bash curl theme={null} curl https://api.limitguard.ai/v1/webhooks \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" ``` ```python Python theme={null} response = httpx.get( "https://api.limitguard.ai/v1/webhooks", headers={"X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx"}, ) for wh in response.json(): print(wh["id"], wh["url"], wh["delivered_events"]) ``` ```javascript JavaScript theme={null} const response = await fetch("https://api.limitguard.ai/v1/webhooks", { headers: { "X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx" }, }); const webhooks = await response.json(); webhooks.forEach((wh) => console.log(wh.id, wh.url, wh.delivered_events)); ``` ```json Response theme={null} [ { "id": "3f6c2a9e-8b41-4d7e-9a53-2c1f0e7b6d48", "url": "https://your-app.com/webhooks/limitguard", "events": ["sanctions.match.new"], "active": true, "created_at": "2026-09-24T10:00:00.412907Z", "delivered_events": ["sanctions.match.new"] } ] ``` ### Change a webhook There is no update endpoint. To change the URL or the events, register the new configuration and then delete the old webhook. Registering the same URL twice is allowed and creates two separate webhooks, each receiving its own copy of every event. ### Delete a webhook ```bash curl theme={null} curl -X DELETE https://api.limitguard.ai/v1/webhooks/3f6c2a9e-8b41-4d7e-9a53-2c1f0e7b6d48 \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" ``` Returns `204 No Content`. The webhook and its delivery history are removed and nothing more is sent to it. An unknown ID, or one registered by a different API key, returns `404`. ## Testing `POST /v1/webhooks/{webhook_id}/test` sends one signed test delivery to your endpoint right away. It takes no request body, makes a single attempt with no retries, and reports the result: ```bash curl theme={null} curl -X POST https://api.limitguard.ai/v1/webhooks/3f6c2a9e-8b41-4d7e-9a53-2c1f0e7b6d48/test \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" ``` ```python Python theme={null} response = httpx.post( "https://api.limitguard.ai/v1/webhooks/3f6c2a9e-8b41-4d7e-9a53-2c1f0e7b6d48/test", headers={"X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx"}, ) print(response.json()) ``` ```javascript JavaScript theme={null} const response = await fetch( "https://api.limitguard.ai/v1/webhooks/3f6c2a9e-8b41-4d7e-9a53-2c1f0e7b6d48/test", { method: "POST", headers: { "X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx" } } ); console.log(await response.json()); ``` ```json Response theme={null} { "delivery_id": "c2a8f0d1-5e7b-4a39-b6c4-8d1e2f3a4b5c", "success": true, "status_code": 200, "attempts": 1 } ``` `status_code` is what your endpoint answered, or `null` if it could not be reached. Your endpoint receives this body, signed with your real secret, so the test exercises your whole verification path: ```json Test delivery body theme={null} { "created_at": "2026-09-24T10:05:00.281554+00:00", "data": {"message": "Webhook test delivery from Limitguard.ai"}, "event": "test", "event_id": "e8b1c7a2-4d6f-4e3a-9b8c-0f1d2e3a4b5c" } ``` > [!TIP] > > Call the test endpoint from your deployment pipeline to confirm your handler is reachable and verifying signatures before real alerts depend on it. ## Best Practices ### Respond immediately, process asynchronously Return `2xx` within 10 seconds, before doing any real work, and hand the event to a background queue (Celery, BullMQ, SQS and so on). A slow handler turns into timeouts, retries and, eventually, deactivation. ### De-duplicate on `event_id` The same event can arrive more than once, for example when your `2xx` response is lost and the attempt is retried. Record each `event_id` together with its side effects, in one transaction, and skip any you have seen: ```python Python theme={null} async def process_event(event: dict): async with db.transaction(): if not await db.insert_if_absent("processed_events", event["event_id"]): return # already handled await apply_business_logic(event) ``` ### Ignore what you do not recognise New event types and new `data` fields will be added. Acknowledge unknown `event` values with `2xx` instead of failing, or the retries will count towards deactivation. ### Serve a valid certificate Deliveries verify your TLS certificate. A self-signed or expired certificate is not refused at registration, but every delivery to it fails. ## Next Steps > **[API Reference](/api-reference/introduction)** > > All endpoints, including the four webhook endpoints > **[Rate Limits](/guides/rate-limits)** > > The per-minute and daily limits your API key has > **[Error Handling](/guides/errors)** > > The error catalog, including webhook registration errors > **[Sandbox](/sandbox)** > > Try the API without spending anything # Introduction Source: https://docs.limitguard.ai/introduction Every lead checked against the official register. ![Limitguard](https://mintcdn.com/limitguard/uaqWIf-9wGFL37l0/logo/light.svg?fit=max\&auto=format\&n=uaqWIf-9wGFL37l0\&q=85\&s=001e2a6b81bfb747720577c78583c066) # Limitguard **Lead validation for lead generation agencies, sales agents and their clients.** Check the company behind each lead against the KVK and KBO registers, EU VAT and sanctions lists. Proceed, review or block, with the source on every line. Limitguard is a lead validation service for lead generation agencies, sales agents and their clients. It checks the company behind each lead against the official business registers (KVK in the Netherlands, KBO in Belgium), EU VAT (VIES), the OFAC, EU and UN sanctions lists and the email domain, and returns proceed, review or block with the source on every line. Developers and AI agents use the same checks over the HTTP API, the MCP server and the A2A service, hosted in the EU, paid per call in USDC or from an API key's prepaid balance. > **[Quickstart](/quickstart)** > > Run your first lead check in under 3 minutes > **[API Reference](/api-reference/introduction)** > > Explore every endpoint in the interactive playground > **[Sandbox](/sandbox)** > > Test for free with a sandbox key, no wallet > **[x402 Protocol](/x402-protocol)** > > Pay per call with USDC, no subscription needed ## Why Limitguard? A lead is only worth passing on if the company behind it is real and active. Limitguard checks each lead against the official register for its country before you deliver it, and names the source for every check, so you and your client can see why a lead was passed, flagged or blocked. Check one Dutch or Belgian lead with a single API call: ```bash theme={null} curl -X POST https://api.limitguard.ai/v1/leads/verify \ -H "X-API-Key: lg_live_..." \ -H "Content-Type: application/json" \ -d '{"country": "NL", "company_number": "12345678", "name": "Acme Corp BV", "email": "sales@acme-corp.nl"}' ``` The answer carries a `verdict` (for example `real_active` or `not_found`), a 0-100 `lead_score`, `flags` such as `vat_owner_mismatch` or `disposable_email`, and the `findings` behind them. See the [Lead Verify reference](/api-reference/leads/lead-verify) for every field. For a company check outside a lead flow, `POST /v1/entity/check` returns a trust score and a recommendation: ```bash theme={null} curl -X POST https://api.limitguard.ai/v1/entity/check \ -H "X-API-Key: lg_live_..." \ -H "Content-Type: application/json" \ -d '{"entity_name": "Acme Corp BV", "country": "NL", "kvk_number": "12345678"}' ``` ```json Response theme={null} { "trust_score": 87, "trust_level": "high", "cluster": "established_eu_sme", "recommendation": "proceed", "sources_checked": 3, "processing_time_ms": 247 } ``` ## What Gets Checked > **KVK and KBO registers** > > Dutch and Belgian business registers: is the company real and active, and do its name and address match > **EU VAT (VIES)** > > Is the VAT number valid, and is it registered to this company > **Sanctions lists** > > OFAC, EU and UN lists; the company check also screens OpenSanctions (80+ global lists) > **Email and website domain** > > Mail server and disposable domains for a lead; WHOIS age, DNS and SSL for a company > **IBAN** > > Bank account country and structure > **Jurisdiction** > > CPI and the FATF grey and black lists, in the company check > **Wallet Format Check** > > ETH, BTC, SOL address format validation. Full wallet screening (OFAC match, on-chain signals) is a separate tool at \$0.11 per call with an API key (\$0.005 with x402), and a yes/no sanctions check of the address is free: see [Trust Architecture](/guides/trust-architecture). ## How It Works **1. Send the lead** POST the company number or name and the country, plus whatever else the lead holds: VAT number, email, website domain, address or IBAN. **2. Parallel checks** Limitguard queries every source the details allow, in parallel: the business register, VIES, sanctions lists, the email domain and the IBAN. **3. Get a verdict** Lead Verify returns a verdict, a 0-100 lead score and flags. The company check returns a trust score (0-100), a risk level, an entity cluster and a recommendation: **proceed**, **review**, **enhanced due diligence** or **block**. Every check names its source. ## Key Features | Feature | Description | | - | - | | **Pay-per-use** | No subscription required. Pay with USDC via x402 protocol. | | **Sandbox mode** | Test free with realistic mock data. No wallet needed. The sandbox covers entity, risk and KYB checks; Lead Verify needs a live key. | | **Two quality tiers** | Choose cached or fresh on `/v1/entity/check`: see [Pricing](/pricing#tiered-pricing). | | **AI agent native** | MCP, A2A, and x402 discovery. Agents find and use Limitguard autonomously. | | **Hosted in the EU** | API and dashboard in the EU, database in Ireland. The [data processing agreement](https://limitguard.ai/dpa?utm_source=docs\&utm_medium=docs\&utm_campaign=legal\&utm_content=introduction) and its sub-processor list (section 6) are published, with retention periods. Operated by Ambulatio Consulting B.V. (trading as Limitguard) in the Netherlands. | | **Self-verifying** | Limitguard verifies itself with its own API. Our score is public. | ## Who Uses Limitguard * **Lead generation agencies**: check every lead before you deliver it to a client * **Sales agents and their clients**: confirm that the company behind a lead is real and active * **B2B marketing and sales teams**: check a lead list in the [dashboard](https://dashboard.limitguard.ai/sign-up?utm_source=docs\&utm_medium=docs\&utm_campaign=signup\&utm_content=introduction) (5 free lead checks after sign-up, no card) or over the API * **Developers and AI agents**: the same checks over the HTTP API, MCP and A2A > **[Ready to start?](/quickstart)** > > Run your first lead check in under 3 minutes # Downtime log, September 2026 Source: https://docs.limitguard.ai/postmortems/2026-09-downtime-log Planned maintenance on 2026-09-19 and every short downtime shown on the status page since the 2026-09-05 restore This page records every downtime of `api.limitguard.ai` shown on [status.limitguard.ai](https://status.limitguard.ai) since the service was restored on 2026-09-05. The longer outage before that has its own [post-mortem](/postmortems/2026-09-langfuse-event-loop). ## Planned maintenance, 2026-09-19 All times UTC. | When | What | | - | - | | 2026-09-19 00:34 | Tracing backend upgraded. The API does not depend on it to serve requests and stayed up. | | 2026-09-19 00:40:55 | Container engine upgrade on the API host starts. Every container on the host stops, including the API and the reverse proxy in front of it. | | 2026-09-19 00:41:45 | All containers back and healthy. `api.limitguard.ai/health` returns 200. | About 50 seconds of downtime. Requests in that window could not connect. Every service restarted from its existing data. The upgrade was run in the lowest-traffic hour. ## Unplanned downtime, 2026-09-08 to 2026-09-18 Daily totals as measured by the status-page monitors. The monitors report per-day totals, not individual start times. | Date | API | x402 discovery | | - | - | - | | 2026-09-08 | 3 min | none | | 2026-09-09 | 9 min | none | | 2026-09-10 | 2 min | 5 min | | 2026-09-13 | 7 min | none | | 2026-09-14 | 9 min | 5 min | | 2026-09-15 | 33 min | 25 min | | 2026-09-16 | 19 min | 10 min | | 2026-09-18 | 7 min | 4 min | | **Total** | **89 min** | **49 min** | The causes of these windows are still being investigated, and none of them has been ruled a false positive yet. This page will be updated with a cause per row. Any that turns out to be a real outage over a few minutes will also get its own entry on the status page, whose incident history currently shows none of them. **Candidate contributor, added 2026-09-23:** every deploy to `main` stops the running API before the new one listens, producing an empty-body 503 for roughly 43–45 s (measured on the production host). 119 commits landed on `main` in this window, but they do not line up with the daily totals: 2026-09-08 had the most (over 75) and only 3 minutes of API downtime, while 2026-09-13 had none and 7 minutes. Deploys can explain part of some rows at most, not the pattern as a whole — this has not been reconciled per-row yet. # Outage post-mortem, 2026-06-19 to 2026-09-05 Source: https://docs.limitguard.ai/postmortems/2026-09-langfuse-event-loop 78 days of 503s from one synchronous call with no timeout on the event loop, why nothing noticed, and what is structurally different now `api.limitguard.ai` returned HTTP 503 from 2026-06-19T13:57Z until 2026-09-05T17:16Z. The process was alive the whole time. Its event loop was blocked in one synchronous call that had no timeout, and nothing in the system was positioned to notice. This page covers what happened, why it took 78 days to see, what was fixed, and what is structurally different now. It does not cover customer data. ## Timeline All times UTC. | When | What | | - | - | | 2026-06-19 13:56 | `/health` latency climbs from about 270 ms to 1.4 s over one minute. | | 2026-06-19 13:57:56 | Last log line. The event-loop thread enters a blocking `read()` on a socket to Langfuse, our tracing backend, and never returns. Every request queued behind it hangs. The reverse proxy reports no upstreams and serves 503. | | 2026-06-19 to 2026-09-05 | The container never exits, so the `restart: unless-stopped` policy never fires. The Docker healthcheck keeps executing into the hung process every 15 s. Each of those execs leaks descriptors that are never reclaimed, and by September the container's shim has reached its file-descriptor hard limit (524,287), at which point `docker exec` stops working too. | | 2026-09-05 | The outage is found during unrelated work. Read-only diagnosis before any restart: the main thread is in `read()` on fd 13, a blocking socket to the tracing host; the shim is at its descriptor limit. | | 2026-09-05 17:16 | The event-loop fix is deployed from its branch. The wedged container cannot be stopped normally and is killed and recreated. Service restored. | | 2026-09-05 20:03 | The event-loop fix merged after CI. Slack alerting was added the same evening. | | 2026-09-06 | A dedicated thread pool for blocking probes and settlement reconciliation after a hard exit merged. | ## Root cause `/health` called the tracing client's `auth_check()` synchronously, on the asyncio event-loop thread, on every probe. The client's synchronous HTTP call has no timeout by default. The tracing host stalled once, the call blocked, and with the loop blocked the API could serve nothing at all. Three things had to be true for a single stalled call to take the service down for 78 days: 1. Blocking network I/O was allowed on the event-loop thread. 2. That I/O had no timeout, so one stall was permanent. 3. The blocked process still counted as running, so the platform never restarted it. The descriptor exhaustion, which is what made the container impossible to inspect or stop cleanly by September, was a consequence of the hang, not its cause. ## Detection gap Nobody was paged because nothing was wired to page them. No monitor, internal or external, was connected to a route that reached a person. Inside the platform, the healthcheck did fail, but a failed healthcheck on a process that has not exited does not trigger Docker's restart policy, and there was no in-process watchdog to turn "the loop has not moved in 30 seconds" into an exit. The service was unhealthy and the system agreed, and that agreement went nowhere. The lesson is not "add a dashboard". Every signal that would have shown the outage existed already. The gap was that none of them was wired to an action. ## Fixes | Fix | Change | | - | - | | Event-loop fix | The tracing probe runs in a worker thread with a 2 s cap and a 60 s cache; the tracing client gets a 5 s timeout; DNS and TLS probes are offloaded with a hard cap. A loop watchdog exits the process if the event loop is unresponsive for 30 s, so the platform restarts it. | | Alerting | CI and host security signals post to Slack. | | Probe thread pool | Blocking probes get their own thread pool, sized from the container's CPU limit rather than the host's, with its saturation state exposed. Without this, slow resolvers could silently degrade results while `/health` stayed green. | | Settlement reconciliation | Settlement reconciliation for rows stranded by a hard exit between crediting a ledger and submitting the on-chain leg. The watchdog from the event-loop fix introduced hard exits as a recovery path; this closes the consistency gap that path could open. | On the host, a cron job restarts the container if Docker reports it unhealthy, and host-side scripts post to Slack. The in-process watchdog is the first line; the host cron is the second. ## What is different now * **Nothing blocking runs on the event loop.** Probes that can stall run in a bounded pool with a timeout, and a slow dependency degrades one probe rather than the service. * **A hung process becomes an exited process.** The 30 s loop watchdog turns the failure mode that lasted 78 days into one that lasts under a minute, because an exited container is a state the platform knows how to recover from. * **Unhealthy reaches a human.** Host-side signals post to Slack, and the host restarts an unhealthy container on its own within five minutes. * **Recovery is designed for, not just hoped for.** Because the watchdog can hard-exit mid-operation, the settlement path was made safe against exactly that, rather than assuming clean shutdowns. Live status: [status.limitguard.ai](https://status.limitguard.ai). # Pricing Source: https://docs.limitguard.ai/pricing API prices: USDC per call, or from a prepaid API key balance All prices are in USDC. Pay per API call via the [x402 protocol](/x402-protocol) at the [agent price](#agent-prices-x402), or hold a paid-tier [API key](/authentication) with a prepaid balance that each priced call is debited from at the account price. The tables below are the account prices. > [!NOTE] > > The dashboard at [dashboard.limitguard.ai](https://dashboard.limitguard.ai/?utm_source=docs\&utm_medium=docs\&utm_campaign=signup\&utm_content=pricing) is priced separately, in euros: per lead, per company check with a PDF report, and optional monthly or yearly plans that include credit. See [limitguard.ai/pricing](https://limitguard.ai/pricing/?utm_source=docs\&utm_medium=docs\&utm_campaign=pricing\&utm_content=pricing). **What it is:** Limitguard is a lead validation service for lead generation agencies, B2B marketing and sales teams: it checks the company behind each lead against official business registers (full coverage in the Netherlands and Belgium), EU VAT and sanctions lists, with website age in the company check, and returns proceed, review or block with the source on every line. Developers and AI agents can use its HTTP API, MCP server and A2A service, hosted in the EU. **Start here:** Free sandbox key, no wallet. The sandbox covers entity, risk and KYB checks; Lead Verify and the agent check need a live key or an x402 payment. Paid by x402: Lead Verify \$0.10 per lead and agent check \$0.005 per wallet; entity check and KYB \$0.29 and risk score \$0.25 fresh, \$0.11 cached (\$0.25 KYB) when available; report \$0.55; sanctions and wallet screens \$0.005; other routes at the account price. API keys, the dashboard and the Claude connector pay the account prices: Lead Verify \$0.27 per lead and agent check \$0.75 per wallet; \$0.11-1.85 per call; entity and risk checks \$0.88-1.05 fresh (\$1.50 KYB), \$0.11 cached (\$0.25 KYB) when available. ## Agent prices (x402) An x402 payment pays the agent price: REST, A2A with x402, and MCP pay-per-call on `/mcp`. An API key, the dashboard and the Claude connector pay the account price, from prepaid credit. A route not listed here costs its account price with x402 too. The official x402 SDKs refuse a payment above one dollar by default (`maxAmountPerPayment`). That default covers every agent price. Raise it only for the deep-check `enhanced` and `credit` tiers and for the `/v1/keys/upgrade/*` and `/v1/keys/topup/*` purchases. | Endpoint | Agent price (x402) | Account price | | - | - | - | | `POST /v1/entity/check` | $0.29 fresh, $0.11 cached | $1.05 fresh, $0.11 cached | | `POST /v1/mcp/check-entity` | \$0.29 | \$1.05 | | `POST /v1/risk/score` | $0.25 fresh, $0.11 cached | $0.90 fresh, $0.11 cached | | `POST /v1/mcp/risk-score` | \$0.25 | \$0.90 | | `POST /v1/kyb/check` | $0.29 fresh, $0.25 cached | $1.50 fresh, $0.25 cached | | `POST /v1/reports/entity` | \$0.55 | \$1.85 | | `POST /v1/leads/verify` | \$0.10 | \$0.27 | | `POST /v1/agent/check` | \$0.005 | \$0.75 | | `POST /v1/mcp/verify-wallet` | \$0.005 | \$0.11 | | `POST /v1/sanctions/screen` | \$0.005 | \$0.11 | ## Tiered Pricing Four core endpoints sell two quality tiers. Select with the `X-Response-Quality` header (default: `fresh`). These are account prices: an x402 payment pays the agent price in the table above. | Endpoint | Cached | Fresh (default) | | - | - | - | | `POST /v1/entity/check` | \$0.11 | \$1.05 | | `POST /v1/risk/score` | \$0.11 | \$0.90 | | `POST /v1/reputation/score` | \$0.11 | \$0.90 | | `POST /v1/kyb/check` | \$0.25 | \$1.50 | `enhanced` was retired on these four endpoints on 2026-09-24: it ran the same sources as `fresh`, so `X-Response-Quality: enhanced` is now quoted, charged and served at the `fresh` price, and the 402 body's `info.note` says so. `POST /v1/entity/deep-check` keeps its own tiers (see [x402 Protocol](/x402-protocol)). ### Quality Tier Definitions > **Cached (cheapest)** > > Return Redis-cached result if available. Use when freshness isn't critical and you want the lowest cost. Set `X-Response-Quality: cached`. > **Fresh (default)** > > Always run full data source fan-out. This is the default behavior when no header is sent. Set `X-Response-Quality: fresh`. ## Flat-Priced Endpoints These endpoints have a single account price regardless of quality tier. An x402 payment pays the agent price above for the routes listed there: | Endpoint | Account price | | - | - | | `POST /v1/leads/verify` | \$0.27 | | `POST /v1/agent/check` | \$0.75 | | `POST /v1/sanctions/screen` | \$0.11 | | `GET /v1/reputation/history/{entity_hash}` | \$0.11 | | `GET /v1/wallet/balance` | \$0.11 | | `GET /v1/compliance/alerts` | \$0.11 | | `GET /v1/compliance/readiness/{entity_id}` | \$0.11 | | `POST /v1/reports/entity` | \$1.85 | `POST /v1/reports/entity` builds a per-entity report from one real check: registry identity, sanctions and PEP screening, domain signals, risk score, up to 12 findings, a per-source status table (a source that did not answer is shown unavailable, never clean) and an evidence hash. Send identifiers or the `check_id` of an earlier report's check. Reading a stored report back with `GET /v1/reports/{report_id}` is free (`?format=pdf` for a PDF). Sandbox keys cannot create reports: they are built only from real checks. ### Deep check `POST /v1/entity/deep-check` has no cached tier. Its default is `deep` (its `fresh` tier) and `extended` is its `enhanced` tier; where enabled, `credit` is a third tier. Its prices are account prices; it has no separate agent price, so an x402 payment pays the same. | Endpoint | Fresh (default) | Enhanced | | - | - | - | | `POST /v1/entity/deep-check` | \$0.88 | \$1.71 | * `deep` (`fresh`): PEP and relative/close-associate matches from OpenSanctions, plus a Dutch Centraal Insolventieregister insolvency screen (NL only). * `extended` (`enhanced`): the same, plus adverse media screening against a global news index. * `credit` (\$2.45, Italy only, available when enabled): the same as `deep`, plus an Italian credit report from Openapi.com. ## MCP Tool Endpoints The [MCP tools](/guides/ai-agent-integration#mcp-model-context-protocol) are priced per call on the two price lists of the REST API: a key or the Claude connector pays the account price, an x402 payment the agent price in [Agent prices](#agent-prices-x402). `check_entity` and `get_risk_score` cost the same as the `fresh` tier of the endpoint they mirror; `get_trust_score` (your own most recent stored score for an entity), `sanctions_preview` and `wallet_sanctions_preview` (a yes/no OFAC SDN check of a wallet address) are free; `verify_wallet` (the full wallet screen) costs \$0.11 with a key and \$0.005 with x402; `get_compliance_report`, `sanctions_screen`, `check_agent_wallet` and `verify_lead` are billed at the price of the REST endpoint they call (`POST /v1/reports/entity`, `POST /v1/sanctions/screen`, `POST /v1/agent/check` and `POST /v1/leads/verify`, in the tables above). `check_agent` is an unimplemented placeholder: \$0.00, and hidden from the MCP tool list. The REST mirrors: | Endpoint | Tool | Account price | | - | - | - | | `POST /v1/mcp/check-entity` | `check_entity` | \$1.05 | | `POST /v1/mcp/risk-score` | `get_risk_score` | \$0.90 | | `POST /v1/mcp/check-agent` | `check_agent` | \$0.00 | | `POST /v1/mcp/trust-score` | `get_trust_score` | \$0.00 | | `POST /v1/mcp/verify-wallet` | `verify_wallet` | \$0.11 | > [!NOTE] > > The `Endpoint` column shows the REST transport path. MCP clients invoke these by tool name with the arguments declared in the [MCP manifest](/guides/ai-agent-integration#mcp-model-context-protocol). Every REST mirror is a `POST` with a JSON body, `verify_wallet` included. ## API Key Tier Upgrades Pay via x402 to top up an API key's prepaid balance (`POST /v1/keys/upgrade/{tier}` or `POST /v1/keys/topup/{usd}`). This is the only case where x402 payment is required even if you already hold an API key. See [Authentication](/authentication#api-key-authentication) for the full tier ladder. The balance does not expire or reset. Each key also has a monthly call cap equal to its tier's limit in the table below. It resets at 00:00 UTC on the 1st; see [Rate Limits](/guides/rate-limits#monthly-cap-per-key). API key top-ups (Indie, Starter, Growth, Pro in USD) are prepaid balances for the API; they are not the dashboard's monthly or yearly plans. | Endpoint | Price | Rate limits | | - | - | - | | `POST /v1/keys/upgrade/indie` | \$29 | 30 / min, 1,000 / 24 h, 1,000 / month | | `POST /v1/keys/upgrade/starter` | \$99 | 60 / min, 10,000 / 24 h, 10,000 / month | | `POST /v1/keys/upgrade/growth` | \$299 | 120 / min, 50,000 / 24 h, 50,000 / month | | `POST /v1/keys/upgrade/pro` | \$999 | 300 / min, 250,000 / 24 h, 250,000 / month | ## Free Endpoints No payment or API key required: | Category | Endpoints | | - | - | | **Health** | `GET /health` | | **Key provisioning** | `POST /v1/keys/create` | | **Discovery** | `/.well-known/x402.json`, `/.well-known/agent.json`, `/.well-known/mcp.json` | | **Transparency** | `/v1/self-verify`, `/v1/methodology`, `/v1/self-verify/signals` | | **Certificates** | `/v1/certificate/{hash}` (verification only) | | **Legal** | `/v1/legal/privacy`, `/v1/legal/terms`, `/v1/legal/dpa` | | **LLM** | `/llms.txt`, `/llms-full.txt` | ## Payment Methods > **x402 inside A2A** > > Agents that speak A2A pay a priced skill inside the conversation: the reply is an `input-required` task with the price, the agent signs and sends the payment with the task id, and gets the answer with a receipt. No API key. > > [Learn more →](/x402-protocol#paying-inside-a2a-a2a-x402) > **x402 USDC Micropayments** > > AI agents and anonymous callers pay per request via x402 V2 protocol. No subscription required. > > **Networks:** Base Mainnet and Solana Mainnet. Base Sepolia and Solana Devnet only in test environments. > > [Learn more →](/x402-protocol) > **Prepaid API Key** > > Paid-tier API keys skip x402 on each call; the call is debited from the key's prepaid balance instead. Top-ups are paid via x402. Free keys hold no balance and pay per call. Sandbox keys get mock responses without paying on the endpoints the sandbox covers; on any other priced endpoint they pay per call like a free key. > > **Tiers:** Free (500 calls / 24 h and 500 / month), Indie (\$29), Starter (\$99), Growth (\$299), Pro (\$999). > > [Learn more →](/authentication) ## USDC Amount Reference For x402 integration, amounts use 6 decimal places (`1_000_000 = $1.00`): | Price | USDC 6-decimal | x402 `amount` field | | - | - | - | | \$0.005 | 5,000 | `"5000"` | | \$0.10 | 100,000 | `"100000"` | | \$0.11 | 110,000 | `"110000"` | | \$0.25 | 250,000 | `"250000"` | | \$0.27 | 270,000 | `"270000"` | | \$0.29 | 290,000 | `"290000"` | | \$0.55 | 550,000 | `"550000"` | | \$0.75 | 750,000 | `"750000"` | | \$0.88 | 880,000 | `"880000"` | | \$0.90 | 900,000 | `"900000"` | | \$1.05 | 1,050,000 | `"1050000"` | | \$1.50 | 1,500,000 | `"1500000"` | | \$1.71 | 1,710,000 | `"1710000"` | | \$1.85 | 1,850,000 | `"1850000"` | | \$2.45 | 2,450,000 | `"2450000"` | | \$29 | 29,000,000 | `"29000000"` | | \$99 | 99,000,000 | `"99000000"` | | \$299 | 299,000,000 | `"299000000"` | | \$999 | 999,000,000 | `"999000000"` | # Quickstart Source: https://docs.limitguard.ai/quickstart Run your first lead check in under 3 minutes **1. Get an API Key** Create a free API key with a single request: no account or credit card needed. ```bash curl theme={null} curl -X POST https://api.limitguard.ai/v1/keys/create \ -H "Content-Type: application/json" \ -d '{"email": "you@example.com", "tier": "free"}' ``` ```python Python theme={null} import httpx response = httpx.post( "https://api.limitguard.ai/v1/keys/create", json={"email": "you@example.com", "tier": "free"}, ) key = response.json() print(key["api_key"]) # lg_live_xxxxxxxxxxxxxxxxxxxx ``` ```javascript JavaScript theme={null} const response = await fetch("https://api.limitguard.ai/v1/keys/create", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ email: "you@example.com", tier: "free" }), }); const { api_key } = await response.json(); console.log(api_key); // lg_live_xxxxxxxxxxxxxxxxxxxx ``` ```json Response theme={null} { "api_key": "lg_live_xxxxxxxxxxxxxxxxxxxx", "key_id": "3f9a1c7e5b2d8046", "tier": "free", "monthly_limit": 500 } ``` > [!WARNING] > > Save the `api_key` immediately: it is shown **once only**. The plaintext key is never stored server-side. **2. Try Sandbox Mode (Free)** Test the API without calling real data sources or paying for calls with a free sandbox key. Sandbox mode is decided by the key (`lg_sandbox_...`), not by a header: ```bash curl theme={null} # 1. A free sandbox key: no wallet, no payment curl -X POST https://api.limitguard.ai/v1/keys/create \ -H "Content-Type: application/json" \ -d '{"email": "you@example.com", "tier": "sandbox"}' # 2. Any call with it returns mock data curl -X POST https://api.limitguard.ai/v1/entity/check \ -H "X-API-Key: lg_sandbox_xxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "entity_name": "Acme Corp BV", "country": "NL", "kvk_number": "12345678" }' ``` ```python Python theme={null} import httpx key = httpx.post( "https://api.limitguard.ai/v1/keys/create", json={"email": "you@example.com", "tier": "sandbox"}, ).json()["api_key"] # lg_sandbox_... response = httpx.post( "https://api.limitguard.ai/v1/entity/check", headers={"X-API-Key": key}, json={ "entity_name": "Acme Corp BV", "country": "NL", "kvk_number": "12345678", }, ) print(response.json()) ``` ```javascript JavaScript theme={null} const { api_key } = await (await fetch("https://api.limitguard.ai/v1/keys/create", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ email: "you@example.com", tier: "sandbox" }), })).json(); // lg_sandbox_... const response = await fetch("https://api.limitguard.ai/v1/entity/check", { method: "POST", headers: { "X-API-Key": api_key, "Content-Type": "application/json", }, body: JSON.stringify({ entity_name: "Acme Corp BV", country: "NL", kvk_number: "12345678", }), }); const result = await response.json(); console.log(result); ``` Sandbox returns deterministic mock data: the same input always gives the same output. No real data sources are called and nothing is charged. **3. Check a Lead** Lead Verify checks one Dutch or Belgian lead against the live KVK or KBO register, VIES, the OFAC, EU and UN sanctions lists and its email domain. It runs on the live registers only, so it needs an `lg_live_` key with a prepaid balance or an x402 payment (a free key pays per call over x402, and a sandbox key gets `403`). To try it without paying, [sign up in the dashboard](https://dashboard.limitguard.ai/sign-up?utm_source=docs\&utm_medium=docs\&utm_campaign=signup\&utm_content=quickstart) for 5 free lead checks, no card. ```bash curl theme={null} curl -X POST https://api.limitguard.ai/v1/leads/verify \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "country": "NL", "company_number": "12345678", "name": "Acme Corp BV", "vat_number": "NL123456789B01", "email": "sales@acme-corp.nl" }' ``` ```python Python theme={null} import httpx response = httpx.post( "https://api.limitguard.ai/v1/leads/verify", headers={"X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx"}, json={ "country": "NL", "company_number": "12345678", "name": "Acme Corp BV", "vat_number": "NL123456789B01", "email": "sales@acme-corp.nl", }, ) result = response.json() print(result["verdict"], result["lead_score"], result["flags"]) ``` ```javascript JavaScript theme={null} const response = await fetch("https://api.limitguard.ai/v1/leads/verify", { method: "POST", headers: { "X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json", }, body: JSON.stringify({ country: "NL", company_number: "12345678", name: "Acme Corp BV", vat_number: "NL123456789B01", email: "sales@acme-corp.nl", }), }); const result = await response.json(); console.log(result.verdict, result.lead_score, result.flags); ``` A Belgian lead needs its 10-digit KBO number in `company_number`: Belgian companies cannot be looked up by name. The answer carries a `verdict` (for example `real_active` or `not_found`), a 0-100 `lead_score`, `flags` such as `vat_owner_mismatch` or `disposable_email`, and the `findings` behind them. An input you leave out is not checked and never counts against the lead. See the [Lead Verify reference](/api-reference/leads/lead-verify) for every field and [Pricing](/pricing#flat-priced-endpoints) for the price. **4. Make a Live Entity Check** Use your `lg_live_` key (or pay per call with x402) for real results from every source your identifiers allow: the business register, sanctions, country risk, domain, IBAN and VAT. ```bash curl theme={null} curl -X POST https://api.limitguard.ai/v1/entity/check \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "entity_name": "Acme Corp BV", "country": "NL", "kvk_number": "12345678" }' ``` ```python Python theme={null} import httpx response = httpx.post( "https://api.limitguard.ai/v1/entity/check", headers={"X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx"}, json={ "entity_name": "Acme Corp BV", "country": "NL", "kvk_number": "12345678", }, ) result = response.json() print(f"Trust Score: {result['trust_score']}/100") print(f"Level: {result['trust_level']}") print(f"Action: {result['recommendation']}") ``` ```javascript JavaScript theme={null} const response = await fetch("https://api.limitguard.ai/v1/entity/check", { method: "POST", headers: { "X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json", }, body: JSON.stringify({ entity_name: "Acme Corp BV", country: "NL", kvk_number: "12345678", }), }); const result = await response.json(); console.log(`Trust Score: ${result.trust_score}/100`); ``` ```json Response theme={null} { "trust_score": 87, "trust_level": "high", "cluster": "established_eu_sme", "recommendation": "proceed", "confidence": 0.94, "top_factors": [ {"source": "sanctions", "signal": "No sanctions match found", "impact": "positive", "weight": 0.30}, {"source": "registry", "signal": "Verified, active, established business", "impact": "positive", "weight": 0.30}, {"source": "jurisdiction", "signal": "Low-risk jurisdiction (CPI: 82)", "impact": "positive", "weight": 0.20} ], "sources_checked": 5, "processing_time_ms": 342 } ``` **5. Try a Quick Risk Score** For fast risk-only assessment (2 sources, cheaper): ```bash curl theme={null} curl -X POST https://api.limitguard.ai/v1/risk/score \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"entity_name": "Acme Corp BV", "country": "NL"}' ``` ```python Python theme={null} import httpx response = httpx.post( "https://api.limitguard.ai/v1/risk/score", headers={"X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx"}, json={"entity_name": "Acme Corp BV", "country": "NL"}, ) print(response.json()) ``` ```javascript JavaScript theme={null} const response = await fetch("https://api.limitguard.ai/v1/risk/score", { method: "POST", headers: { "X-API-Key": "lg_live_xxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json", }, body: JSON.stringify({ entity_name: "Acme Corp BV", country: "NL" }), }); console.log(await response.json()); ``` ## Response Quality Tiers Control cost vs. freshness with the `X-Response-Quality` header: | Tier | Header Value | Cost with an API key (entity/check) | Description | | - | - | - | - | | **Cached** | `cached` | \$0.11 | Serve from Redis cache if available | | **Fresh** | `fresh` | \$1.05 | Always run full fan-out (default) | Paying per call with x402 instead of an API key costs the agent price: \$0.29 for `fresh` and \$0.11 for `cached` on `/v1/entity/check`. See [Pricing](/pricing#agent-prices-x402). ```bash theme={null} curl -X POST https://api.limitguard.ai/v1/entity/check \ -H "X-API-Key: lg_live_xxxxxxxxxxxxxxxxxxxx" \ -H "X-Response-Quality: cached" \ -H "Content-Type: application/json" \ -d '{"entity_name": "Acme Corp BV", "country": "NL"}' ``` ## Next Steps > **[Authentication](/authentication)** > > API keys, x402 USDC payments, and sandbox mode > **[Pricing](/pricing)** > > Full pricing table for all endpoints and tiers > **[Error Handling](/guides/errors)** > > Complete error catalog with causes and fixes > **[AI Agent Integration](/guides/ai-agent-integration)** > > How AI agents discover and use Limitguard # Sandbox Mode Source: https://docs.limitguard.ai/sandbox Test the API for free with a sandbox key: no wallet, no payment, mock data Sandbox mode lets you test the Limitguard API without calling real data sources, making USDC payments, or spending a prepaid balance. ## How to Activate Sandbox mode is decided by the key, never by a header: a request is a sandbox request when its `X-API-Key` is a sandbox key (`lg_sandbox_...`). 1. Create a free sandbox key. No wallet, no payment: ```bash theme={null} curl -X POST https://api.limitguard.ai/v1/keys/create \ -H "Content-Type: application/json" \ -d '{"email": "you@example.com", "tier": "sandbox"}' # -> {"api_key": "lg_sandbox_...", "tier": "sandbox", ...} ``` 2. Send it on any endpoint: ```bash curl theme={null} curl -X POST https://api.limitguard.ai/v1/entity/check \ -H "X-API-Key: lg_sandbox_xxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"entity_name": "Any Company Name", "country": "NL"}' ``` ```python Python theme={null} import httpx response = httpx.post( "https://api.limitguard.ai/v1/entity/check", headers={"X-API-Key": "lg_sandbox_xxxxxxxxxxxxxxxxxxxx"}, json={"entity_name": "Any Company Name", "country": "NL"}, ) ``` ```javascript JavaScript theme={null} const response = await fetch("https://api.limitguard.ai/v1/entity/check", { method: "POST", headers: { "X-API-Key": "lg_sandbox_xxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json", }, body: JSON.stringify({ entity_name: "Any Company Name", country: "NL" }), }); ``` > [!WARNING] > > There is no sandbox header. An `X-Limitguard-Mode: sandbox` header is ignored, so a request that sends it with a live key is a normal, paid call. Keys starting with `lg_test_` are refused in production with `401 Test keys not accepted in production`. `POST /v1/reports/entity` (and the MCP `get_compliance_report` tool) refuses sandbox keys with `403`: reports are built only from real checks. ## Sandbox Behavior | Property | Behavior | | - | - | | **Data sources** | No real sources called (KVK, sanctions, VIES, etc.) | | **Responses** | Deterministic mock data: the same input always gives the same output | | **Payments** | No USDC payment required: x402 is skipped | | **Balance** | Not debited | | **Rate limit** | 10 requests per minute per IP | ## Mock Data Examples ### /v1/entity/check (sandbox) ```json theme={null} { "trust_score": 75, "trust_level": "medium", "cluster": "verified_startup", "recommendation": "review", "confidence": 0.85, "top_factors": [ { "source": "sandbox", "signal": "Mock data for Acme Corp BV", "impact": "positive", "weight": 0.5 } ], "correlations": {}, "sources_checked": 0, "processing_time_ms": 1, "version": "1.0", "sandbox": true } ``` The `signal` echoes the `entity_name` you sent. `sandbox: true` marks every mock response. ### /v1/risk/score (sandbox) ```json theme={null} { "risk_score": 25, "risk_level": "low", "recommendation": "proceed", "top_factors": [ { "source": "sandbox", "signal": "Mock risk data for Acme Corp BV", "impact": "positive", "weight": 0.4 } ], "processing_time_ms": 1, "sandbox": true } ``` ## Rate Limit Response When the sandbox rate limit is exceeded: ```json theme={null} HTTP 429 { "error": "Sandbox rate limit exceeded (10 req/min). Use a real API key for higher limits." } ``` The response includes a `Retry-After: 60` header. ## Use Cases | Scenario | Recommendation | | - | - | | First-time integration | Sandbox key | | CI/CD automated tests | Sandbox key in an environment variable; it can never trigger a paid call | | Frontend development | Sandbox key | | Load testing | Sandbox key (10 requests per minute per IP); never load test production | | Demo / prototype | Sandbox key | ## Middleware Execution Order Sandbox detection runs **before** rate limiting and x402 payment verification. A sandbox request to an endpoint the sandbox covers skips the payment check and is never charged. Any other priced endpoint charges a sandbox key like a free key. A sandbox request over the limit of 10 requests per minute per IP is answered with a 429 by the sandbox step itself. ## Transitioning to Production When ready to use real data, replace the `lg_sandbox_` key with an `lg_live_` key from the [dashboard](https://dashboard.limitguard.ai/sign-up?utm_source=docs\&utm_medium=docs\&utm_campaign=signup\&utm_content=sandbox) or `POST /v1/keys/create`, or pay per call with [x402](/x402-protocol). No other code changes required. The same endpoints, request format, and response structure apply in both modes. # x402 Protocol Source: https://docs.limitguard.ai/x402-protocol Pay-per-use USDC micropayments for AI agents — no subscription required Limitguard implements the x402 V2 micropayment protocol for AI agent pay-per-use access. No prepaid key or API key required: agents pay per call in USDC. ## Overview x402 extends HTTP with a payment layer: 1. Agent makes request without payment 2. Server returns HTTP 402 with payment requirements 3. Agent constructs EIP-3009 `TransferWithAuthorization` signature 4. Agent retries with the `PAYMENT-SIGNATURE` header (the V2 header; the legacy `X-PAYMENT` header is also accepted) 5. Server verifies signature, processes request ## Supported Networks | Network | CAIP-2 Chain ID | USDC Contract | | - | - | - | | Base Mainnet | `eip155:8453` | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | | Base Sepolia (testnet) | `eip155:84532` | `0x036CbD53842c5426634e7929541eC2318f3dCF7e` | | Solana Mainnet | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` | | Solana Devnet (testnet) | `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1` | `4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU` | The production API (`api.limitguard.ai`) quotes Base Mainnet and Solana Mainnet only: its `/.well-known/x402.json` says `testnet_supported: false`. The two testnets work only against a test environment that lists them in its `accepts` array. ## Step 1: Discover Payment Requirements ```bash theme={null} # Request without payment curl -X POST https://api.limitguard.ai/v1/entity/check \ -H "Content-Type: application/json" \ -d '{"entity_name": "Acme Corp BV", "country": "NL"}' ``` Response (HTTP 402): ```json theme={null} { "x402Version": 2, "error": "Payment Required", "errorCode": "payment_required", "resource": { "url": "https://api.limitguard.ai/v1/entity/check", "description": "Full entity trust check across multiple verification layers...", "mimeType": "application/json", "serviceName": "Limitguard", "tags": ["kyb", "sanctions", "lead-verification", "wallet-screening", "compliance"], "iconUrl": "https://limitguard.ai/icon-512.png" }, "accepts": [ { "scheme": "exact", "network": "eip155:8453", "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "amount": "290000", "maxAmountRequired": "290000", "resource": "https://api.limitguard.ai/v1/entity/check", "description": "Full entity trust check across multiple verification layers...", "mimeType": "application/json", "payTo": "0xFacilitatorAddress", "maxTimeoutSeconds": 600, "extra": {"name": "USD Coin", "version": "2", "decimals": 6} }, { "scheme": "exact", "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "amount": "290000", "maxAmountRequired": "290000", "resource": "https://api.limitguard.ai/v1/entity/check", "description": "Full entity trust check across multiple verification layers...", "mimeType": "application/json", "payTo": "SolanaFacilitatorAddress", "maxTimeoutSeconds": 600, "extra": {"name": "USDC", "version": "2", "decimals": 6} } ], "extensions": {"bazaar": {"info": {"...": "endpoint input/output"}, "schema": {"...": "JSON Schema"}}} } ``` Each `accepts` entry is a standard x402 `PaymentRequirements` object, so the official v2 clients (npm `@x402/fetch` 2.x, PyPI `x402`) can consume it directly. The unscoped npm `x402-fetch` 1.x cannot: it validates `network` against v1 names (`base`, `base-sepolia`) and rejects the CAIP-2 `eip155:8453` entry before signing. Notes on individual fields: | Field | Meaning | | - | - | | `network` | CAIP-2 chain ID: the field official clients read (there is no `chainId` here) | | `asset` | USDC contract address on that chain | | `amount` / `maxAmountRequired` | Price in 6-decimal USDC units; both carry the same value | | `payTo` | Address to pay; chain-specific, so read it from the response rather than hardcoding it | | `extra.name` / `extra.version` | EIP-712 domain values to sign with on EVM chains (informational on Solana) | | `extra.decimals` | USDC decimals (6) | | `resource.serviceName` / `tags` / `iconUrl` | The service name ("Limitguard"), search tags and icon that x402 directories such as the Coinbase Bazaar show for this endpoint | Every 402 also carries additive recovery hints under `extensions.bazaar.info`, so an agent without a wallet can still get started (full reference: [Errors](/guides/errors)): | Field | Value | | - | - | | `extensions.bazaar.info.recovery.url` | `https://api.limitguard.ai/v1/quickstart` (+ a `curl` one-liner) | | `extensions.bazaar.info.documentation_url` | `https://docs.limitguard.ai/x402-protocol?utm_source=api&utm_medium=agent&utm_campaign=docs&utm_content=x402_protocol` | | `extensions.bazaar.info.sandbox.curl` | `POST /v1/keys/create {"email": "...", "tier": "sandbox"}` → free `lg_sandbox_` key, no wallet | | `extensions.bazaar.info.prepaidBalance` | Only on `errorCode: insufficient_balance` (API-key holder whose prepaid balance is below the price): `balance_usd`, `price_usd`, `topup.url` (`POST /v1/keys/topup/{usd}`), and a note that paying this call by x402 also works | The `PAYMENT-REQUIRED` response header carries the same quote, base64-encoded. It may carry only `x402Version`, `error`, `resource` and `accepts`, so read `errorCode`, `extensions` and the help text from the body. ## Step 2: Build EVM Payment (Base/EIP-3009) ```python theme={null} import base64, json, secrets, time from eth_account import Account from eth_account.messages import encode_typed_data def build_x402_payment( chain_id: str, # e.g. "eip155:8453" amount: int, # in USDC 6-decimal units sender_key: str, # private key (hex) recipient: str, # facilitator address usdc_address: str, # USDC contract address ) -> str: sender = Account.from_key(sender_key).address chain_num = int(chain_id.split(":")[1]) # 8453 nonce = "0x" + secrets.token_hex(32) now = int(time.time()) # EIP-712 domain domain = { "name": "USD Coin", # "USDC" on Base Sepolia: use the 402's accepts[].extra.name "version": "2", "chainId": chain_num, "verifyingContract": usdc_address, } # EIP-3009 TransferWithAuthorization message = { "from": sender, "to": recipient, "value": amount, "validAfter": now - 10, "validBefore": now + 300, "nonce": bytes.fromhex(nonce[2:]), } types = { "EIP712Domain": [ {"name": "name", "type": "string"}, {"name": "version", "type": "string"}, {"name": "chainId", "type": "uint256"}, {"name": "verifyingContract", "type": "address"}, ], "TransferWithAuthorization": [ {"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "validAfter", "type": "uint256"}, {"name": "validBefore", "type": "uint256"}, {"name": "nonce", "type": "bytes32"}, ], } signable = encode_typed_data(full_message={ "types": types, "primaryType": "TransferWithAuthorization", "domain": domain, "message": message, }) signed = Account.sign_message(signable, private_key=sender_key) # The x402 V2 payload (exact scheme), the shape the official clients send payload = { "x402Version": 2, "scheme": "exact", "network": chain_id, "payload": { "signature": "0x" + bytes(signed.signature).hex(), "authorization": { "from": sender, "to": recipient, "value": str(amount), "validAfter": str(message["validAfter"]), "validBefore": str(message["validBefore"]), "nonce": nonce, }, }, } return base64.b64encode(json.dumps(payload).encode()).decode() ``` The legacy flat payload (`chainId`, `amount`, `sender`, `recipient`, `nonce`, `signature`, `validAfter`, `validBefore` at the top level) is still accepted, but new integrations should send the V2 shape above. ## Step 3: Make Paid Request ```python theme={null} payment = build_x402_payment( chain_id="eip155:8453", amount=290_000, # $0.29, the x402 agent price of /v1/entity/check (fresh) sender_key="0xYOUR_PRIVATE_KEY", recipient="0xFacilitatorFromThe402Response", usdc_address="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", ) import httpx response = httpx.post( "https://api.limitguard.ai/v1/entity/check", headers={"PAYMENT-SIGNATURE": payment, "Content-Type": "application/json"}, json={"entity_name": "Acme Corp BV", "country": "NL"}, ) ``` ## Response Headers | Header | Value | Meaning | | - | - | - | | `X-Payment-Verified` | `true` | Payment accepted | | `X-Payment-Amount` | `290000` | Amount verified (6-decimal USDC) | | `X-Payment-Fallback` | `true` | Circuit breaker triggered (rare) | | `PAYMENT-RESPONSE` | base64 JSON | `transaction` is the tx hash for settled transfers (see below), `payer` is the verified sender | ## Replay Prevention Each nonce can only be used once (Redis, 10-minute TTL, tied to the quote's `maxTimeoutSeconds`). Reusing a nonce returns HTTP 402 with "Nonce already used (replay detected)". Settled-transfer tx hashes (see below) use a longer 24-hour replay window instead. ## Settled Transfer Fallback (EVM) If your agent settles by sending USDC directly to the `payTo` address from the 402 response, retry the request with the transaction hash instead of a signature. The retry must also carry the `X-Payment-Challenge` token from the **same 402 response you were quoted with** (also in the settled-transfer `accepts` entry as `extra.challengeId`): ```bash theme={null} # 1. Request the resource with no payment header: the 402 quotes the price and # mints a challenge token for this resource, delivered only to you. curl -si -X POST https://api.limitguard.ai/v1/entity/check \ -H "Content-Type: application/json" \ -d '{"entity_name": "Acme Corp BV", "country": "NL"}' | grep -i x-payment-challenge # 2. Send the USDC to payTo, wait for it to confirm. # 3. Redeem with the tx hash AND the challenge. curl -X POST https://api.limitguard.ai/v1/entity/check \ -H "X-PAYMENT: 0x<64-hex tx hash>" \ -H "X-Payment-Challenge: " \ -H "Content-Type: application/json" \ -d '{"entity_name": "Acme Corp BV", "country": "NL"}' ``` JSON form (base64 in `X-PAYMENT` or `PAYMENT-SIGNATURE`): `{"chainId": "eip155:8453", "txHash": "0x…"}`. Every 402 advertises this path as the `accepts` entry with `scheme: "settled-transfer"`, whose `extra` carries the header name and these rules. The official x402 clients skip it (they only select schemes they have registered), so it costs them nothing. Limitguard verifies on-chain that the transaction succeeded, emitted a USDC `Transfer` of at least the endpoint price to `payTo`, and was mined within the last \~150 blocks (\~5 minutes). Each hash is accepted once (24-hour replay window). If our RPC node cannot see the transaction yet (not found, or its view of the chain head is still behind the transaction's block, which a load-balanced RPC often is right after mining), the server re-reads for a few seconds before answering. If it still cannot see it, you get 402 `settlement_not_yet_visible` with a `Retry-After` header. The hash has not been consumed and stays valid for the rest of the 150-block window, so send the same request again (same hash, same `X-Payment-Challenge`). The paying wallet must send the transaction itself. Limitguard accepts the hash only when the transaction's sender (the receipt's `from`) is the same address as the `from` of the USDC `Transfer`. So the account that sends the transaction must be the account the USDC comes from. A transfer that any other account sends for you is refused, for example: * A `transferWithAuthorization` (EIP-3009) settlement that Limitguard, the CDP facilitator or any other facilitator sent for you. Its hash is public, so it is not your proof. * A transfer from a contract account, such as an ERC-4337 smart account or a Safe, because a bundler, relayer or owner key sends it. * A transfer that a gas sponsor or meta-transaction relayer sends for your wallet. * A receipt that does not show who sent the transaction. Solana uses `txSignature` (see [Official x402 Client Payloads](#official-x402-client-payloads) below). For Solana `txSignature` proofs the rule is the same: the paying wallet must pay the fee. Limitguard accepts a confirmed transaction only when its fee payer, the first signer, is the authority of the USDC `TransferChecked`. A transaction that Limitguard or any other facilitator co-signed and paid the fee for is refused. So is a transaction whose fee payer cannot be read. When a proof fails verification its replay claim is released so you can retry once the transaction confirms. That release is retried a bounded number of times (3 attempts); if it still fails, the claim is marked *stuck* rather than left indistinguishable from a real duplicate, and your next attempt with the same proof gets 402 `settlement_claim_stuck` (no automatic retry: the same response repeats for up to 24h) instead of a misleading `duplicate_settlement`. REST and MCP share this code path, so both transports give the same retry budget and the same message. Send the amount for a single call. A transfer is redeemed exactly once, so batching several calls' USDC into one gas-efficient transfer buys one call and forfeits the surplus: the excess is credited to the ledger and reported in `X-Payment-Amount`, but it is not refunded and cannot be spent on a later request. ### Why the challenge token A settled-transfer proof is just a public tx hash, with no signature binding it to whoever presents it. Before the challenge existed, a third party watching the `payTo` address on-chain could submit your hash before you did and be served your result. The challenge token is delivered only in the HTTP 402 you received, never on-chain, so a proof is now redeemable only together with the token minted for that resource, and the token is checked before the replay guard and before any on-chain lookup: a submission without it is refused with `402 settlement_challenge_required`, takes no claim on the hash, and leaves the hash redeemable by you. Rules: * The token is bound to the resource path it was quoted for. A token for `/v1/risk/score` does not redeem a transfer for `/v1/entity/check`. * It expires with the quote (the same \~5-minute window a transfer must confirm within). If it has expired, request a fresh quote (a bare request → 402) and retry with the new token: your hash is still unclaimed and still yours. * It is single-use: once a proof has verified with it, it is spent. * The same header applies to a Solana `txSignature` for an already-confirmed transaction. * There is no grace period after which an unrelated submission is served anyway. What the token alone does **not** do: it is not proof of wallet ownership. It binds a redemption to a *resource* and a *deadline*, not to a *wallet*, so a party who requested their own 402 for the same resource ahead of time holds a valid token and can still race you with your hash. The optional signature below closes exactly that gap. Until you send it, submit your hash promptly after it confirms. The EIP-3009 (`PAYMENT-SIGNATURE`) path and the Solana partially-signed-transaction path are delivered to us privately, are not exposed to this race at all, and need neither the token nor the signature. ### Proving you own the sending wallet Send the sending wallet's signature over the challenge and a copied hash becomes worthless to anyone else: ``` X-Payment-Challenge-Signature: ``` **The field is optional today.** Omitting it behaves exactly as before: your proof is accepted and the redemption is counted as unsigned. It is planned to become **required** once unsigned redemptions fall to zero, so adopt it before then. The signed message is exactly five UTF-8 lines joined by a newline, with **no trailing newline**: ``` limitguard-x402-challenge-v1 /v1/entity/check eip155:8453 0x1111111111111111111111111111111111111111111111111111111111111111 abcDEF123_-abcDEF123_-abcDEF12 ``` | Line | Content | | - | - | | 1 | The literal protocol tag `limitguard-x402-challenge-v1`. A layout change bumps the version, so an old signature can never verify against a new message. | | 2 | The resource the challenge was minted for. On REST this is the URL path, e.g. `/v1/entity/check`. On MCP it is the **tool name**, e.g. `check_entity`. On `/x402/verify` it is the `resourcePath` you send. | | 3 | The CAIP-2 chain id, e.g. `eip155:8453`: the `network` of the settled-transfer entry you are paying against. | | 4 | The proof: an EVM `txHash` **lowercased and `0x`-prefixed**, or a Solana `txSignature` exactly as you send it. | | 5 | The challenge id, i.e. the `X-Payment-Challenge` value you are sending with it. | Signature schemes: * **EVM (Base)**: EIP-191 `personal_sign` over that message, the ordinary `personal_sign` / `eth_sign` any wallet exposes. Send it as hex, with or without the `0x` prefix. The server recovers the address and compares it to the `from` of the USDC Transfer log in your transaction's receipt. * **Solana**: a raw ed25519 signature over the UTF-8 bytes of that message, base58 encoded. The server verifies it against the transfer *authority* read from the confirmed transaction. The comparison is always against the sender read **from chain**. There is no field in which you can assert who you are, so a signature only ever helps the wallet that really sent the USDC. If the header is present and does not verify, the request is refused with `402` `settlement_signature_invalid`, and, importantly, **your proof is not consumed**: the deduplication claim is released, so the genuine payer can still redeem the same hash. A wrong signature therefore cannot be used to burn someone else's transfer. All three redemption paths enforce this identically: the protected REST endpoints, the MCP tool calls, and `POST /x402/verify`. ### Verifying a settled-transfer proof via `/x402/verify` The same tx hash and challenge token can be redeemed against `POST /x402/verify` directly, without retrying the protected endpoint, which is useful for pre-validating a proof before spending it. Because `/x402/verify` has no request URL of its own to infer the resource from, you must say which resource the proof was quoted for, via the v2 envelope's `resource.url` **object** or a plain `resourcePath` **string**. `/x402/verify` and `/x402/settle` need an API key in `X-API-Key`. Without one they answer 401. ```bash theme={null} curl -X POST https://api.limitguard.ai/x402/verify \ -H "Content-Type: application/json" \ -H "X-API-Key: " \ -H "X-Payment-Challenge: " \ -d '{ "txHash": "0x<64-hex tx hash>", "chainId": "eip155:8453", "resourcePath": "/v1/entity/check" }' ``` Omitting the resource, or naming the wrong one, fails closed with `settlement_challenge_required` even for an otherwise-valid proof and token; see [Why the challenge token](#why-the-challenge-token). `resource` must be an object with a `url` field (this endpoint's own convention, not the x402 spec's `accepts[].resource`, which is a plain string); a bare string there is not recognized and falls back to requiring `resourcePath` instead. `/x402/verify` never consumes the challenge token; only redeeming the proof against the protected endpoint does, so calling `/verify` first does not burn your one-time token. The same rules apply to a Solana `txSignature` settled-transfer proof. ## Quality Tiers with x402 Control cost via `X-Response-Quality` header: ```python theme={null} response = httpx.post( "https://api.limitguard.ai/v1/entity/check", headers={ "PAYMENT-SIGNATURE": payment_110000, # $0.11 for cached "X-Response-Quality": "cached", "Content-Type": "application/json", }, json={"entity_name": "Acme Corp BV", "country": "NL"}, ) ``` The amount in the payment must match or exceed the price for the selected tier. An x402 payment pays the agent price. An API key is debited the account price instead (1,050,000, \$1.05, on `fresh`), see [Pricing](/pricing): | Tier | /v1/entity/check amount (x402 agent price) | | - | - | | `cached` | 110,000 (\$0.11) | | `fresh` | 290,000 (\$0.29) | `enhanced` was retired on `/v1/entity/check` 2026-09-24: it took the identical fan-out as `fresh`, so `X-Response-Quality: enhanced` is now quoted, charged and served at the `fresh` amount above (290,000 by x402), not the old 1,500,000 - the 402 body's `info.note` says so. The same retirement applies to `/v1/risk/score`, `/v1/reputation/score` and `/v1/kyb/check`. Not every tiered endpoint sells every tier. `POST /v1/entity/deep-check` sells `fresh` (\$0.88, 880,000: PEP/RCA + Dutch insolvency register) and `enhanced` (\$1.71, 1,710,000, adds adverse media) always (it is unaffected by the `enhanced` retirement above, since its `enhanced` tier genuinely reaches a source `fresh` does not), plus a third, separately opt-in `credit` tier (\$2.45, 2,450,000, adds an Italian credit report) only when enabled; `X-Response-Quality: credit` is otherwise quoted, charged and served as `fresh`, and even when enabled a non-Italian request on the `credit` tier is requoted down to the `fresh` amount before payment is ever required. It has no cache-only branch, so `X-Response-Quality: cached` is quoted, charged and served as `fresh`. `cached` is served only from cache. If nothing is cached for the entity, the response is `404` with `errorCode: "not_cached"` and a `retry` block naming `X-Response-Quality: fresh` and its price; no data source is called (see [Errors](/guides/errors)) and the request is not charged. The unpaid 402 quote for a `cached` request probes the cache first: on a confirmed miss it is priced at the `fresh` tier and carries `extensions.bazaar.info.cachedTierAvailable: false`, so a caller is not sold the cheap tier for a call that would deliver nothing. When a quote carries that flag, retry with `X-Response-Quality: fresh` or drop the header; the `amount` in the quote is already the fresh price, so paying it as-is also works. If the probe cannot run (cache unconfigured or unreachable) the cached price is quoted as before; a miss on the paid call is still not charged, because settlement is gated on the route's 2xx response. The probe's answer is subject to the per-entity limit: an anonymous caller gets at most 5 quotes per entity per hour on these four endpoints (the same counter that meters the checks themselves, see [Rate limits](/guides/rate-limits)), then `429`, so cache state cannot be used to enumerate which entities have been checked. Fresh calls fill the cache, so "cached when available" means: after a fresh check of the same request (entity, country and the same identifiers; a different KVK number is a different cache entry). A fresh call itself never reads a cache: it always runs the live check. The refill TTL differs by endpoint: 1 hour for `/v1/entity/check` and `/v1/kyb/check` (the trust-response cache), 7 days by default for `/v1/risk/score` and `/v1/reputation/score` (the sanctions cache). Every endpoint warms the cache its own `cached` tier reads, so `fresh` then `cached` on one endpoint works on its own; a fresh `/v1/entity/check` or `/v1/kyb/check` additionally warms the sanctions cache that `/v1/risk/score` and `/v1/reputation/score` read, but not the reverse. Both cache keys are case-insensitive and ignore surrounding whitespace, so a fresh check of `"Acme BV "` is hit by a later `cached` call for `"ACME BV"`. ## Official x402 Client Payloads The official x402 clients (`@x402/fetch` 2.x on npm, `x402` on PyPI) send a payload in the same shape as the one built in Step 2 on EVM. Both of their shapes are accepted as-is, with no adapter needed. The server also accepts the v1 shape the unscoped npm `x402-fetch` 1.x sends, but that package cannot pay a Limitguard 402 today: it rejects the CAIP-2 `network` before signing. `@x402/fetch` refuses any single payment over $1 by default. That default covers every x402 agent price: the entity check and KYB (\$0.29), the risk score (\$0.25), the report (\$0.55), Lead Verify (\$0.10) and the wallet and sanctions screens (\$0.005). Pass `spendControls: { maxAmountPerPayment: "$3" }` to its config only to pay deep-check `enhanced` (\$1.71) or `credit` (\$2.45), or a `/v1/keys/upgrade/*` or `/v1/keys/topup/*` purchase. ```jsonc theme={null} // EVM (exact scheme, EIP-3009) { "x402Version": 2, "scheme": "exact", "network": "eip155:8453", "payload": { "signature": "0x...", "authorization": { "from": "0x...", "to": "0x...", "value": "290000", "validAfter": "...", "validBefore": "...", "nonce": "0x..." } } } // Solana (exact scheme, SVM) { "x402Version": 2, "scheme": "exact", "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "payload": { "transaction": "" } } ``` The Solana payload carries no amount and no payer: both are read out of the serialized transaction, then re-verified against the mint, destination ATA and fee payer before the payment is accepted, along with the transfer authority's ed25519 signature over the transaction message; an unsigned or tampered transaction is rejected up front. You may optionally include `amount` and `sender` in `payload`; if present they are used for the price check, and the transaction is still verified. A partially signed transaction is the default the Python SDK's `SolanaWallet` sends. It compiles the transfer with the address advertised as `accepts[].extra.feePayer` at account index 0 and leaves that signature slot empty, signing only as the transfer authority; the server co-signs as fee payer and broadcasts. A paying wallet therefore needs USDC and no SOL. Because no money has moved when the payload is presented, it is not a client-broadcast proof and is **not** gated on the `X-Payment-Challenge` token that a `txSignature` or `txHash` proof must be redeemed with. To pay the network fee yourself and send a `txSignature` instead, construct the wallet with `broadcast=True`. These payloads work against `PAYMENT-SIGNATURE` (or `X-PAYMENT`) on any paid endpoint and against `POST /x402/verify` and `POST /x402/settle`. The two `/x402/` routes need an API key. `/x402/settle` also refuses an amount below the cheapest x402 price, and a Solana transaction that asks for more than 200,000 compute units or more than two signatures. ## V1 Backward Compatibility The older `X-PAYMENT` header (V1 format with `maxAmountRequired`, `from`, `to` fields) is still accepted for backward compatibility. `PAYMENT-SIGNATURE` is the V2 spec header and is recommended for new integrations; it takes priority when both are sent. ## Circuit Breaker Fallback If the payment facilitator is unavailable (circuit breaker open), Limitguard falls back to a verified wallet cache. Wallets that have previously completed verified payments are cached. The response includes `X-Payment-Fallback: true` when this path is used. Routes settled through the Coinbase CDP facilitator (an operator setting) are the exception: a CDP outage fails closed with `402 server_error` instead of falling back to the wallet cache, so a false "verified" never gets served on the same authorization the CDP outage might still land later. ## Paying inside A2A (a2a-x402) Agents that talk to Limitguard over A2A (`POST https://api.limitguard.ai/a2a`; Agent Card at `https://api.limitguard.ai/.well-known/agent-card.json`) can pay a priced skill inside the conversation, with no API key, through the a2a-x402 extension v0.2: 1. Send `message/send` with the header `X-A2A-Extensions: https://github.com/google-agentic-commerce/a2a-x402/blob/main/spec/v0.2`. 2. The reply is a Task in state `input-required`. Its `status.message.metadata["x402.payment.required"]` holds the same x402 requirements a REST `402` would (USDC on Base and Solana). 3. Sign one of them and send `message/send` again with the task's `taskId` and the metadata `x402.payment.status: "payment-submitted"` and `x402.payment.payload` (the signed payment). 4. The completed Task carries the result and `x402.payment.receipts`. The payment is checked against the quote stored for that task, and it is settled only when the skill succeeded. A task can be paid once. Send `x402.payment.status: "payment-rejected"` instead to cancel the task; nothing is charged. Without the header, a priced skill answers the JSON-RPC error `-32020` with its price. The free skill `wallet_sanctions` needs no payment. A small Python client is published as `examples/a2a_x402_pay.py` in the limitguard-mcp repository. ## Discovery AI agents can discover Limitguard's x402 payment requirements automatically: ```bash theme={null} curl https://api.limitguard.ai/.well-known/x402.json ``` Returns a Bazaar-compatible service listing with all endpoints, pricing, and accepted payment methods.