OpenAI-compatible chat completions with policy enforcement
Accepts a standard OpenAI Chat Completions request, decides it with the ADR-065 decision plane (PRD v11 §1.1; #4092) - the shared policy engine's detectors are its input - forwards an allowed request to the upstream provider, records audit (tokens, cost, latency, policy decision), and returns an OpenAI-compatible response.
The route carries no per-user identity, so every request is decided for its client credential (Client). OpenAI's user request member is NOT honoured as an identity: it is free text the caller chooses, and a principal is never taken from it.
The caller passes their upstream provider API key via the X-Provider-Key header. AxonFlow auth (Basic Auth or community mode) is handled by the same apiAuthMiddleware as all other agent endpoints.
Streaming (stream: true) is not supported in this release and returns HTTP 400 with a clear error.
Request
- Base URLhttps://agent.getaxonflow.com
- Authnone declared. Required headers: X-Provider-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Upstream LLM provider API key (e.g. OpenAI API key)
W3C traceparent header for trace correlation
Request body
Example request
{
"model": "gpt-4o"
}Response
Successful completion
Example response
{
"id": "chatcmpl-abc123"
}Changes
No recorded changes to this operation across all 1 revision of this API.