The chat-completions endpoint is a drop-in replacement forDocumentation Index
Fetch the complete documentation index at: https://docs.axiomancer.io/llms.txt
Use this file to discover all available pages before exploring further.
https://api.openai.com/v1/chat/completions. The wire format is identical; the routing, logging, and cost accounting happens server-side.
Endpoint
Request body
Standard OpenAI shape —model, messages, temperature, max_tokens, stream, tools, etc. RouteShift adds two optional extension fields under metadata:
| Field | Type | Effect |
|---|---|---|
metadata.route_hint | string | Overrides the rule chain and pins this request to the named alias. |
metadata.session_id | string | Forces session stitching to use this ID instead of inferring one. Useful when you already have a conversation ID upstream. |
metadata is preserved into request_logs.metadata for downstream analytics.
Streaming
Set"stream": true to receive Server-Sent Events. The format matches OpenAI’s data: { ... }\n\n chunks. RouteShift relays chunks as they arrive from upstream — no extra buffering — and writes the request log when the stream closes.
Examples
Response headers
Beyond the standard OpenAI response, RouteShift adds:X-RouteShift-Resolved-Model— the upstream model that actually served the request (after aliases and rule chain).X-RouteShift-Provider— provider name.X-RouteShift-Cost-Microcents— actual cost in microcents.X-RouteShift-Session-Id— session ID this request was stitched into.
request_logs so you can correlate client-side observability with the dashboard.