api:ai:quota-products
Table of Contents
API : AI quota : Top-up products
Introduction
This request returns the AI_TOP_UP products the customer may buy right now. A top-up adds transcription seconds, summary tokens and/or text-to-speech characters to the current month - see Buy top-up.
A product is listed when all of the following hold:
- It is of type AI_TOP_UP and is within its start/end window.
- It is either a reseller product of the customer's own reseller, or a customer product made for this customer. Reseller products limited with inheritByCustomers are only listed for the named customers, and products marked applyByResellerOnly are hidden from users below RESELLER.
- Its
aiTopUp.productis the master AI product that the customer's AI product in effect descends from - a top-up can only be bought for the product family the customer is on.
The list is empty when the customer has no AI product in effect: there is nothing to top up.
Request
| URL | https://api.telecomx.dk/ai/quota/products | |
|---|---|---|
| Method | GET | |
| Access level | MANAGER, OWNER for the user's own customer. RESELLER, RESELLER_ADMIN or ADMIN, who may also name another customer with customer. |
|
| Query | customer | [optional] Id of the customer to list products for. Only honoured for RESELLER and up, and access to the customer is checked. Defaults to the user's own customer. |
Query examples
https://api.telecomx.dk/ai/quota/products https://api.telecomx.dk/ai/quota/products?customer=650000000000000000000101
Response
| JSON object | ||
|---|---|---|
| products | Array | The top-up products the customer may buy, cheapest first. |
| products[]._id | Id | Id of the product - pass it to Buy top-up. |
| products[].name | String | Product name. |
| products[].price | Number | The customer price for one purchase. |
| products[].aiTopUp.sttSeconds | Number | Transcription seconds added by the purchase. |
| products[].aiTopUp.llmTokens | Number | Summary tokens added by the purchase. |
| products[].aiTopUp.ttsCharacters | Number | Text-to-speech characters added by the purchase. |
| products[].aiTopUp.product | Id | The master AI product this top-up applies to. |
| products[].productInfo.shortDescription | String | Short description of the product, if any. |
| products[].productInfo.description | String | Longer description of the product, if any. |
Note that properties holding no value may be omitted from the object.
Example
{ "products": [ { "_id": "650000000000000000000420", "name": "AI top-up: 5 hours transcription", "price": 199.00, "aiTopUp": { "sttSeconds": 18000, "llmTokens": 0, "ttsCharacters": 0, "product": "650000000000000000000310" }, "productInfo": { "shortDescription": "5 timer ekstra transskription" } }, { "_id": "650000000000000000000421", "name": "AI top-up: bundle", "price": 499.00, "aiTopUp": { "sttSeconds": 18000, "llmTokens": 1000000, "ttsCharacters": 100000, "product": "650000000000000000000310" } } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | customer | Customer id is invalid |
| 404 | customer | Customer not found |
| 403 | access_denied | Insufficient access level, or no access to the customer |
| 500 | internal_error | <Unspecified> |
api/ai/quota-products.txt · Last modified: by Telecom X AI