Cost Usage Calculation

Unfortunately, depending on the service, this information can not only be retrieved; AI Engine will then guess the tokens usage and price.

Services

Hosting ServiceStreamingTokens UsagePrice UsageNotes
OpenAI (+ Azure)No❤️ Returned by OpenAI❤️ Calculated by AI Engine
OpenAI (+ Azure)Yes❤️ Returned by OpenAI❤️ Calculated by AI Engine
OpenRouterNo❤️ Returned by OpenRouter❤️ Returned by OpenRouter
OpenRouterYes❤️ Returned by OpenRouter❤️ Returned by OpenRouterAn extra request is made to retrieve the tokens/price.
Anthropic (Claude)Any❤️ Returned by OpenRouter❤️ Calculated by AI Engine
GoogleAny⚠️ Guessed by AI Engine❌ Nonehttps://ai.google.dev/pricing

⚠️ Tokens: Guessed by AI Engine

This is done through the estimate_tokens function in the core. In fact, the implementation of each model could do it differently, but there is currently no way to know how each service actually calculate those tokens (since they depend on how the messages are actually formatted, how the images are counted, etc). This is highly inaccurate. If you depend on this, use something else.

Hosting Services And Streaming

The reason some services are compatible with streaming is because they can handle SSE (Server-Sent Events). Without this capability, streaming cannot be utilized.

Hosting ServiceStreaming
ALL-INKL
Cloudways⚠️ Need to ask them
Flywheel
Hostinger
IONOS✖️
Kinsta
Local by Flywheel✖️ (default) | ✅ (modified)
one.com✖️
OVH✖️
Siteground
Vultr
Webhotell✖️ (default) | ✅ (modified)
WP Engine✖️
WPX
DomeneShop⚠️ Only with PHP 8.1

If you have information about other services or if there are modifications needed here, please feel free to contact us to update this documentation.