Skip to main content
POST
Create a chat completion

Authorizations

Authorization
string
header
required

Your hpx_ API key as a Bearer token, so OpenAI-compatible SDKs work unmodified. X-API-Key and first-party JWTs are also accepted.

Body

model
string
required

A model id from the registry. External keys may only use models approved for PHI traffic.

Minimum string length: 1
messages
object[]
required
max_tokens
integer
default:1024
Required range: 1 <= x <= 32000
temperature
number<double> | null
top_p
number<double> | null
stop
string | null
Minimum string length: 1
stream
boolean
default:false
redact_only
boolean
default:false

Return the model's answer WITHOUT substituting your values back (placeholders remain). Required if you want streaming, and useful when the answer is going somewhere that should not hold PHI.

tools
object[]

OpenAI-style function tools. Forwarded to the model; returned tool_calls come back with your values re-hydrated.

tool_choice
any

"auto" (default) or "none". Forcing a specific call ("required", or a named function) is refused rather than downgraded to "auto", so a forced call never appears to have been honoured when it was not.

conversation_key
string

Supply the same value across turns so a given person keeps the same placeholder; multi-turn clients resend history and renaming mid-conversation confuses the model.

Maximum string length: 200

Response

chat.completion with a redaction receipt attached