Chat Completions
OpenAI-compatible endpoint. Every call passes through the governance pipeline.
POST /v1/chat/completions
Section titled “POST /v1/chat/completions”curl http://localhost:9620/v1/chat/completions \ -H "Authorization: Bearer tp_..." \ -H "Content-Type: application/json" \ -d '{"model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Hello"}]}'Request body
Section titled “Request body”Standard OpenAI format: model, messages, temperature, max_tokens, stream, tools, etc.
Governance headers
Section titled “Governance headers”| Header | Description |
|---|---|
X-TapPass-Flags | Governance flags (mode=observe, pii=mask) |
X-TapPass-Session | Session ID for multi-turn taint tracking |
Response
Section titled “Response”Standard OpenAI ChatCompletion response, plus:
x-tappass-classificationheader with data classificationx-tappass-tokenheader with signed capability tokenx-tappass-pipeline-stepsheader with step count
Streaming
Section titled “Streaming”"stream": true is fully supported. The response is buffered, scanned, and re-chunked.
Anthropic
Section titled “Anthropic”POST /v1/messages: Anthropic Messages API format, same governance pipeline.