Skip to main content
POST
/
api
/
v1
/
chat
/
completions
Chat Completions
curl --request POST \
  --url https://onefirewall.ai/api/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "openai/gpt-4o",
  "messages": [
    {
      "role": "system",
      "content": "<string>"
    }
  ],
  "stream": false,
  "system": "<string>",
  "web_search": true,
  "pii": "disabled",
  "temperature": 0.7,
  "max_tokens": 123
}
'
{
  "id": "<string>",
  "object": "chat.completion",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "role": "<string>",
        "content": "<string>"
      },
      "finish_reason": "<string>"
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  }
}
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.

system
string

Optional system prompt to override the default gateway behavior.

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