ApilageAI Developer Platform & API Hub
Last updated: February 19, 2026
Manage API keys, lock down allowed domains, monitor usage, and ship streaming or direct responses to your own platform. Default ApilageAI system text is always applied and cannot be viewed or changed. For advanced guides, visit the Developer API Documentation.
Manage API’s
Create, delete, enable/disable API keys, add allowed domains, and view usage for each key.
Playground
Test streaming or direct responses before shipping to your platform. Playground usage is billed at the same pricing as production.
Output
Response will appear here.
Code Examples
Base URL: https://apilageai.lk
- import requests
- API_KEY = "YOUR_API_KEY"
- BASE_URL = "BASE_URL"
- payload = {
- "prompt": "Explain Newton\u2019s laws",
- "model": "pro",
- "system": "You are a tutor."
- }
- resp = requests.post(
- f"{BASE_URL}/api/developer/text",
- headers={"X-API-Key": API_KEY},
- json=payload
- )
- print(resp.json()["text"])
- const API_KEY = "YOUR_API_KEY";
- const BASE_URL = "BASE_URL";
- const resp = await fetch(`${BASE_URL}/api/developer/text`, {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "X-API-Key": API_KEY
- },
- body: JSON.stringify({
- prompt: "Explain Newton\u2019s laws",
- model: "pro",
- system: "You are a tutor."
- })
- });
- const data = await resp.json();
- console.log(data.text);
- import fetch from "node-fetch";
- const API_KEY = "YOUR_API_KEY";
- const BASE_URL = "BASE_URL";
- const resp = await fetch(`${BASE_URL}/api/developer/text`, {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "X-API-Key": API_KEY
- },
- body: JSON.stringify({
- prompt: "Explain Newton\u2019s laws",
- model: "pro"
- })
- });
- const data = await resp.json();
- console.log(data.text);
- $apiKey = "YOUR_API_KEY";
- $baseUrl = "BASE_URL";
- $payload = json_encode([
- "prompt" => "Explain Newton\u2019s laws",
- "model" => "pro"
- ]);
- $ch = curl_init($baseUrl . "/api/developer/text");
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_HTTPHEADER, [
- "Content-Type: application/json",
- "X-API-Key: " . $apiKey
- ]);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
- $result = curl_exec($ch);
- curl_close($ch);
- echo $result;
- const runApilage = async () => {
- const resp = await fetch("BASE_URL/api/developer/text", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "X-API-Key": "YOUR_API_KEY"
- },
- body: JSON.stringify({
- prompt: "Explain Newton\u2019s laws",
- model: "pro"
- })
- });
- const data = await resp.json();
- console.log(data.text);
- };
API Usage & Guide
- Endpoint: https://apilageai.lk/api/developer/text
- Streaming: https://apilageai.lk/api/developer/stream
- Auth Header: X-API-Key: YOUR_API_KEY
- Body: prompt, model, system (optional), temperature (optional), max_tokens (optional)
- Rate Limits: TPM + RPD per model (see documentation).
Streaming returns SSE data events with JSON { "delta": "..." } and a final done event.
System Text Rules
- ApilageAI default system text is always active and hidden.
- Your custom system text is appended on top of the default.
- Only Sinhala or English responses are allowed.
Token Pricing (LKR per 1M tokens)
Charges are deducted from your ApilageAI balance and include system text tokens.
Developer API requests require a positive ApilageAI balance.
| Model | Input | Output |
|---|---|---|
| free | 1499.00 | 1299.00 |
| pro | 1999.00 | 1899.00 |
| super | 3599.00 | 3299.00 |
| master | 7999.00 | 7000.00 |
| loard | 10000.00 | 8999.00 |