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.
Prerequisites
Section titled “Prerequisites”- 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.
1. Make your first call
Section titled “1. Make your first call”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:
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 isALLOW).
2. Use the OpenAI SDK
Section titled “2. Use the OpenAI SDK”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);3. Understand what happened
Section titled “3. Understand what happened”Your request passed through the gateway before reaching the provider:
- DLP inspection — the request was scanned by the 5-tier DLP pipeline. Sensitive content can be redacted inline; when streaming, you may see
dlp_correctionandoutput_blockedevents in the stream. - Policy evaluation — your organization’s Policy Engine chain ran. If the terminal action is
BLOCK, the call returns403 policy_blockinstead of a completion. - Routing — the gateway forwarded the request to the provider named in
model, applying any routing or fallback rules your admins configured. - Audit — the request and its decision were recorded to the tamper-evident audit log.
Next steps
Section titled “Next steps”- Authentication — API keys, RS256/JWT, and OAuth M2M.
- Errors & status codes — the full error catalog and what to retry.
- Rate limits — limit headers and backoff.
- Chat completions — streaming, DLP events, every field.