Damar API
Easy to talk to Damar,
OpenAI-compatible.
All chat endpoints follow the OpenAI Chat Completions format. Authentication uses the website session (for the built-in widget) or the model gateway key configured on the server.
Chat via the gateway
POST /api/v1/damar/gateway
{
"messages": [
{ "role": "user", "content": "Halo Damar!" }
],
"model": "river/zai-org/GLM-5.3-Flash",
"search": false
}
model (optional), free model choice from the gateway list. search (optional), enable web search only for models that support it. Invalid model? Automatically falls back to the model list.
Streaming response
POST /api/v1/damar/gateway-stream
{ "messages": [ ... ] }
Server-sent events: each data: JSON contains delta content, ends with the done event.
Model list & status
GET /api/v1/damar/gateway-status
Returns online, latency_ms, and the public model list: wises-d1-2b (fast) and wises-d1-4b (capable). Pick one with the model field; if a model is down the gateway serves your request from the next healthy backend automatically. Search is reserved for Pro.
Conversation through the runtime
POST /api/v1/damar/conversations
POST /api/v1/damar/conversations/{id}/uploads # multipart files
POST /api/v1/damar/conversations/{id}/stream # SSE, multimodal
GET /api/v1/damar/status # runtime health
Use Damar with your own application
Generate an API key to call the gateway outside the website, or embed the full chat widget into your site.
curl -X POST https://wisestechnology.com/api/v1/damar/gateway \
-H "Authorization: Bearer damar_sk_…" \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"Halo Damar!"}]}'
Rate limit & daily quota apply per key (e.g. Starter: 20 requests per minute, 2.000 requests per day). When the daily quota is used up, the response returns 429 with header X-Quota-Exhausted: daily. Get a key via Pricing.
Embed the chat widget
Install the complete Damar chat (models, files, voice) into your website with one script tag, key of the widget type is locked to your domain.
<script src="https://wisestechnology.com/embed.js" data-key="damar_sk_…" defer></script>
Usage limits
Without a key (this website's widget): each IP is limited per minute (20 requests per minute for chat) plus the free daily quota. Attachments are processed in memory, nothing is stored on the server. Usage metering only records the endpoint, model, and status — never the chat content.