Skip to main content

POST /v1/chat/completions

Drop-in replacement for OpenAI Chat Completions. Change one URL — no SDK change.

Request

POST https://gateway.autraceai.com/v1/chat/completions
Authorization: Bearer aut_live_YOUR_KEY
Content-Type: application/json
{
"model": "openai/gpt-5.5",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "What is 2+2?" }
],
"stream": false,
"temperature": 0.7,
"max_tokens": 1024
}

Streaming

Set "stream": true for Server-Sent Events streaming. The gateway captures the full exchange in the audit log even during streaming.

What happens per call

  1. API key validated
  2. Prompt scanned for PII → redacted
  3. Policy rules evaluated → block or pass
  4. Request forwarded to LiteLLM → LLM provider
  5. Response scanned
  6. Usage logged → hash-sealed in audit chain
  7. Response returned to caller

Supported models

Any model supported by your upstream (OpenRouter by default): openai/gpt-5.5, anthropic/claude-opus-4.8, anthropic/claude-sonnet-4.6, google/gemini-3-pro, x-ai/grok-4.3, meta-llama/llama-4-maverick, and 300+ more.