Feature request: Query token counts via API

Hi @gg :wave:

Welcome to the community.

Here’s some tools that should help:

  1. node.js - gpt-3-encoder - npm
  2. python - Tokenizer