{
  "x402Version": 2,
  "id": 12662,
  "slug": "12662",
  "resource": "https://tokens.openverbs.com/v1/count",
  "description": "Count the LLM tokens in text for a given model or encoding — exact for OpenAI and open models (Llama, Mistral, Qwen, Gemma, DeepSeek, Command-R); labelled-approximate for Claude & Gemini.",
  "type": "http",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "4000",
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "encoding": "o200k_base",
            "model": "example",
            "text": "example"
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "encoding": {
                    "description": "Explicit OpenAI BPE encoding. Overrides \"model\" and is always exact. Defaults to o200k_base.",
                    "enum": [
                      "o200k_base",
                      "cl100k_base",
                      "p50k_base",
                      "r50k_base"
                    ],
                    "type": "string"
                  },
                  "model": {
                    "description": "LLM model name, e.g. \"gpt-4o\", \"llama-3.1-70b\", \"claude-3-5-sonnet\". Resolved to its tokenizer. Defaults to gpt-4o. Supported families: o200k_base, cl100k_base, p50k_base, r50k_base, llama3, llama2, mistral, qwen, gemma, deepseek, command-r, claude, gemini.",
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "text": {
                    "description": "The text to tokenize. Empty string counts as 0 tokens.",
                    "maxLength": 100000,
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "bazaar"
  ],
  "sourceHost": "tokens.openverbs.com",
  "lastUpdated": "2026-09-14T20:00:06.977Z",
  "quality": {
    "calls30d": 4,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-09-14T20:00:06.676Z"
  },
  "liveness": {},
  "verified": false,
  "featured": false,
  "provider": {
    "host": "tokens.openverbs.com",
    "manifest_name": "tokens.openverbs.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-09-18T22:00:31.484Z"
  }
}