Document Utilities
The DEQLYNK Core API (v1)
DEQLYNK exposes a local-first OpenAI-compatible chat endpoint so existing clients can integrate with minimal changes. If your app already speaks OpenAI Chat Completions, DEQLYNK can act as a drop-in replacement by swapping only base URL, model name, and key source.
Endpoint
- Method: POST
- Path:
/v1/models/deqlynk-21m/chat/completions - Format: JSON request and JSON response
- Compatibility: OpenAI-style message array and generation options
Why "Drop-In Compatible" Matters
Most production apps are wired around a familiar chat schema. DEQLYNK preserves that structure so your prompt pipeline, role ordering, and response extraction patterns stay intact. The operational benefit is faster migration, lower refactor risk, and easier fallback orchestration between local and external providers.
Common Request Shape
| Field | Type | Description |
|---|---|---|
model |
string | Use deqlynk-21m or route-specific alias. |
messages |
array | Ordered system/user/assistant turns. |
temperature |
number | Creativity control for output variability. |
max_tokens |
integer | Upper bound for generated response tokens. |
VS Code Style cURL
# Local DEQLYNK OpenAI-compatible request
curl -X POST "http://127.0.0.1:5000/v1/models/deqlynk-21m/chat/completions" \
-H "Authorization: Bearer YOUR_DEQLYNK_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deqlynk-21m",
"messages": [
{"role": "system", "content": "You are a concise coding assistant."},
{"role": "user", "content": "Explain retrieval-augmented generation in 4 lines."}
],
"temperature": 0.4,
"max_tokens": 220
}'
VS Code Style Python requests
import requests
base_url = "http://127.0.0.1:5000"
url = base_url + "/v1/models/deqlynk-21m/chat/completions"
headers = {
"Authorization": "Bearer YOUR_DEQLYNK_KEY",
"Content-Type": "application/json",
}
payload = {
"model": "deqlynk-21m",
"messages": [
{"role": "system", "content": "You are an API migration assistant."},
{"role": "user", "content": "List three benefits of local inference."},
],
"temperature": 0.3,
"max_tokens": 160,
}
resp = requests.post(url, headers=headers, json=payload, timeout=60)
resp.raise_for_status()
print(resp.json()["choices"][0]["message"]["content"])
Migration tip: To switch from external OpenAI-compatible providers, keep your payload format unchanged and only
adjust base URL/model routing.