{
  "x402Version": 2,
  "id": 32275,
  "slug": "32275",
  "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",
  "serviceName": "Busker Token Counter",
  "resourceType": "AI Inference",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x15459498e1191d8787c83177809bd54022fA18c4",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "1000",
      "amountUsd": 0.001,
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "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
    }
  },
  "extensions": {
    "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": [
    "tokens",
    "tiktoken",
    "token-count",
    "context-window",
    "llm",
    "bazaar"
  ],
  "sourceHost": "workbot1.oddsys.org",
  "lastUpdated": "2026-10-08T21:47:50.684Z",
  "quality": {
    "calls30d": 3,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-08T21:47:50.499Z"
  },
  "metadata": {
    "serviceName": "Busker Token Counter",
    "extensions": {
      "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"
            }
          }
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "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-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "chars": 44,
    "encoding": "o200k_base",
    "models": "gpt-4o, gpt-4.1, gpt-5 family, o-series",
    "tokens": 10
  }
}