User Tools

Site Tools


api:ai:quota-products

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.
  • It fits the customer's AI product in effect: the resources it adds (amount above 0) are exactly the ones that product limits (included amount above 0 - null is unlimited and 0 is not allowed). A transcription + summary product takes the top-ups that add both, a transcription-only product the top-ups that add transcription only. A top-up names no AI product, so one top-up serves every AI product of the same kind.

The list is empty when the customer has no AI product in effect, or one that limits nothing (all unlimited or not allowed): 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[].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: 10 hours transcription + summaries",
      "price": 499.00,
      "aiTopUp": {
        "sttSeconds": 36000,
        "llmTokens": 1000000,
        "ttsCharacters": 0
      },
      "productInfo": { "shortDescription": "10 timer ekstra transskribering og resumé" }
    },
    {
      "_id": "650000000000000000000421",
      "name": "AI top-up: 50 hours transcription + summaries",
      "price": 1999.00,
      "aiTopUp": {
        "sttSeconds": 180000,
        "llmTokens": 5000000,
        "ttsCharacters": 0
      }
    }
  ]
}

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

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki