Apps & Tokens
Create one token per app. Your apps send it as
Authorization: Bearer <token> on POST /chat.
Admin key
Stored only in this browser (localStorage). Unlocks the app list and the dashboard.
Create an app
Existing apps
| App | Token | Created |
|---|
Integration Guide
One HTTP endpoint that gives your apps a GEOBAT AI brain — text, images and PDF in, an answer out. Grab a token in the Apps tab.
Base URL & Auth
Base URL : __BASE__ Auth : header Authorization: Bearer <APP_TOKEN>
Every /chat call needs the Bearer header. No valid token → 401.
POST /chat
Request body (JSON)
| Field | Type | Notes |
|---|---|---|
prompt | string required | The instruction / question. |
images | string[] | 0..N images. Each item = raw base64 or data-URI (data:image/png;base64,…). Formats: PNG, JPEG, WebP, GIF. |
documents | string[] | 0..N PDF files. Each item = raw base64 or data-URI (data:application/pdf;base64,…). The engine reads the text and sees the pages. |
system | string | System prompt (the app's role). Optional. |
The engine is fixed (GEOBAT AI, top quality). There is no model parameter to set.
Response (JSON)
{
"result": "the reply text",
"model": "geobat-ai",
"cost_usd": 0.0123,
"input_tokens": 812,
"output_tokens": 145,
"session_id": "…"
}Examples
cURL (text)
curl -X POST __BASE__/chat \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{"prompt":"Give me 3 house styles."}'Python (text + PDF)
import base64, requests
pdf = base64.b64encode(open("contrat.pdf","rb").read()).decode()
r = requests.post("__BASE__/chat",
headers={"Authorization": "Bearer <TOKEN>"},
json={
"prompt": "Summarize this contract and list the key dates.",
"documents": [pdf],
"system": "You are a precise legal assistant.",
})
data = r.json()
print(data["result"], "| cost $", data["cost_usd"])Node.js (text + image)
import fs from "node:fs";
const img = fs.readFileSync("plan.jpg").toString("base64");
const res = await fetch("__BASE__/chat", {
method: "POST",
headers: {
"Authorization": "Bearer <TOKEN>",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "Analyze this floor plan, suggest 3 improvements.",
images: [img],
system: "You are an expert architecture assistant.",
}),
});
const data = await res.json();
console.log(data.result, data.cost_usd);Error codes
| Code | Meaning |
|---|---|
401 | Missing or invalid token. |
400 | Invalid base64 image, or a non-PDF document. |
429 | Monthly budget cap reached (protects the subscription). Retry after reset. |
502 | Engine error (timeout, etc.). |
⚠️ Internal / test use. Runs on a shared engine subscription — provision a
dedicated engine key before any public launch. Never share your tokens.
Dashboard
Enter your admin key in the Apps tab to see spend per app.
—service
—apps
—calls this month
—spent this month
—monthly cap
Budget
Cost per app
| App | Calls (mo.) | Input tk | Output tk | Cost (mo.) | Cost (all-time) | Last used |
|---|