{
  "format": "delx/intent-card/v1",
  "id": "factorial-api",
  "intent": "Factorial for Agents for an agent workflow",
  "title": "Factorial for Agents API for agents",
  "description": "Factorial (n≤20). Call for combinatorics demos and small counting problems with an explicit n cap. Returns n! for n up to 20; larger n returns a structured error. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.",
  "keywords": [
    "Factorial for Agents API",
    "Factorial for Agents for agents",
    "pay per result API",
    "x402 API",
    "no API key"
  ],
  "updated_at": "2026-08-06",
  "canonical_url": "https://commerce.delx.ai/intents/factorial-api",
  "machine_url": "https://commerce.delx.ai/intents/factorial-api.json",
  "recommendation": {
    "tool_name": "util_factorial",
    "service_name": "Factorial for Agents",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/factorial",
    "price_usdc": "0.001",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "n": {
          "type": "integer",
          "description": "n",
          "minimum": 0,
          "maximum": 20
        }
      },
      "required": [
        "n"
      ]
    },
    "example_input": {
      "n": 12
    },
    "example_output": {
      "schema": "delx/factorial/v1",
      "n": 12,
      "value": 479001600
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/factorial -m POST -H 'x-delx-source: intent-card-factorial-api' --max-amount 0.001 -b '{\"n\":12}'",
      "max_amount_usdc": "0.001"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-factorial-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/factorial"
  }
}
