File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -198,9 +198,32 @@ distill query # Test a query from command line
198198OPENAI_API_KEY # For text → embedding conversion (see note below)
199199PINECONE_API_KEY # For Pinecone backend
200200QDRANT_URL # For Qdrant backend (default: localhost:6334)
201- DISTILL_API_KEYS # Comma-separated API keys for auth (optional )
201+ DISTILL_API_KEYS # Optional: protect your self-hosted instance (see below )
202202```
203203
204+ ### Protecting Your Self-Hosted Instance
205+
206+ If you're exposing Distill publicly, set ` DISTILL_API_KEYS ` to require authentication:
207+
208+ ``` bash
209+ # Generate a random API key
210+ export DISTILL_API_KEYS=" sk-$( openssl rand -hex 32) "
211+
212+ # Or multiple keys (comma-separated)
213+ export DISTILL_API_KEYS=" sk-key1,sk-key2,sk-key3"
214+ ```
215+
216+ Then include the key in requests:
217+
218+ ``` bash
219+ curl -X POST http://your-server:8080/v1/dedupe \
220+ -H " Authorization: Bearer sk-your-key" \
221+ -H " Content-Type: application/json" \
222+ -d ' {"chunks": [...]}'
223+ ```
224+
225+ If ` DISTILL_API_KEYS ` is not set, the API is open (suitable for local/internal use).
226+
204227### About OpenAI API Key
205228
206229** When you need it:**
You can’t perform that action at this time.
0 commit comments