← APIs / Crypto Sanity
Verified

Crypto Sanity

Apiosk Basicsby Apiosk Basics · General

Offline EVM address, payment amount and x402 payload sanity checks for agents before they sign or send crypto payments.

cryptoapi
Price per request
$0.02
About

Offline EVM address, payment amount and x402 payload sanity checks for agents before they sign or send crypto payments. Pure computation, no caller API key, no outbound provider dependency. The gateway meters access per request over x402.

Base URL
https://gateway.apiosk.com/crypto-sanity
Technical Specs
Auth Methodx402
Response FormatJSON
Endpoints3
Endpoints
MethodPathDescriptionCost
POST /check/amount Check token amount decimals, dust, unusually round/precise values and mismatch against a stated invoice amount.
$0.02 default
View details
POST /validate/address Validate an EVM address format, compute/verify EIP-55 checksum, and flag zero, burn and low-entropy address patterns.
$0.02 default
View details
POST /validate/payload Validate the structure of an x402 payment payload before an agent signs or submits it.
$0.02 default
View details
Endpoint documentation
POST/check/amount
$0.02 default
Description

Check token amount decimals, dust, unusually round/precise values and mismatch against a stated invoice amount.

Pricing
$0.02 default
Request schema
{
  "properties": {
    "amount": {
      "type": "string"
    },
    "invoice_amount": {
      "type": "string"
    },
    "token_decimals": {
      "default": 6,
      "type": "integer"
    }
  },
  "required": [
    "amount"
  ],
  "type": "object"
}
Response schema
{
  "properties": {
    "issues": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "valid": {
      "type": "boolean"
    },
    "warnings": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "type": "object"
}
Example request
{
  "amount": "25.00",
  "invoice_amount": "25.00",
  "token_decimals": 6
}
Example response
{
  "issues": [],
  "ok": true,
  "valid": true,
  "warnings": []
}
POST/validate/address
$0.02 default
Description

Validate an EVM address format, compute/verify EIP-55 checksum, and flag zero, burn and low-entropy address patterns.

Pricing
$0.02 default
Request schema
{
  "properties": {
    "address": {
      "type": "string"
    },
    "chain": {
      "type": "string"
    }
  },
  "required": [
    "address"
  ],
  "type": "object"
}
Response schema
{
  "properties": {
    "checksum_address": {
      "type": [
        "string",
        "null"
      ]
    },
    "checksum_valid": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "risk_flags": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "valid": {
      "type": "boolean"
    }
  },
  "type": "object"
}
Example request
{
  "address": "0x52908400098527886E0F7030069857D2E4169EE7"
}
Example response
{
  "checksum_valid": true,
  "ok": true,
  "risk_flags": [],
  "valid": true
}
POST/validate/payload
$0.02 default
Description

Validate the structure of an x402 payment payload before an agent signs or submits it.

Pricing
$0.02 default
Request schema
{
  "description": "x402 payment proof JSON, or {x_payment: base64Payload}.",
  "type": "object"
}
Response schema
{
  "properties": {
    "issues": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "structural_valid": {
      "type": "boolean"
    }
  },
  "type": "object"
}
Example request
{
  "network": "base",
  "payload": {
    "authorization": {
      "from": "0xA039E3dEb5ca71E41905f90491FC5d016CE23B79",
      "nonce": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "to": "0x000000000000000000000000000000000000dEaD",
      "validAfter": "0",
      "validBefore": "9999999999",
      "value": "20000"
    },
    "signature": "0x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  },
  "scheme": "exact",
  "x402Version": 1
}
Example response
{
  "issues": [],
  "ok": true,
  "structural_valid": true
}