API reference
All endpoints are OpenAI-compatible REST + SSE. Base URL https://ai.ollalink.com. Authenticate with
Authorization: Bearer sk-partner-… on every request.
Chat / RAG / tools
Section titled “Chat / RAG / tools”chat is one multimodal model for conversation, RAG synthesis, summarization, multilingual chat,
vision (image input), and tool/function calling.
curl https://ai.ollalink.com/v1/chat/completions \ -H "Authorization: Bearer sk-partner-XXXXXXXXXXXX" -H "Content-Type: application/json" \ -d '{"model":"chat","messages":[{"role":"user","content":"Summarize BGP route selection."}],"max_tokens":300}'Streaming (SSE): add "stream": true.
RAG pattern: put retrieved context in the system/user message and instruct the model to answer only from it.
Tools: send OpenAI-style tools + tool_choice; the model returns tool_calls (function name + JSON args),
which you execute and return as a {"role":"tool", …} message.
Vision: send images via the image_url content type (a public URL or a data:image/…;base64,… data URI).
Sovereign CPU chat — local
Section titled “Sovereign CPU chat — local”local is LFM2-2.6B running on our CPU. Prompts and outputs never leave the box (no cloud) — use it
for private/light chat and RAG. Text-only (no tools/vision), ~22–29 tok/s, so keep max_tokens modest and prefer
stream: true. For heavy, long-context, tool, or vision work use chat.
curl https://ai.ollalink.com/v1/chat/completions \ -H "Authorization: Bearer sk-partner-XXXXXXXXXXXX" -H "Content-Type: application/json" \ -d '{"model":"local","messages":[{"role":"user","content":"In one sentence, what is a VLAN?"}],"max_tokens":200}'Dedicated coding — code
Section titled “Dedicated coding — code”A cloud coder that reasons before answering — send a large max_tokens (≥ 4000, ideally 8000) and a client
timeout ≥ 120 s.
curl https://ai.ollalink.com/v1/chat/completions \ -H "Authorization: Bearer sk-partner-XXXXXXXXXXXX" -H "Content-Type: application/json" \ -d '{"model":"code","messages":[{"role":"user","content":"Write a Python function to validate an IPv4 address. Code only."}],"max_tokens":8000}'Translation — translate
Section titled “Translation — translate”Keeps acronyms, IPs, CLI, and product names in Latin; the rest is translated. Put the target language in the prompt.
curl https://ai.ollalink.com/v1/chat/completions \ -H "Authorization: Bearer sk-partner-XXXXXXXXXXXX" -H "Content-Type: application/json" \ -d '{"model":"translate","messages":[{"role":"user","content":"Translate to Hindi: Configure the BGP peer at 10.10.10.1 on port 179."}]}'Speech → text (ASR)
Section titled “Speech → text (ASR)”CPU lane (always on): POST https://ai.ollalink.com/asr-whisper/v1/audio/transcriptions — faster-whisper
large-v3-turbo, ~99 languages, auto-detect, multipart upload, returns text + segments with timestamps.
curl https://ai.ollalink.com/asr-whisper/v1/audio/transcriptions \ -H "Authorization: Bearer sk-partner-XXXXXXXXXXXX" -F "file=@meeting.wav"GPU lane (highest accuracy): POST https://gpu-asrhq.ollalink.com/v1/audio/transcriptions — whisper large-v3,
transcribe + translate, best term accuracy. Requires the GPU box to be attached.
- Omit
languageto auto-detect; passlanguage=<code>to force. Add-F "word_timestamps=true"for per-word timing.
Text → speech (TTS)
Section titled “Text → speech (TTS)”Soniox voices: POST https://ai.ollalink.com/tts/v1/audio/speech, returns audio bytes. Numbers, IPs, and codes
are verbalized in engineer style.
curl https://ai.ollalink.com/tts/v1/audio/speech \ -H "Authorization: Bearer sk-partner-XXXXXXXXXXXX" -H "Content-Type: application/json" \ -d '{"model":"nh-tts","input":"Namaste, aapka network taiyaar hai.","language":"hi"}' --output speech.wavLanguages: en, en-IN, hi, kn → voice Mohan; en-US, fr, es → voice george (auto-selected by
language).
Expressive voices (GPU): POST https://gpu-tts.ollalink.com/v1/audio/speech — OmniVoice, 40 branded voices
(voice = an id like nh-m01), 24 kHz WAV. Requires the GPU box.
Live speech (WebSocket)
Section titled “Live speech (WebSocket)”wss://sound-stream.ollalink.com/v1/speech/stream — authenticate with an ollalink sk_ key, then stream 16 kHz
mono s16le PCM. You receive partial/final transcripts, translated captions, and (opt-in) spoken translation audio.
Errors
Section titled “Errors”401 invalid/missing key · 400 malformed or over context limit · 429 rate limit · 5xx upstream. Bodies carry a
JSON error object.