Menu

API Reference

All 26 endpoints. Authentication, response format, rate limits, and every parameter documented.

Postman Collection OpenAPI Spec

See how all 26 endpoints connect → API Topology

Authentication

API Key

Most endpoints require an X-API-Key header. Keys use the format insr_live_ followed by 40 hex characters. Get a free key at /developers/#pricing. Public endpoints (no key needed): JWKS, compliance templates, code validation, merchant directory, token registry, and discount check.

Base URL

https://api.insumermodel.com

All endpoints are relative to this base URL.

Rate Limits

PlanVerification Credits / MoFree Reads / DayPrice
Free10100$0
Pro1,00010,000$29/mo
Enterprise5,000100,000$99/mo

Reads (GET requests) use the daily limit and are free. API credits are consumed by attest, trust, and batch trust endpoints. Merchant credits are consumed by commerce endpoints. See full pricing, per-call costs, and volume discounts →

Response Format

Success
{
  "ok": true,
  "data": { /* endpoint-specific */ },
  "meta": {
    "version": "1.0",
    "timestamp": "2026-02-27T12:00:00Z"
  }
}
Error
{
  "ok": false,
  "error": {
    "code": 401,
    "message": "Invalid or missing API key."
  },
  "meta": {
    "version": "1.0",
    "timestamp": "2026-02-27T12:00:00Z"
  }
}
503 — RPC Failure (retryable)
{
  "ok": false,
  "error": {
    "code": "rpc_failure",
    "message": "Unable to verify all conditions — data source unavailable after retries",
    "failedConditions": [
      { "chainId": 1, "contractAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "message": "fetch failed" }
    ]
  },
  "meta": { "version": "1.0", "timestamp": "..." }
}

Returned when an upstream data source is unavailable after retries. No attestation signed, no JWT, no credits charged. Retry after 2–5 seconds. Applies to: /v1/attest, /v1/trust, /v1/trust/batch, /v1/verify, /v1/acp/discount, /v1/ucp/discount.

Endpoint Index

MethodEndpointDescription
Verification
POST/v1/attestBoolean attestation across 33 chains
GET/v1/jwksJWKS public key for signature verification
GET/v1/compliance/templatesList available compliance templates
Trust
POST/v1/trustWallet trust profile (36 checks)
POST/v1/trust/batchBatch trust profiles (up to 10)
Commerce
POST/v1/acp/discountGenerate ACP-format discount
POST/v1/ucp/discountGenerate UCP-format discount
GET/v1/codes/{code}Validate discount code (public)
POST/v1/verifyVerify wallet and get discount
POST/v1/payment/confirmConfirm code redemption
GET/v1/discount/checkCheck discount eligibility
Merchants
GET/v1/merchantsList published merchants
GET/v1/merchants/{id}Get merchant details
GET/v1/tokensList supported tokens
Onboarding
POST/v1/merchantsCreate merchant programmatically
POST/v1/merchants/{id}/domain-verificationRequest domain verification token
PUT/v1/merchants/{id}/domain-verificationTrigger domain verification check
PUT/v1/merchants/{id}/tokensUpdate accepted tokens
PUT/v1/merchants/{id}/nftsUpdate accepted NFTs
PUT/v1/merchants/{id}/settingsUpdate merchant settings
POST/v1/merchants/{id}/creditsBuy merchant verification credits
POST/v1/merchants/{id}/directoryPublish to merchant directory
GET/v1/merchants/{id}/statusGet merchant setup status
Account
POST/v1/keys/buyBuy API key with USDC, USDT, or BTC (no auth)
GET/v1/creditsCheck credit balance
POST/v1/credits/buyBuy credits with USDC, USDT, or BTC

Verification

POST /v1/attest

Boolean attestation. Checks token balances, NFT ownership, EAS attestations, and Farcaster identity across 33 chains. Returns ECDSA P-256 signed result. Up to 10 conditions per request. Full docs →

ParameterTypeDescription
walletstring required*EVM wallet address (0x...). Required unless solanaWallet or xrplWallet is provided
solanaWalletstring optionalSolana wallet address (raw base58; .sol domain resolution not supported). Required if any condition uses chainId "solana"
xrplWalletstring optionalXRPL wallet address (r-address). Required if any condition uses chainId "xrpl"
bitcoinWalletstring optionalBitcoin address (P2PKH, P2SH, bech32, or Taproot). Required if any condition uses chainId "bitcoin"
conditionsarray requiredArray of condition objects (max 10). Each has: type, contractAddress, chainId, threshold, decimals. Types: token_balance, nft_ownership, eas_attestation, farcaster_id
proofstring optionalSet to "merkle" for EIP-1186 storage proofs. 2 credits instead of 1. 26 of 30 EVM chains
formatstring optionalSet to "jwt" to include a Wallet Auth by InsumerAPI token (ES256-signed JWT). Verifiable by any standard JWT library using JWKS. No additional cost
GET /v1/jwks

Returns the JWKS (JSON Web Key Set) containing the ECDSA P-256 public key used to sign attestation and trust responses. 24-hour cache. Also available as a static file at /.well-known/jwks.json.

No parameters. Returns { keys: [{ kty, crv, x, y, kid, alg, use }] }

GET /v1/compliance/templates

Lists all available compliance templates with their condition configurations. Full docs →

No parameters. Returns object of templates keyed by name: coinbase_verified_account, coinbase_verified_country, coinbase_one (Base), gitcoin_passport_score, gitcoin_passport_active (Optimism).

Trust

POST /v1/trust

Generates an ECDSA-signed wallet trust profile with curated checks across up to 7 dimensions: stablecoins — USDC and USDT (26), governance (4), NFTs (3), staking (3), plus optional Solana, XRPL, and Bitcoin. 3 credits per call. Full docs →

ParameterTypeDescription
walletstring requiredEVM wallet address (0x...)
solanaWalletstring optionalSolana wallet address. Adds USDC on Solana check
xrplWalletstring optionalXRPL wallet address (r-address). Adds RLUSD + USDC on XRP Ledger checks
bitcoinWalletstring optionalBitcoin address. Adds Bitcoin Holdings dimension (native BTC balance check)
proofstring optionalSet to "merkle" for storage proofs. 6 credits instead of 3
POST /v1/trust/batch

Batch trust profiles for up to 10 wallets in a single request. Shared block fetches make it 5-8x faster than individual calls. 3 credits per wallet. Partial success supported.

ParameterTypeDescription
walletsarray requiredArray of objects (max 10). Each has: wallet (required), solanaWallet (optional), xrplWallet (optional)
proofstring optionalSet to "merkle" for storage proofs. 6 credits per wallet

Commerce

POST /v1/acp/discount

Verify wallet holdings and generate a discount code in OpenAI/Stripe ACP format. Full docs →

ParameterTypeDescription
merchantIdstring requiredMerchant ID from the registry
walletstring required*EVM wallet address (0x...)
solanaWalletstring optionalSolana wallet address
xrplWalletstring optionalXRPL wallet address (r-address)
itemsarray optionalCart items for context
POST /v1/ucp/discount

Verify wallet holdings and generate a discount code in Google UCP format.

ParameterTypeDescription
merchantIdstring requiredMerchant ID from the registry
walletstring required*EVM wallet address (0x...)
solanaWalletstring optionalSolana wallet address
xrplWalletstring optionalXRPL wallet address (r-address)
itemsarray optionalCart items for context
GET /v1/codes/{code}

Validate a discount code. Public endpoint, no API key required. Returns code status, merchant, discount percentage, and expiry.

ParameterTypeDescription
codestring requiredPath parameter. The discount code to validate

Invalid codes return reason: "not_found" | "expired" | "already_used"

POST /v1/verify

Verify wallet token/NFT holdings against a merchant's configured requirements and return a discount code if eligible.

ParameterTypeDescription
merchantIdstring requiredMerchant ID from the registry
walletstring required*EVM wallet address (0x...)
solanaWalletstring optionalSolana wallet address
xrplWalletstring optionalXRPL wallet address (r-address)
POST /v1/payment/confirm

Verify an on-chain USDC payment and mark a discount code as used. Confirms the transaction on-chain before accepting.

ParameterTypeDescription
codestring requiredThe discount code to confirm (INSR-XXXXX)
txHashstring requiredOn-chain USDC transaction hash
chainIdnumber|"solana" requiredChain ID of the payment (e.g. 1, 8453, "solana")
amountnumber|string requiredUSDC amount paid
GET /v1/discount/check

Check if a wallet is eligible for a discount at a specific merchant without generating a code.

ParameterTypeDescription
merchantstring requiredQuery parameter. Merchant ID
walletstring optionalQuery parameter. EVM wallet address
solanaWalletstring optionalQuery parameter. Solana wallet address
xrplWalletstring optionalQuery parameter. XRPL wallet address (r-address)

Merchants

GET /v1/merchants

List all published merchants in the directory. Returns merchant name, ID, location, accepted tokens, and discount tiers.

ParameterTypeDescription
tokenstring queryFilter by token symbol
verifiedstring queryFilter by domain verification status ("true" or "false")
limitinteger queryResults per page (default 50, max 200)
offsetinteger queryPagination offset
GET /v1/merchants/{id}

Get full details for a specific merchant including accepted tokens, NFTs, discount configuration, and business info.

ParameterTypeDescription
idstring requiredPath parameter. Merchant document ID
GET /v1/tokens

List all tokens supported across the platform with contract addresses, chain IDs, decimals, and logos.

ParameterTypeDescription
chaininteger|string queryFilter by chain ID
symbolstring queryFilter by token symbol
typestring queryFilter by "token" or "nft"

Onboarding

POST /v1/merchants

Create a new merchant programmatically. Receives 100 free verification credits. Max 10 merchants per API key. Full docs →

ParameterTypeDescription
companyNamestring requiredDisplay name (max 100 chars)
companyIdstring requiredUnique ID. Alphanumeric, dash, underscore (2-50 chars)
locationstring optionalCity or region (max 200 chars)
POST /v1/merchants/{id}/domain-verification

Generate a verification token for proving domain ownership. Supports DNS TXT record, HTML meta tag, or verification file. Each POST regenerates the token.

ParameterTypeDescription
idstring requiredPath parameter. Merchant ID
domainstring requiredDomain to verify (e.g. example.com). No protocol prefix.
PUT /v1/merchants/{id}/domain-verification

Check all three verification methods (DNS TXT, meta tag, file) for the previously requested domain. Rate limited to 5 attempts per hour per merchant.

ParameterTypeDescription
idstring requiredPath parameter. Merchant ID
PUT /v1/merchants/{id}/tokens

Configure which tokens the merchant accepts and the minimum balance required for discounts.

ParameterTypeDescription
idstring requiredPath parameter. Merchant ID
ownTokenobject|null optionalMerchant's own token config (symbol, chainId, contractAddress, decimals, tiers)
partnerTokensarray optionalArray of partner token configs, same structure as ownToken
PUT /v1/merchants/{id}/nfts

Configure which NFT collections the merchant accepts for discounts.

ParameterTypeDescription
idstring requiredPath parameter. Merchant ID
nftCollectionsarray requiredArray of NFT objects with contractAddress, chainId, name, discount. Max 4.
PUT /v1/merchants/{id}/settings

Update discount stacking mode, cap, and USDC payment settings. All fields optional.

ParameterTypeDescription
idstring requiredPath parameter. Merchant ID
discountModestring optional"highest" (best single discount) or "stack" (sum all)
discountCapinteger optionalMaximum total discount percentage (1-100)
usdcPaymentobject|null optionalUSDC payment config (enabled, evmAddress, solanaAddress, preferredChainId) or null to disable
POST /v1/merchants/{id}/credits

Purchase merchant verification credits with USDC. Volume discounts from $0.04 to $0.02/credit. See wallet addresses and volume discounts →

ParameterTypeDescription
idstring requiredPath parameter. Merchant ID
txHashstring requiredUSDC transfer transaction hash
chainIdinteger|string requiredChain where USDC was sent
amountnumber requiredUSDC amount sent (min 5, human-readable units)
updateWalletboolean optionalSet to true to change the registered sender wallet. Default false

Sender verification: The first purchase registers the sender wallet to the API key. Subsequent purchases must come from the same sender. To change the registered wallet, include "updateWallet": true—the verified transfer proves ownership.

POST /v1/merchants/{id}/directory

Publish (or refresh) the merchant's listing in the public directory. No request body needed. Call again after updating tokens or settings.

ParameterTypeDescription
idstring requiredPath parameter. Merchant ID
GET /v1/merchants/{id}/status

Get the setup completion status for a merchant. Shows which steps are done: domain verified, tokens configured, published, etc.

ParameterTypeDescription
idstring requiredPath parameter. Merchant ID

Account

GET /v1/credits

Check your current credit balance, plan tier, and usage stats.

No parameters. Returns credits remaining, plan name, daily reads used/limit.

POST /v1/keys/buy No auth required

Buy a new API key with USDC, USDT, or BTC. Agent-friendly: no email or prior authentication needed. The sender wallet from the transaction becomes the key's identity. See wallet addresses and volume discounts →

ParameterTypeDescription
txHashstring requiredTransfer transaction hash
chainIdinteger|string requiredChain where payment was sent. Supported: ETH (1), Base (8453), Polygon (137), Arbitrum (42161), Optimism (10), BNB (56), Avalanche (43114), Solana ("solana"), Bitcoin ("bitcoin")
amountnumber required for stablecoinsUSDC/USDT amount sent (min 5). Not required for BTC (USD value derived from on-chain amount at market rate)
appNamestring requiredName for the API key (e.g. your agent or app name, max 100 chars)

How it works: Send USDC, USDT, or BTC to the platform wallet on any supported chain, then call this endpoint with the transaction hash. The on-chain transfer is verified (BTC requires 1 confirmation), a new API key is created, and credits are added at volume-discount rates. USDC and USDT are accepted at face value; BTC is converted to USD at the market rate. One key per wallet — use POST /v1/credits/buy to top up an existing key.

POST /v1/credits/buy

Purchase additional verification credits using USDC, USDT, or BTC on supported chains. See wallet addresses and volume discounts →

ParameterTypeDescription
txHashstring requiredTransfer transaction hash
chainIdinteger|string requiredChain where payment was sent. Supported: ETH (1), Base (8453), Polygon (137), Arbitrum (42161), Optimism (10), BNB (56), Avalanche (43114), Solana ("solana"), Bitcoin ("bitcoin")
amountnumber required for stablecoinsUSDC/USDT amount sent. Not required for BTC
updateWalletboolean optionalSet to true to change the registered sender wallet. Default false

Sender verification: The first purchase registers the sender wallet to the API key. Subsequent purchases must come from the same sender. To change the registered wallet, include "updateWallet": true—the verified transfer proves ownership.

← Onboarding Back to Developers Hub →