# openrouter-secrets An OpenAI-compatible chat endpoint for DeepSeek V4.1 Flash on OpenRouter. The capsule only forwards requests; m64's gate adds the OpenRouter key on the way out, so the capsule never holds it. Base URL: `{{BASE_URL}}` ## Routes | Method | Path | What | | --- | --- | --- | | POST | `/v1/chat/completions` | chat completions, streaming or not | | GET | `/v1/models` | one model: `deepseek-v4.1-flash` | | GET | `/status` | phase (`ready` when usable) | | GET | `/human/` | a page for people | ```sh curl -s {{BASE_URL}}/v1/chat/completions {{AUTH}} \ -H 'Content-Type: application/json' \ -d '{"messages":[{"role":"user","content":"Say hi"}],"max_tokens":50}' curl -N {{BASE_URL}}/v1/chat/completions {{AUTH}} \ -H 'Content-Type: application/json' \ -d '{"messages":[{"role":"user","content":"Count to 5"}],"stream":true}' ``` Accepted fields: `messages` (required), `tools`, `tool_choice`, `response_format`, `max_tokens`, `stream`, `seed`. Others, like `temperature`, get a 400. The model is always DeepSeek V4.1 Flash, whatever `model` says. ## Timings and errors - Ready in a few seconds. Answers take as long as OpenRouter takes. - OpenRouter's errors keep their status and body: 401 means the key is missing or wrong, 429 a rate limit. - 502 means openrouter.ai could not be reached: the capsule was served without `--allow-external-network`. - Requests are handled in parallel. Every request spends credit on the key's OpenRouter account.