Skip to content

Chat Completions

OpenAI-compatible endpoint. Every call passes through the governance pipeline.

Terminal window
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"}]}'

Standard OpenAI format: model, messages, temperature, max_tokens, stream, tools, etc.

HeaderDescription
X-TapPass-FlagsGovernance flags (mode=observe, pii=mask)
X-TapPass-SessionSession ID for multi-turn taint tracking

Standard OpenAI ChatCompletion response, plus:

  • x-tappass-classification header with data classification
  • x-tappass-token header with signed capability token
  • x-tappass-pipeline-steps header with step count

"stream": true is fully supported. The response is buffered, scanned, and re-chunked.

POST /v1/messages: Anthropic Messages API format, same governance pipeline.