Send your first query
Outcome: receive a nonempty answer from the backend and identify the model that answered.
Prerequisite: a running backend that passes verification. Use WSL Bash in a second terminal. Start with non-sensitive sample text.
1. Enter your API key for this terminal
Section titled “1. Enter your API key for this terminal”read -rsp 'API key: ' API_KEYechoexport API_KEYEnter the key configured for your backend. This hides the input; it does not change the server. Keep shell tracing off. The current backend logs a token prefix, so use a lab credential.
2. Ask a question
Section titled “2. Ask a question”curl --fail-with-body --silent --show-error \ http://localhost:8000/api/v1/query \ -H "Authorization: Bearer $API_KEY" \ -H 'Content-Type: application/json' \ -d '{"query":"Explain what a Git commit records in two sentences.","user_id":"lab-user"}'3. Read the response
Section titled “3. Read the response”Look for:
| Field | Meaning |
|---|---|
response | The generated answer; text varies between runs |
model | The model actually selected |
routing_info | Selection reason and routing state |
sources | Retrieved documents, if any; an empty result is normal for an empty store |
conversation_id | Thread identifier when memory is enabled; otherwise null |
Success means an HTTP 200 response with a nonempty answer. A healthy /health alone does not demonstrate inference.
If it fails
Section titled “If it fails”403 usually indicates a missing or invalid bearer credential; 422 indicates invalid input; 429 indicates the request limit; 500 can indicate an Ollama or storage error. Check the response and troubleshooting guide. Avoid repeatedly retrying a slow generation.
unset API_KEYNext: Choose a model or complete the API lab.