{
  "format": "delx/intent-card/v1",
  "id": "token-amount-to-raw-api",
  "intent": "Token Amount to Raw Units for an agent workflow",
  "title": "Token Amount to Raw Units API for agents",
  "description": "Scale human token amounts by decimals into on-chain raw units. Call when building ERC-20 transfer/approve amounts from UI-facing quantities. Returns raw integer string, amount, and decimals used as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.",
  "keywords": [
    "Token Amount to Raw Units API",
    "Token Amount to Raw Units for agents",
    "pay per result API",
    "x402 API",
    "no API key"
  ],
  "updated_at": "2026-08-23",
  "canonical_url": "https://commerce.delx.ai/intents/token-amount-to-raw-api",
  "machine_url": "https://commerce.delx.ai/intents/token-amount-to-raw-api.json",
  "recommendation": {
    "tool_name": "util_token_amount_to_raw",
    "service_name": "Token Amount to Raw Units",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/token-amount-to-raw",
    "price_usdc": "0.001",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "amount": {
          "description": "Input field: amount.",
          "type": "number"
        },
        "decimals": {
          "description": "Input field: decimals.",
          "type": "integer"
        }
      },
      "required": [
        "amount",
        "decimals"
      ],
      "additionalProperties": true
    },
    "example_input": {
      "amount": 1.25,
      "decimals": 6
    },
    "example_output": {
      "schema": "delx/util-token-amount-to-raw/v1",
      "amount": 1.25,
      "decimals": 6,
      "raw": "1250000"
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/token-amount-to-raw -m POST -H 'x-delx-source: intent-card-token-amount-to-raw-api' --max-amount 0.001 -b '{\"amount\":1.25,\"decimals\":6}'",
      "max_amount_usdc": "0.001"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-token-amount-to-raw-api"
  },
  "evidence": {
    "paid_openapi": "https://api.delx.ai/openapi.x402.json",
    "governed_portfolio": "https://api.delx.ai/x402-portfolio.json",
    "live_contract": "https://api.delx.ai/api/v1/x402/token-amount-to-raw"
  }
}
