The BotSpeak Protocol
An open protocol for normalized AI model communication. Script-aware tokenization, cross-provider cost normalization, and intelligent routing — formalized into a spec.
Protocol stack
Four layers. Zero ambiguity. Every AI request normalized from transport to billing.
Transport
HTTP/2 + WebSocketDual-channel communication for streaming and batch requests. Automatic protocol negotiation.
Encoding
UTF-8 + Script-Aware TokenizationNative encoding for Devanagari, Arabic, and Cyrillic scripts. Token boundaries respect morphological units.
Normalization
Unified Cost SchemaCross-provider token cost normalization. Standardized billing units regardless of underlying model tokenizer.
Routing
Intelligent Model SelectionContext-aware routing based on language, latency requirements, cost constraints, and compliance rules.
Normalized cost schema
Every response includes a standardized cost object. Compare GPT-4o vs Claude vs Gemini token costs in the same unit — regardless of their native tokenizer.
The normalized_cost field always uses BotVibe Standard Token Units (BSTU), enabling true apples-to-apples cost comparison.
{
"model": "gpt-4o",
"provider": "openai",
"usage": {
"prompt_tokens": 1247,
"completion_tokens": 892,
"total_tokens": 2139
},
"normalized_cost": {
"bstu": 0.00427,
"currency": "USD",
"equivalent": 0.0213
},
"routing": {
"region": "ap-south-1",
"latency_ms": 142,
"failover_used": false
}
}