78trust / 100
Token Count
by api.strale.io in AI models & inference
x402 APIPassing, checked 1 h ago
Estimate token count and cost for text across LLM models (GPT-4o, Claude, Gemini, Mistral, Llama). Algorithmic — no API calls.
GET https://api.strale.io/x402/token-count
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 130 ms typical, 363 ms slowest 5%
- Last check
- 1 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.strale.io/x402/token-count"import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.strale.io%2Fx402%2Ftoken-count
const res = await pay("https://api.strale.io/x402/token-count");
console.log(await res.json());Example input
{
"model": {
"description": "gpt-4o, claude-3-haiku, etc.",
"type": "string"
},
"text": {
"required": true,
"type": "string"
}
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 1 h ago | Passed | 402 | 278 ms | $0.022 |
| 5 h ago | Passed | 402 | 127 ms | $0.022 |
| 8 h ago | Passed | 402 | 130 ms | $0.022 |
| 12 h ago | Passed | 402 | 121 ms | $0.022 |
| 15 h ago | Passed | 402 | 281 ms | $0.022 |
| 19 h ago | Passed | 402 | 282 ms | $0.022 |
| 22 h ago | Passed | 402 | 268 ms | $0.022 |
| 26 h ago | Passed | 402 | 289 ms | $0.022 |
| 30 h ago | Passed | 402 | 363 ms | $0.022 |
| 33 h ago | Passed | 402 | 121 ms | $0.022 |
| 37 h ago | Passed | 402 | 127 ms | $0.022 |
| 41 h ago | Passed | 402 | 124 ms | $0.022 |
| 44 h ago | Passed | 402 | 628 ms | $0.022 |
| 2 days ago | Passed | 402 | 128 ms | $0.022 |