Hi @jonesuk,
Have a look here: https://meowapps.com/ai-engine/api/
The complex way is to use the filter mwai_ai_allowed, where you will handle this all by yourself. Through it, you can cover any case you like, but you’ll need to handle it entirely.
The easy way is to use the mwai_stats_credits, where you can return the number of credits based on what you like. However, this it’s simplified, the type of credits is the one in the settings (either for the visitor or logged user). But I think you know that, somehow 🙂
What I could do for you is to enhance the mwai_stats_credits filter. Instead of returning only the credits, it would also return the type. I will keep its current behavior if it’s only one value (in that case, it will be the credits), but if it’s an named-array with two values ([ ‘credits’ => x, ‘creditsType’: ‘queries/units/price’ ]), it will work too.
Would that help? 🙂
