If you sell services to your customers with WHMCS, you can also sell them AI credit packs. The MozOut AI module gives each customer a credit balance, and the customer asks questions to the AI models on the service page, in your WHMCS. The module is open source and it is on MozOut Git, listed on the SDKs and integrations page of the docs.
How the balance works
At MozOut there is a single AI credit balance per account: yours. The module keeps, for each WHMCS service, how many credits the customer has and how many were used. Each answer costs what the API rules say (tokens times the model price, rounded up to 0.01, with a minimum of 0.01), and the real cost comes out of your balance at MozOut.
|
Keep your AI balance at MozOut above what your customers can spend. If your balance runs out, answers stop for everyone.
|
Installing
| 1 |
Copy the module folder, found in modules/servers in the package, into the same folder of your WHMCS.
|
|
| 2 |
In Setup > Servers, add a server with the MozOut All in One AI (API) module. In the hostname, type api.mozout.com; in the password, the API key. The username is optional: sandbox or production.
|
|
| 3 |
In the product, on the Module tab, fill in the options in the table below.
|
|
| 4 |
Give the key the ai:read and ai:write permissions. Add billing:purchase only if the module should also buy the credits at MozOut.
|
|
The product options
| Option |
What it does |
| Credits per period |
The credits the customer gets when the service is created and on each renewal. |
| Buy the credits at the brand |
Buys the same quantity with your account credit, at least 1,000 credits at a time. |
| On renewal |
"Add to the balance" or "Reset the balance". |
| Allowed models |
Ids from GET /v1/models, separated by commas. Empty means all text models. |
| Max tokens per answer |
Caps the length of each answer, and what it can cost. |
| Message language |
"Automatic" follows the language of the admin or of the customer; you can also fix English or Portuguese. |
What the customer sees, and what you see
On the service page, the customer sees the balance, the credits used and the number of requests. They pick the model, write the question, up to 8,000 characters, and get the answer with its cost. They also see the latest requests. If the balance is not enough, the module says how many credits the question needs.
In the admin area, you see each customer's balance, can add or remove credits and see your account's AI balance at MozOut. Questions and answers are never stored or logged: only the model, the tokens and the cost are kept.
|
With a sandbox_ key, the chat answers "Resposta de teste (sandbox)." and costs 0: set up the product that way and switch to the prod_ key at the end. A Coding Plan is one per account, so it cannot be resold per customer with this module.
|
|
Want to sell AI to your customers under your own brand? See All in One AI.
See All in One AI
|
RECOMMENDED PRODUCT Reseller hosting with WHM Create, host and bill your own plans, under your own brand. from £28.46/mo (3-year plan, with coupon) See plans |