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

PresetProvider CombinationKeys NeededLive Word-by-WordStage 1 STT (Ear)Stage 2 LLM (Brain)Best For
G1Google Gemini All-in-One ⭐1 KeyYes (WebSocket)gemini-3.5-transcribe-livegemini-3.5-flash-lite / gemini-3.8-flashSimplest global single-key setup covering live streaming, polishing & multimodal Reply Assist
G2Groq Whisper + OpenAI / Gemini1–2 KeysFast Batch (~0.6s)Groq whisper-large-v3-turbogpt-4o-mini / gemini-3.5-flash-lite / llama-3.3-70bUltra-fast Whisper transcription paired with your favorite chat LLM
G3OpenAI Single-Key1 KeyFast Batch (~0.9s)gpt-4o-mini-transcribe / whisper-1gpt-4o-mini / gpt-4.1-miniStraightforward single OpenAI key workflow
G4Hybrid Local ASR + Cloud LLM1 KeyLocal InstantOn-device SenseVoiceSmall ($0)Any Cloud LLM (Gemini / OpenAI / DeepSeek)Audio never leaves your phone; $0 STT cost + flagship cloud writing
G5100% Self-Hosted LAN0 Cloud KeysLocal LANwhisper.cpp / Faster-Whisper HTTPOllama (qwen3:8b / gemma3)Complete home/office LAN sovereignty & $0 API bill
CN1DeepSeek Single-Key1 KeyBatch (~1.5s)DeepSeek /v1/tools/asrdeepseek-chat1 key for both multilingual ASR and top-tier bilingual writing
CN2Volcengine SeedASR 2.0 + DeepSeek2 KeysYes (WebSocket)Doubao bigmodel (SeedASR 2.0)deepseek-chat / doubao-seed-2-1-proLowest-latency Mainland China direct streaming without a proxy
CN3Alibaba Bailian Single-Key1 KeyYes (WebSocket)paraformer-realtime-v2qwen-turbo-latest / qwen-plus-latestSingle 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:

  1. Create an API key (AIza...) in Google AI Studio.
  2. Open TypeFree → Voice & AI → Models & API → 1. Provider Vault, tap Google Gemini, and paste your AIza... key.
  3. Tap 🚀 Set as Active Primary Workflow:
  4. Live Voice: Uses Gemini Live WebSocket (gemini-3.5-transcribe-live) for low-latency streaming transcription.
  5. Stage 2 Polishing & Tools: Uses gemini-3.5-flash-lite (with Thinking set to OFF for crisp sub-second text cleanup).
  6. ✦ Reply Assist: Automatically supports gemini-3.8-flash (or your chosen Gemini model) with optional redacted screenshot vision.
  7. Tap ⚡ Speed Test to verify connectivity and inspect your real-time ms latency.

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:

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?

  1. Go to Voice & AI → Models & API → On-Device Offline Models and download SenseVoiceSmall (or streaming Paraformer) once.
  2. In Workflow & Model Routing, set Stage 1 STT (Ear) to On-Device Offline ASR (sherpa-onnx).
  3. Set Stage 2 LLM (Brain) to any cloud provider key in your Vault (Gemini Flash-Lite, OpenAI gpt-4o-mini, or deepseek-chat).
  4. 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:

  1. Expose Ollama on LAN: Launch Ollama on your Mac/PC/Linux host with OLLAMA_HOST=0.0.0.0:11434 ollama serve and pull a fast instruct model such as ollama pull qwen3:8b or ollama pull llama3.2:3b.
  2. Optional Local STT Server: Run an OpenAI-compatible audio endpoint such as whisper.cpp server or faster-whisper-server (or simply use TypeFree's built-in on-device sherpa-onnx ASR on the phone so you don't even need a PC STT server!).
  3. In TypeFree OpenAI / Compatible, point Base URL to http://<YOUR_LAN_IP>:11434/v1 (leave API Key as ollama), 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

4.2 Alibaba Cloud Bailian (Qwen) — Single sk- Key WebSocket Streaming (Preset CN3)

  1. Create an sk-... API key in the Alibaba Cloud Bailian Console.
  2. Paste it into the Alibaba Bailian tile in Provider Vault and tap 🚀 Set as Active Primary Workflow.
  3. Stage 1 automatically enables Bailian Real-Time WebSocket (paraformer-realtime-v2, or switch to multilingual gummy-realtime-v1), and Stage 2 uses qwen-turbo-latest (or qwen-plus-latest / qwen-vl-max-latest for multimodal Reply Assist).

4.3 Volcengine (Doubao SeedASR 2.0 + Ark Seed 2.1)

  1. In the Volcengine Doubao Vault tile, enter your Speech Console Access Token + AppID (or single X-Api-Key for volc.seedasr.sauc.duration) for real-time WebSocket bigmodel dictation.
  2. Enter your Volcengine Ark API Key for doubao-seed-2-1-lite-260915 (fast polishing) and doubao-seed-2-1-pro-260915 (multimodal vision + Reply Assist), or pair Volcengine STT directly with DeepSeek!

5. Pro Latency Tuning Tips


6. Troubleshooting & FAQ

  1. "Stage 1 Speech-to-Text API Key is not configured"
  2. 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.
  3. HTTP 404 or "Model not found" on OpenAI-compatible endpoints
  4. Double-check that you didn't put a chat model name (like gpt-4o-mini or deepseek-chat) into the Stage 1 Audio Transcription model box, or an audio model (whisper-large-v3-turbo) into the Stage 2 Chat LLM box.
  5. HTTP 401 / 403 Authentication Error
  6. 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.duration streaming resource pack is activated).
  7. How do I verify which provider is fastest on my current Wi-Fi or 5G?
  8. 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.