TypeFree BYOK API Setup Guide (Global & Mainland China)
TypeFree is built on a Local-First + Bring Your Own Key (BYOK) architecture. You can use TypeFree 100% offline with zero API keys via the built-in sherpa-onnx speech models and Qwen 0.8B polisher — or add your own API key in Voice & AI → Models & API so audio and text connect directly over encrypted HTTPS / WSS to the provider you choose, with zero middleman servers and zero monthly markup.
Looking for keyboard shortcuts, offline models, and Rime schema import instructions? Read the Complete User Guide.
1. Understanding TypeFree's AI Pipeline
In Voice & AI → Models & API, TypeFree supports both Single-Pass Native Multimodal Live Streaming and a modular Two-Stage (Ear + Brain) pipeline:
🎙️ Your Speech (16kHz PCM / WAV)
│
├──► [Option A: Single-Pass Multimodal Live WebSocket]
│ • Google Gemini Live (gemini-3.5-transcribe-live) — real-time streaming with 1 key
│
└──► [Option B: Two-Stage Modular Pipeline (Mix & Match Any Provider)]
│
▼ Stage 1 · 👂 Speech-to-Text Ear (STT)
│ • On-Device Offline ASR: SenseVoiceSmall / Paraformer (sherpa-onnx, $0 cost, 0 upload)
│ • Cloud WebSocket Streaming: Alibaba Bailian / Volcengine SeedASR 2.0 (live words as you speak)
│ • Cloud HTTP Fast Upload: Groq Whisper / OpenAI Audio / DeepSeek ASR / Local whisper.cpp
│
▼ Raw Transcript
│
▼ Stage 2 · 🧠 Text Brain (Polishing · ✍️ Help Write · 🔍 Ask AI · ✦ Reply Assist)
• Cloud LLMs: Gemini Flash-Lite / OpenAI GPT-4o-mini / Groq / DeepSeek / Qwen / Doubao
• Local LAN LLMs: Ollama (e.g., qwen3:8b, llama3.2) over home/office Wi-Fi
- Encrypted Provider Vault: Every provider's API key is stored independently inside Android
EncryptedSharedPreferences. You can switch presets or mix Stage 1 and Stage 2 across different providers without ever losing saved credentials. - ⚡
1-TokenLive Latency Waterfall: Tap ⚡ Speed Test next to any model selector to fire concurrent 1-token probes and rank every available model by real measured Time-To-First-Token (ms) on your current network.
2. Recommended Setup Matrix (Global & Mainland China)
| Preset | Provider Combination | Keys Needed | Live Word-by-Word | Stage 1 STT (Ear) | Stage 2 LLM (Brain) | Best For |
|---|---|---|---|---|---|---|
| G1 | Google Gemini All-in-One ⭐ | 1 Key | Yes (WebSocket) | gemini-3.5-transcribe-live | gemini-3.5-flash-lite / gemini-3.8-flash | Simplest global single-key setup covering live streaming, polishing & multimodal Reply Assist |
| G2 | Groq Whisper + OpenAI / Gemini | 1–2 Keys | Fast Batch (~0.6s) | Groq whisper-large-v3-turbo | gpt-4o-mini / gemini-3.5-flash-lite / llama-3.3-70b | Ultra-fast Whisper transcription paired with your favorite chat LLM |
| G3 | OpenAI Single-Key | 1 Key | Fast Batch (~0.9s) | gpt-4o-mini-transcribe / whisper-1 | gpt-4o-mini / gpt-4.1-mini | Straightforward single OpenAI key workflow |
| G4 | Hybrid Local ASR + Cloud LLM | 1 Key | Local Instant | On-device SenseVoiceSmall ($0) | Any Cloud LLM (Gemini / OpenAI / DeepSeek) | Audio never leaves your phone; $0 STT cost + flagship cloud writing |
| G5 | 100% Self-Hosted LAN | 0 Cloud Keys | Local LAN | whisper.cpp / Faster-Whisper HTTP | Ollama (qwen3:8b / gemma3) | Complete home/office LAN sovereignty & $0 API bill |
| CN1 | DeepSeek Single-Key | 1 Key | Batch (~1.5s) | DeepSeek /v1/tools/asr | deepseek-chat | 1 key for both multilingual ASR and top-tier bilingual writing |
| CN2 | Volcengine SeedASR 2.0 + DeepSeek | 2 Keys | Yes (WebSocket) | Doubao bigmodel (SeedASR 2.0) | deepseek-chat / doubao-seed-2-1-pro | Lowest-latency Mainland China direct streaming without a proxy |
| CN3 | Alibaba Bailian Single-Key | 1 Key | Yes (WebSocket) | paraformer-realtime-v2 | qwen-turbo-latest / qwen-plus-latest | Single sk- key unlocking WebSocket live STT + Qwen LLMs |
3. Global Provider Setup Walkthroughs
3.1 Google Gemini — Single-Key Live Streaming + Multimodal (Preset G1)
A single Google AI Studio API key powers real-time WebSocket voice dictation, ultra-fast Flash-Lite text polishing, Help Write, Ask AI, and multimodal screenshot understanding:
- Create an API key (
AIza...) in Google AI Studio. - Open TypeFree → Voice & AI → Models & API → 1. Provider Vault, tap Google Gemini, and paste your
AIza...key. - Tap 🚀 Set as Active Primary Workflow:
- Live Voice: Uses
Gemini Live WebSocket(gemini-3.5-transcribe-live) for low-latency streaming transcription. - Stage 2 Polishing & Tools: Uses
gemini-3.5-flash-lite(with Thinking set toOFFfor crisp sub-second text cleanup). - ✦ Reply Assist: Automatically supports
gemini-3.8-flash(or your chosen Gemini model) with optional redacted screenshot vision. - Tap ⚡ Speed Test to verify connectivity and inspect your real-time
mslatency.
3.2 Groq & OpenAI — High-Speed OpenAI-Compatible Setup (Presets G2 & G3)
TypeFree natively supports OpenAI and any OpenAI-compatible /v1/audio/transcriptions + /v1/chat/completions provider:
- Option A · OpenAI Single-Key:
- Generate an
sk-...key at OpenAI Platform. - In Provider Vault, select OpenAI / Compatible, keep Base URL as
https://api.openai.com/v1, and paste your key. - Set Stage 1 STT to
gpt-4o-mini-transcribe(orwhisper-1) and Stage 2 LLM togpt-4o-mini. - Option B · Groq Ultra-Fast Whisper (
whisper-large-v3-turbo): - Create a
gsk_...key at GroqCloud Console. - In OpenAI / Compatible, set Base URL to
https://api.groq.com/openai/v1and paste yourgsk_...key. - Pick
whisper-large-v3-turbofor Stage 1 STT (~0.4–0.7sturnaround). For Stage 2 LLM, either stay on Groq (llama-3.3-70b-versatile) or select Google Gemini / OpenAI / DeepSeek from your Provider Vault!
3.3 Hybrid Privacy & Cost Saver: Local SenseVoice + Cloud LLM (Preset G4)
Want zero voice audio leaving your phone and $0 audio transcription cost, while still enjoying frontier cloud LLMs for polishing, Help Write, Ask AI, and Reply Assist?
- Go to Voice & AI → Models & API → On-Device Offline Models and download
SenseVoiceSmall(or streamingParaformer) once. - In Workflow & Model Routing, set Stage 1 STT (Ear) to On-Device Offline ASR (
sherpa-onnx). - Set Stage 2 LLM (Brain) to any cloud provider key in your Vault (Gemini Flash-Lite, OpenAI
gpt-4o-mini, ordeepseek-chat). - Now raw audio is transcribed 100% locally on your chipset, and only the text transcript is polished by your cloud model when needed.
3.4 100% Self-Hosted LAN Setup: Ollama + Local Whisper Server (Preset G5)
Run the entire stack on your desktop/home server over Wi-Fi or Tailscale with $0 cloud bills:
- Expose Ollama on LAN: Launch Ollama on your Mac/PC/Linux host with
OLLAMA_HOST=0.0.0.0:11434 ollama serveand pull a fast instruct model such asollama pull qwen3:8borollama pull llama3.2:3b. - Optional Local STT Server: Run an OpenAI-compatible audio endpoint such as
whisper.cppserver orfaster-whisper-server(or simply use TypeFree's built-in on-devicesherpa-onnxASR on the phone so you don't even need a PC STT server!). - In TypeFree OpenAI / Compatible, point Base URL to
http://<YOUR_LAN_IP>:11434/v1(leave API Key asollama), tap ⚡ Speed Test to auto-fetch your installed Ollama models, and select your model for Stage 2.
4. Mainland China Direct Providers (Zero Proxy Required)
For users on Mainland China networks (or roaming without a VPN), TypeFree integrates native WebSocket and HTTP protocols for top domestic providers:
4.1 DeepSeek Official API — Single-Key or Golden Hybrid
- Single-Key Full Loop (Preset CN1): Paste your
sk-...key from DeepSeek Platform into the DeepSeek tile in Provider Vault. Stage 1 connects directly toPOST https://api.deepseek.com/v1/tools/asr(auto-detecting Mandarin, Cantonese, English, Japanese, and Korean), while Stage 2 usesdeepseek-chatacross polishing, Help Write, Ask AI, and Reply Assist. - Golden Streaming Hybrid (Preset CN2): Pair Alibaba Bailian or Volcengine SeedASR 2.0 as your Stage 1 WebSocket streaming ear (so words appear live while you speak), then tap DeepSeek → 🧠 Set as Text Brain so
deepseek-chatpowers Stage 2 polishing and Reply Assist.
4.2 Alibaba Cloud Bailian (Qwen) — Single sk- Key WebSocket Streaming (Preset CN3)
- Create an
sk-...API key in the Alibaba Cloud Bailian Console. - Paste it into the Alibaba Bailian tile in Provider Vault and tap 🚀 Set as Active Primary Workflow.
- Stage 1 automatically enables Bailian Real-Time WebSocket (
paraformer-realtime-v2, or switch to multilingualgummy-realtime-v1), and Stage 2 usesqwen-turbo-latest(orqwen-plus-latest/qwen-vl-max-latestfor multimodal Reply Assist).
4.3 Volcengine (Doubao SeedASR 2.0 + Ark Seed 2.1)
- In the Volcengine Doubao Vault tile, enter your Speech Console
Access Token+AppID(or singleX-Api-Keyforvolc.seedasr.sauc.duration) for real-time WebSocketbigmodeldictation. - Enter your Volcengine Ark API Key for
doubao-seed-2-1-lite-260915(fast polishing) anddoubao-seed-2-1-pro-260915(multimodal vision + Reply Assist), or pair Volcengine STT directly with DeepSeek!
5. Pro Latency Tuning Tips
- 0.3s Instant Streaming Commit vs. Stage 2 LLM Polishing: Inside
Workflow & Model Routing → Stage 2 Text Polishing, you can toggle automatic post-dictation LLM polishing ON or OFF: - ON (Default): Cleans filler words, fixes mid-sentence self-corrections, and adapts tone (~
0.4–0.8swith Flash-Lite / Qwen-Turbo / DeepSeek). - OFF (Ultra-Low Latency): Commits raw streaming transcripts in ~
0.3supon release while keeping ✍️ Help Write, 🔍 Ask AI, 🪄 Voice Rewrite, and ✦ Reply Assist wired to your Stage 2 LLM! - Disable Thinking for Voice Polishing: Reasoning/thinking tokens add
1–3sof wait time before the first character streams. Keep Thinking OFF on your Stage 2 dictation model and AUTO on Reply Assist.
6. Troubleshooting & FAQ
- "Stage 1 Speech-to-Text API Key is not configured"
- You selected a text-only LLM provider for Stage 2 without configuring an audio engine for Stage 1. Either enable an On-Device Offline ASR model (
SenseVoiceSmall, free & instant) or select Gemini / Groq / OpenAI / Bailian / Volcengine / DeepSeek ASR in Stage 1. HTTP 404or "Model not found" on OpenAI-compatible endpoints- Double-check that you didn't put a chat model name (like
gpt-4o-miniordeepseek-chat) into the Stage 1 Audio Transcription model box, or an audio model (whisper-large-v3-turbo) into the Stage 2 Chat LLM box. HTTP 401 / 403Authentication Error- Verify that your API key has no leading/trailing spaces and that your provider account has active quota/billing enabled (for Volcengine Speech, ensure the
volc.seedasr.sauc.durationstreaming resource pack is activated). - How do I verify which provider is fastest on my current Wi-Fi or 5G?
- Tap ⚡ Speed Test in
Voice & AI → Models & API— any model showing a green latency badge (e.g.,180 ms) has passed live authentication and end-to-end network verification.