> Talon release: v1.17.0 (410f1015a621326e722ebfb0fb9e84adf2a6a6dc) > Canonical page: https://dativo.io/talon/docs/proxy-quickstart/ > Release source: docs/tutorials/proxy-quickstart.md > Publication details: https://dativo.io/talon/docs/publication.json # Tutorial: OpenAI proxy quickstart Use this path when you already have an app using an OpenAI-compatible SDK and want Talon governance without writing gateway YAML. ## 1) Start Talon quickstart mode ```bash talon serve --proxy-quickstart --port 8080 ``` By default Talon binds `127.0.0.1` and enables: - `POST /v1/chat/completions` - `POST /v1/responses` ## 2) Point your app to Talon ```bash export OPENAI_BASE_URL=http://127.0.0.1:8080/v1 export OPENAI_API_KEY=sk-your-key ``` If your SDK already appends `/v1`, set `OPENAI_BASE_URL=http://127.0.0.1:8080` instead. Your app keeps using the OpenAI SDK. Talon is now in the request path. ## 3) Test with curl ```bash curl -sS http://127.0.0.1:8080/v1/chat/completions \ -H "Authorization: Bearer sk-test" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"hello"}]}' ``` Responses API: ```bash curl -sS http://127.0.0.1:8080/v1/responses \ -H "Authorization: Bearer sk-test" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4o-mini","input":"hello"}' ``` ## 4) Verify governance evidence ```bash talon audit list --tenant quickstart --limit 5 ``` Look for: - `tenant_id=quickstart` - `agent_id=quickstart-local` - `upstream_auth_mode=client_bearer` - `upstream_key_source=openai_api_key_env` when no bearer was sent and env fallback was used ## Behavior notes - Policy is always enforced; the former `TALON_QUICKSTART_MODE=shadow` opt-in was removed in #442 and a non-empty value is rejected at startup with migration guidance. - PII default action is `redact` on the request path and `warn` on the response path: streaming responses are delivered immediately and observed after delivery (post-delivery observation in evidence, never buffering). - Key source precedence: client bearer > `OPENAI_API_KEY` > 401. - Partial OpenAI compatibility: only chat completions and responses create endpoints are supported at host root. ## Troubleshooting - `401` with `no upstream credential: set OPENAI_API_KEY or send Authorization: Bearer ...` means Talon did not receive any usable upstream key. Send a bearer token from the client or set `OPENAI_API_KEY` in the Talon process. - Model denied in policy means quickstart's default allowlist blocked it. Default models are `gpt-4o-mini` and `gpt-4o`. For local-only testing, set `TALON_QUICKSTART_ALLOW_ALL_MODELS=1`. - `404` for `/v1/embeddings` or `GET /v1/responses/{id}` is expected in v1 quickstart scope. See [Reference: proxy quickstart](https://dativo.io/talon/docs/proxy-quickstart/#behavior-notes). - Startup bind error on non-loopback host requires `--unsafe-listen` in quickstart mode. This is recorded in evidence via the `quickstart_unsafe_listen` annotation and is intended for local/dev exceptions. For production gateway rollout, use `--gateway` and [gateway guides](https://dativo.io/talon/docs/add-talon-to-existing-app/).