Document Utilities
The /api/send_message Endpoint
This endpoint is the main conversational interface for DEQLYNK chat generation. It expects JSON input, uses session-aware authentication, applies rate limiting, writes history, and returns a structured JSON response.
HTTP Request
- Method:
POST - Path:
/api/send_message - Content-Type:
application/json - Auth model: Session cookie from a valid login flow
Exact JSON Payload Structure
{
"message": "Explain the idea of local-first LLM systems in simple words."
}
Successful JSON Response (Example)
{
"ok": true,
"response": "Local-first LLM systems process data on your own machine...",
"message_id": "3f8e7a4ac9b1208f7e1ab223"
}
Validation rule: The
message field must be a non-empty string. Empty payloads return 400.
Python requests Example (Dark Glass Block)
Python / requests
import requests
url = "http://127.0.0.1:5000/api/send_message"
payload = {
"message": "Give me a beginner roadmap to build a tiny local transformer."
}
# If using a logged-in browser session, pass the same session cookie.
# For script-driven tests, authenticate first and reuse the returned session.
response = requests.post(url, json=payload, timeout=30)
print(response.status_code)
print(response.json())
Operational Notes
- Telemetry updates occur after successful responses (chat count, token estimate, last active).
- Rate limits are enforced before generation to protect resources and reduce abuse spikes.
- Owner and standard users have different throughput windows.