{
  "format": "delx/intent-card/v1",
  "id": "token-estimate-api",
  "intent": "estimate the token count and cost of text",
  "title": "Estimate tokens before an agent call",
  "description": "Estimate token counts for a bounded text payload across common model families for $0.001, with no API key.",
  "keywords": [
    "token estimate API",
    "LLM token counter",
    "prompt cost estimate",
    "agent context window",
    "x402 utility"
  ],
  "updated_at": "2026-08-01",
  "canonical_url": "https://commerce.delx.ai/intents/token-estimate-api",
  "machine_url": "https://commerce.delx.ai/intents/token-estimate-api.json",
  "recommendation": {
    "tool_name": "util_token_estimate",
    "service_name": "Delx Token Estimate",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/token-estimate",
    "price_usdc": "0.001",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "description": "Text to estimate tokens for"
        },
        "model": {
          "type": "string",
          "description": "Optional model hint: gpt-4, claude-3, etc.",
          "default": "gpt-4"
        }
      },
      "required": [
        "text"
      ]
    },
    "example_input": {},
    "example_output": {},
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/token-estimate -m POST -H 'x-delx-source: intent-card-token-estimate-api' --max-amount 0.001 -b '{}'",
      "max_amount_usdc": "0.001"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-token-estimate-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-estimate"
  }
}
