Skip to content

mAI Tokens.Frontier AI, one key away.

mAI Tokens is the mSpace AI gateway. Access frontier LLM models for chat and image generation through one API, one key and one prepaid balance, and build AI into your apps and your SMS and USSD services.

  • Frontier LLM models
  • Chat and image generation
  • Pay per token
maitokens.mspace.lk/api
POST /v1/chat/completions
Authorization: app_<keyId>.<keyValue>

{
  "model": "<your enabled model>",
  "messages": [
    { "role": "user",
      "content": "Explain megapixels in a picture" }
  ],
  "max_completion_tokens": 300
}
200 OK
"finish_reason": "stop", "total_tokens": 29
An illustrative mAI Tokens chat completion request and response
How it works

Your app, one gateway, frontier AI

Your backend sends one request with one key. mAI Tokens routes it to the model you chose and returns the answer, with the tokens it used.

Your appYour backend, your SMS and USSD services
mAI TokensOne key · one balance · usage reported
Frontier LLM modelsChat completions and image generation
What mAI Tokens does

Everything AI, through a single gateway

One API in front of frontier LLM models. You authenticate once and spend from one balance, whichever model answers.

Frontier LLM models

Reach frontier LLM models from several model providers through a single gateway, without a separate commercial account for each.

  • One API in front of every model
  • Enable the models you want per project
  • Switch models without changing your integration

Chat completions

Generate a model response for a conversation: answers, summaries, classification, extraction and drafting.

  • System, user and assistant messages
  • Structured output with response_format
  • Tool calling for actions in your app

Image generation

Create an image from a text prompt for your app, your campaigns or your content.

  • One prompt in, one image out
  • Choose size and quality per request
  • Lower quality for previews, higher where it matters
Why mAI Tokens

Less to manage. More to build.

One key, one API

Authenticate once, against mAI Tokens, with a single API key from the portal.

One prepaid balance

Every call spends from your mAI Tokens balance, per token. No subscription to each provider.

Pay for what you use

Each response reports the tokens it used, so you always know why the balance moved.

Right model per task

Fast, low-cost models for short replies; the most capable ones where quality matters most.

Clear, standard errors

Real HTTP status codes with a named error code, so failures are easy to handle.

Built for production

Per-project models, quotas and rate limits that reset every minute keep spend under control.

What you can build

Put AI behind your mSpace services

mAI Tokens works alongside the Inzpire APIs, so the services your subscribers already use can answer, guide and create.

  1. 01

    AI-answering SMS shortcode

    Subscribers text a question to your shortcode and get a short, helpful answer back by SMS.

  2. 02

    USSD assistant

    Guide users through a USSD menu, with AI resolving the request and replying on the next screen or by SMS.

  3. 03

    Campaign copy

    Draft promotional messages for your subscriber base, then review them before they go out.

  4. 04

    Images for your app

    Generate visuals for your app, your listings and your marketing from a short text prompt.

Get started

From sign in to your first AI call

Four steps in the mAI Tokens portal and your app is talking to frontier AI.

Step 1

Open the portal

Sign in to the mAI Tokens portal and create your project.

Step 2

Enable your models

Choose the models your project may use. Each has its own capabilities and price point.

Step 3

Top up your balance

Add mAI Tokens to your prepaid balance. Every call spends from it, per token.

Step 4

Generate a key and call

Generate your API key, keep it on your backend, and send your first request.