Tokens zählen
tokens_zaehlenCounts the exact number of tokens of a text for OpenAI tokenizers (o200k for GPT-4o/4.1/o-series, cl100k for GPT-4/3.5) and checks whether it fits a context limit. Useful to plan prompts and costs. For Claude, Gemini or Llama the count is an approximation. Token-Zähler. Preis $0.005 (x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "tokens_zaehlen"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text | |
| limit | No | Optional: Token-Limit zum Prüfen | |
| modell | No | Tokenizer: o200k (GPT-4o, o1, GPT-4.1) oder cl100k (GPT-4, GPT-3.5); für andere Modelle eine Näherung |