Using Count Tokens with Portkey
Portkey supports Vertex AI’s CountTokens endpoint through the Anthropic-compatible format, allowing you to use the same API signature across Vertex AI, Bedrock, and Anthropic providers.Use Cases
- Estimate costs before sending inference requests
- Optimize prompts to fit within token limits
- Plan for token usage in your applications

