Skip to content

Developer quickstart

The Arbitex Gateway is OpenAI-compatible: if you have code that calls OpenAI, you can point it at Arbitex by changing two things — the base URL and the API key. Every request is then routed to the provider you name, inspected by the 5-tier DLP pipeline, evaluated against your organization’s policies, and audit-logged — all before it reaches the upstream model.

  • An Arbitex API key (arb_live_…). Create one in the admin console under Users & Access → API keys. The key carries the identity of its owner, so Policy Engine rules that target specific users or groups apply to calls made with it.
  • Any OpenAI-compatible client, or just curl.

Send a standard OpenAI chat-completions request to the Arbitex base URL. The model field uses the provider/model-id format to name the provider and model explicitly:

Terminal window
curl https://api.arbitex.ai/v1/chat/completions \
-H "Authorization: Bearer arb_live_your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"model":"anthropic/claude-sonnet-4-20250514","messages":[{"role":"user","content":"Say hello in one sentence."}]}'

A successful response is the standard OpenAI shape, with two Arbitex additions in the response headers:

  • X-Policy-Action — the terminal Policy Engine decision (ALLOW, BLOCK, REDACT, ROUTE_TO, CANCEL).
  • X-Matched-Rule — the rule that matched (omitted when the action is ALLOW).

Because the gateway is a superset of the OpenAI API, the official SDKs work with only a base-URL and key change.

Python

from openai import OpenAI
client = OpenAI(
api_key="arb_live_your-api-key-here",
base_url="https://api.arbitex.ai/v1",
)
resp = client.chat.completions.create(
model="anthropic/claude-sonnet-4-20250514",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(resp.choices[0].message.content)

Node.js

import OpenAI from "openai";
const client = new OpenAI({
apiKey: "arb_live_your-api-key-here",
baseURL: "https://api.arbitex.ai/v1",
});
const resp = await client.chat.completions.create({
model: "anthropic/claude-sonnet-4-20250514",
messages: [{ role: "user", content: "Say hello in one sentence." }],
});
console.log(resp.choices[0].message.content);

Your request passed through the gateway before reaching the provider:

  1. DLP inspection — the request was scanned by the 5-tier DLP pipeline. Sensitive content can be redacted inline; when streaming, you may see dlp_correction and output_blocked events in the stream.
  2. Policy evaluation — your organization’s Policy Engine chain ran. If the terminal action is BLOCK, the call returns 403 policy_block instead of a completion.
  3. Routing — the gateway forwarded the request to the provider named in model, applying any routing or fallback rules your admins configured.
  4. Audit — the request and its decision were recorded to the tamper-evident audit log.