Skip to content

Commit b47b4e9

Browse files
authored
Merge pull request #104 from second-state/alabulei1-patch-7
Create echokit-day-10-openrouter.md
2 parents 8b6aeff + a874349 commit b47b4e9

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
slug: echokit-30-days-day-10-openrouter
3+
title: "Day 10: Using OpenRouter as Your EchoKit LLM Provider | The First 30 Days with EchoKit"
4+
tags: [echokit30days]
5+
---
6+
7+
8+
Over the past two weeks, we’ve explored many moving parts inside the **ASR → LLM → TTS** pipeline.
9+
We’ve changed [the welcome voice](https://echokit.dev/docs/dev/echokit-30-days-day-5-welcome-voice), [updated the boot screen](https://echokit.dev/docs/dev/echokit-30-days-day-4-bootscreen), [switched between multiple ASR providers](https://echokit.dev/docs/dev/echokit-30-days-day-6-groq), and learned how to run the EchoKit server both via [Docker](https://echokit.dev/docs/dev/echokit-30-days-day-2-docker) and [from source](https://echokit.dev/docs/dev/echokit-30-days-day-3-rust).
10+
11+
This week, we shifted our focus to the **LLM**, the part of the pipeline that interprets what you say and decides how EchoKit should respond.
12+
13+
Yesterday, we [used **OpenAI** as the LLM provider](https://echokit.dev/docs/dev/echokit-30-days-day-9-chatgpt).
14+
Today, we’re going to try something more flexible — **OpenRouter**.
15+
16+
17+
## What Is OpenRouter?
18+
19+
**OpenRouter** is a unified API gateway that gives you access to many different LLMs without changing your code structure.
20+
It’s fully **OpenAI-API compatible** in the context of text generation models, which means EchoKit can work with it right away.
21+
22+
Some reasons I like OpenRouter:
23+
24+
* You can choose from a wide selection of open source LLMs: Qwen, Llama, DeepSeek, Mistral, etc.
25+
* Switching models doesn’t require code changes — just update the model name.
26+
* Often more cost-effective and more customizable.
27+
* Great for exploring different personalities and response styles for EchoKit.
28+
29+
30+
## How to Use OpenRouter as Your LLM Provider
31+
32+
### 1. Get Your OpenRouter API Key
33+
34+
Go to [your OpenRouter dashboard](https://openrouter.ai/settings/keys) and generate an API key.
35+
Keep it private — it works just like an OpenAI API key.
36+
37+
38+
### 2. Update `config.toml`
39+
40+
Open your EchoKit server configuration file and locate LLM:
41+
42+
```
43+
[llm]
44+
provider = "openrouter"
45+
chat_url = "https://openrouter.ai/api/v1/chat/completions"
46+
api_key = "YOUR_API_KEY_HERE"
47+
model = "qwen/qwen3-14b"
48+
history = 5
49+
```
50+
51+
You can replace the model with [any supported model on OpenRouter](https://openrouter.ai/models).
52+
53+
54+
### 3. Restart Your EchoKit Server
55+
56+
If you’re running from the Rust source code, after saving the updated `config.toml`:
57+
58+
```
59+
# Enable debug logging
60+
export RUST_LOG=debug
61+
62+
# Run the EchoKit server in the background
63+
nohup target/release/echokit_server &
64+
```
65+
66+
Or using Docker:
67+
68+
```
69+
docker run --rm \
70+
-p 8080:8080 \
71+
-v $(pwd)/config.toml:/app/config.toml \
72+
secondstate/echokit:latest-server-vad &
73+
```
74+
75+
Then return to the setup page, pair the device if needed, and EchoKit will now respond using OpenRouter. That's it.
76+
77+
78+
79+
Connecting EchoKit to OpenRouter feels like I unlocked a new layer of creativity.
80+
OpenAI gives you a clean and reliable default, but OpenRouter opens the door to experimenting with different model behaviors, tones, and personalities — all without changing your application logic.
81+
82+
If you enjoy tweaking, tuning, and exploring how different models shape your EchoKit’s “brain”, OpenRouter is one of the best tools for that.
83+
84+
85+
---
86+
87+
If you want to share your experience or see what others are building with EchoKit + OpenRouter:
88+
89+
* Join the **[EchoKit Discord](https://discord.gg/Fwe3zsT5g3)**
90+
* Or share your latency tests, setups, and experiments — we love seeing them
91+
92+
Want to get your own EchoKit device?
93+
94+
* [EchoKit Box](https://echokit.dev/echokit_box.html)
95+
* [EchoKit DIY Kit](https://echokit.dev/echokit_diy.html)
96+
97+
98+

0 commit comments

Comments
 (0)