Effective from: 27 August 2026 · version 2026-08-28
Connect to ThaiProMax from your own system over our REST API — check your balance, run AI jobs, and call any of our models using the same standard as the OpenAI API.
Every request must carry an API Key created from the API Key menu on your dashboard, sent as a Bearer token in the HTTP header.
Authorization: Bearer your_api_key_here
Your key starts with isk_. Keep it secret and never embed it in browser-side code where anyone can read it.
Use this to check your plan, your monthly Points balance, and the Credits in your account.
/api/v1/me
Example response (JSON)
{
"subscription": {
"plan": "premium",
"planName": "Premium Plan",
"status": "active",
"billingCycle": "monthly",
"periodStart": "2026-06-01T00:00:00.000Z",
"periodEnd": "2026-07-01T00:00:00.000Z",
"pointsRemaining": 42500,
"pointsLimit": 44000,
"pointsUsed": 1500
},
"wallet": {
"credits": 5000
}
}
Submit a job by capability. Points are deducted first; once they run out, Credits are used.
/api/v1/generate?capabilityKey=gen_light
| Parameter | Type | Description |
|---|---|---|
capabilityKey | String (required) | The capability key, for example gen_light (10 Credits) or gen_heavy (1,000 Credits). |
Example response (JSON)
{
"ok": true,
"newValue": 42,
"capabilityKey": "gen_light",
"costCredits": 10,
"source": "points",
"newCredits": null,
"newPoints": 42490
}
Call any of our models using the same standard as the OpenAI API. Point your coding IDE app or SDK at it with your API Key. Usage is billed by actual token count, taking Points first and then Credits.
Base URL for your IDE or SDK
https://example.com/api/v1
| Setting | Value |
|---|---|
| API Provider | Choose OpenAI Compatible |
| Base URL | https://example.com/api/v1 |
| API Key | Your isk_... key from the API Key menu on your dashboard |
| Model ID | Pick one from GET /api/v1/models |
/api/v1/chat/completions
stream: true (SSE) and tool calling (tools of type function) per the OpenAI standard.:online to the model name. It works from any IDE app without changing the request body.400 model_not_found.usage.cost field in the response is the number of Credits charged for that request, including any web search.Example request body
{
"model": "google/gemini-3.5-flash",
"stream": false,
"messages": [
{ "role": "user", "content": "Hello, please introduce yourself." }
]
}
Example response (JSON)
{
"id": "gen-xxxxxxxxxx",
"object": "chat.completion",
"model": "google/gemini-3.5-flash",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": { "role": "assistant", "content": "Hello! I am ..." }
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 45,
"total_tokens": 57,
"cost": 2
}
}
:online to the model name, e.g. google/gemini-3.5-flash:online. Just change the Model ID in your app.plugins field in the request body to set engine, max_results (max 10), search_prompt, include_domains, and exclude_domains.usage.cost. There is no separate bill.Example request body with options
{
"model": "google/gemini-3.5-flash",
"plugins": [
{ "id": "web", "max_results": 5, "exclude_domains": ["reddit.com"] }
],
"messages": [
{ "role": "user", "content": "What is the latest AI news this week?" }
]
}
/api/v1/models
Returns every model currently enabled, with pricing per one million tokens in Credits.
Example response (JSON)
{
"object": "list",
"data": [
{
"id": "google/gemini-3.5-flash",
"object": "model",
"name": "Gemini 3.5 Flash",
"context_length": 1000000,
"pricing": {
"prompt": 12375,
"completion": 74250,
"unit": "credits_per_1m_tokens"
}
}
]
}
curl -X GET "https://example.com/api/v1/generate?capabilityKey=gen_light" \
-H "Authorization: Bearer your_api_key_here"
const apiKey = 'your_api_key_here';
const url = 'https://example.com/api/v1/generate?capabilityKey=gen_light';
fetch(url, {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Accept': 'application/json'
}
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
import requests
api_key = "your_api_key_here"
url = "https://example.com/api/v1/me"
headers = {
"Authorization": f"Bearer {api_key}",
"Accept": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())