security

Count approximate tokens for a string or chat message list before sending to an LLM.

Cost: 1 credit(s). Free tier: 10 calls per IP (no auth).

post/v1/tokens/count

Request

  • Base URL: https://api.agent-toolbox.ai
  • URL: https://api.agent-toolbox.ai/v1/tokens/count
  • Auth: one of:
    • HTTP bearer
    • none

Request body

textstring
model'gpt-4' | 'gpt-3.5' | 'claude' | 'gemini' | 'generic'

Response

Success.

OR

Changes

No recorded changes to this operation across all 1 revision of this API.