Skip to main content
POST
Chat Completions
The Chat Completions API allows you to interact with various AI models through a secure gateway. It supports streaming, secret detection, and PII masking.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Identifier for the model to use (e.g., openai/gpt-4o, grok/grok-beta)

Available options:
openai/gpt-4o-mini,
openai/gpt-4o,
google/gemini-2.0-flash-exp,
xai/grok-beta,
deepseek/deepseek-chat,
deepseek/deepseek-reasoner
Example:

"openai/gpt-4o"

messages
object[]
required

A list of messages comprising the conversation so far.

stream
boolean
default:false

If set, partial message deltas will be sent as server-sent events.

Enables tools. Defaults to true unless a custom system prompt is used.

pii
enum<string>
default:disabled

Security mode for PII scanning.

Available options:
disabled,
obfuscate,
block
temperature
number
default:0.7

What sampling temperature to use, between 0 and 2.

Required range: 0 <= x <= 2
max_tokens
integer

The maximum number of tokens to generate in the completion.

Response

Successful completion

id
string
object
string
Example:

"chat.completion"

created
integer
model
string
choices
object[]
usage
object