{
  "x402Version": 2,
  "id": 8669,
  "slug": "8669",
  "resource": "https://workbot1.oddsys.org/tokens",
  "description": "Exact BPE token counts for OpenAI-family encodings (o200k_base for GPT-4o/4.1/5, cl100k_base for GPT-4/3.5/embeddings), single text or batches, with optional truncation to a token budget. Up to 512 KB per call.",
  "type": "http",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x15459498e1191d8787c83177809bd54022fA18c4",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "1000",
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "encoding": "o200k_base",
            "text": "The quick brown fox jumps over the lazy dog."
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "body": {
            "chars": "number",
            "encoding": "string",
            "models": "string — which model families use it",
            "results": "array (batch mode) — { tokens, chars, truncated? }; totalTokens",
            "tokens": "number",
            "truncated": "string (only when truncate given and exceeded)"
          },
          "bodyType": "json",
          "example": {
            "chars": 44,
            "encoding": "o200k_base",
            "models": "gpt-4o, gpt-4.1, gpt-5 family, o-series",
            "tokens": 10
          }
        }
      },
      "routeTemplate": "/tokens",
      "schema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "encoding": {
                    "description": "BPE encoding (default o200k_base).",
                    "enum": [
                      "o200k_base",
                      "cl100k_base"
                    ],
                    "type": "string"
                  },
                  "text": {
                    "description": "Text to count.",
                    "type": "string"
                  },
                  "texts": {
                    "description": "Batch of texts.",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 100,
                    "type": "array"
                  },
                  "truncate": {
                    "description": "Token budget — when exceeded the response includes the text cut to this many tokens.",
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          }
        }
      }
    }
  },
  "tags": [
    "bazaar"
  ],
  "sourceHost": "workbot1.oddsys.org",
  "lastUpdated": "2026-09-17T09:03:41.054Z",
  "quality": {
    "calls30d": 1,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-09-17T09:03:40.89Z"
  },
  "liveness": {},
  "verified": false,
  "featured": false,
  "provider": {
    "host": "workbot1.oddsys.org",
    "manifest_name": "workbot1.oddsys.org",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-09-18T22:00:31.484Z"
  }
}