{
  "x402Version": 2,
  "id": 41631,
  "slug": "41631",
  "resource": "https://x402.shizu.me/count",
  "description": "Exact token count for text using OpenAI tokenizers. Body: {text, encoding?} where encoding is cl100k_base or o200k_base (default). Returns tokens and char_count. Use to budget prompts and context windows.",
  "type": "http",
  "serviceName": "LLM Token Counter",
  "resourceType": "AI Inference",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x217e5Fe265EB78b29067bF8324ef03a7D8e167C4",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "2000",
      "amountUsd": 0.002,
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "example": {
      "char_count": 11,
      "encoding": "o200k_base",
      "tokens": 2
    },
    "type": "json"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "encoding": "o200k_base",
            "text": "hello world"
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "char_count": 11,
            "encoding": "o200k_base",
            "tokens": 2
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "properties": {
              "body": {
                "properties": {
                  "encoding": {},
                  "text": {}
                },
                "required": [
                  "text",
                  "encoding"
                ],
                "type": "object"
              },
              "method": {
                "const": "POST"
              }
            },
            "required": [
              "method"
            ],
            "type": "object"
          }
        }
      }
    }
  },
  "tags": [
    "tokens",
    "tokenizer",
    "tiktoken",
    "llm",
    "gpt",
    "bazaar"
  ],
  "sourceHost": "x402.shizu.me",
  "lastUpdated": "2026-10-09T02:35:10.063Z",
  "quality": {
    "calls30d": 2,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-09T02:35:09.422Z"
  },
  "metadata": {
    "serviceName": "LLM Token Counter",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "encoding": "o200k_base",
              "text": "hello world"
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "char_count": 11,
              "encoding": "o200k_base",
              "tokens": 2
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "properties": {
                "body": {
                  "properties": {
                    "encoding": {},
                    "text": {}
                  },
                  "required": [
                    "text",
                    "encoding"
                  ],
                  "type": "object"
                },
                "method": {
                  "const": "POST"
                }
              },
              "required": [
                "method"
              ],
              "type": "object"
            }
          }
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "x402.shizu.me",
    "manifest_name": "x402.shizu.me",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "char_count": 11,
    "encoding": "o200k_base",
    "tokens": 2
  }
}