Developers
Connect in about ten minutes.
Point your OpenAI or Anthropic client at the Worksi gateway. Your code stays the same, and every call becomes a trace.
import osfrom openai import OpenAI client = OpenAI( base_url="https://gateway.worksi.ai/v1", api_key=os.environ["AIW_API_KEY"], # name the agent and the workflow behind every call default_headers={ "X-AIW-Agent": "support-bot", "X-AIW-Workflow": "customer-chat", },) reply = client.chat.completions.create( model="gpt-5-mini", messages=[ {"role": "user", "content": "Where is my order?"}, ],)print(reply.choices[0].message.content)import OpenAI from "openai" const client = new OpenAI({ baseURL: "https://gateway.worksi.ai/v1", apiKey: process.env.AIW_API_KEY, // name the agent and the workflow behind every call defaultHeaders: { "X-AIW-Agent": "support-bot", "X-AIW-Workflow": "customer-chat", },}) const reply = await client.chat.completions.create({ model: "gpt-5-mini", messages: [{ role: "user", content: "Where is my order?" }],})console.log(reply.choices[0]?.message.content)curl -si https://gateway.worksi.ai/v1/chat/completions \ -H "Authorization: Bearer $AIW_API_KEY" \ -H "Content-Type: application/json" \ -H "X-AIW-Agent: support-bot" \ -H "X-AIW-Workflow: customer-chat" \ -d '{"model": "gpt-5-mini", "messages": [{"role": "user", "content": "Where is my order?"}]}' # the response headers include X-AIW-Trace-Id# and X-AIW-Cost-USDEvery response includes X-AIW-Trace-Id. Non-streaming calls also include X-AIW-Cost-USD.
Architecture
The path of a request.
Your code talks to the gateway as if it were your provider. Nothing else in your app changes.
- Start the trial3 days of Scale features, no card. Sign‑up creates a workspace with development, staging and production environments.
- Connect a providerPick from 24 provider presets, paste your key and test the connection. Or skip it and use the built‑in simulator.
- Create an API keyKeys start with aiw_sk_live_ in production and aiw_sk_test_ in development and staging, and are shown once. Keep them in a secret manager.
- Point your client at the gatewaySet the base URL and key. The X-AIW-Agent and X-AIW-Workflow headers are optional.
- Open your first traceFind it under Operations, then Traces. Traces appear within one to two seconds.
# Governance → API keys (the key is shown once)export OPENAI_API_KEY="aiw_sk_live_…"export OPENAI_BASE_URL="https://gateway.worksi.ai/v1"Then point your client at https://gateway.worksi.ai/v1 with that key, as in the code at the top of this page.
Ways to connect
Start with one. Add the rest when you need them.
Integrations and connectivity
Works with the stack you already have.
Bring your own provider keys. Providers bill you directly, and Worksi doesn’t mark up tokens.
All integrationsOpenAI‑compatible gateway
Base URL https://gateway.worksi.ai/v1. Streaming, tool calling, the Responses API and embeddings work where your provider supports them.
- POST /v1/chat/completions
- POST /v1/responses
- POST /v1/embeddings
- GET /v1/models
Anthropic Messages API
Point the Anthropic SDK at https://gateway.worksi.ai, with no /v1, and use the same key.
- POST /v1/messages
Python and TypeScript SDKs
Trace whole workflows: runs, steps, tools, approvals and outcomes.
The SDKsMCP
Governed tool access for AI assistants and agents. Tool policies apply at the MCP gateway too.
- Claude Desktop
- Cursor
- VS Code
24 provider presets
OpenAI, Claude, DeepSeek, Qwen, Ollama, vLLM and any OpenAI‑compatible server. Pick a provider per call with a prefix, like deepseek/deepseek-flash.
Providers and routing| Client style | How to authenticate |
|---|---|
| OpenAI SDKs | Authorization: Bearer |
| Anthropic SDK | x-api-key |
| Azure‑style clients | api-key |
The gateway
Every call passes 8 checks, in order.
If a check fails, the gateway returns a clear status code. Telemetry is off the request path: if the pipeline is down, the gateway buffers spans and your requests continue.
Explore the gateway- Request in
- Body sizefails with 413
- API keyfails with 401
- Modelfails with 403
- Pause, stopfails with 423 · 409
- Plan & policyfails with 402 · 403 · 429
- Rate limitfails with 429
- Providerfails with 502 · 504
- Forwarded to your provider
Tracing
See every run, not just every request.
Each run becomes one trace with its agents, steps, model calls and tools. Every model call is timed and priced, agent by agent.
Explore observability- Triagetriage-agentmodelgpt-5-mini156 ms · 210 in, 183 out tokens · $0.00042
- Researchresolver-agentembeddingstoolsearch_kbtoollookup_order
- Refundrefund-agentmodelgpt-5-nanotoolissue_refund
- Draft replyresolver-agentmodelgpt-5
- Notifyresolver-agenttoolsend_email
Policies
Monitor first. Enforce when you’re sure.
Model, spend, token and rate policies and end‑user quotas are included from the Startup plan; tool allowlists, tool approvals and model‑access approvals from Scale. Data capture settings are on every plan.
Policies in the docsExample: a production model allowlist in monitor mode. A call to gpt-4o still returns 200 with X-AIW-Model: gpt-4o, and the span records aiw.violation = "model_allowlist".
| Control | Send or set | What the gateway returns |
|---|---|---|
| Per‑end‑user limits | X-AIW-End-User, X-AIW-End-User-Plan | 429 end_user_quota_exceeded |
| Pause an agent | From the console | 423 agent_paused |
| Stop a run | From the console | 409 run_stopped |
| Plan quota reached | Set by your plan | 429 plan_quota_exceeded |
| No active plan | Set by your plan | 402 subscription_inactive |
Benchmarks
Tested, with the conditions shown.
Our own load test of the gateway and span ingestion, and our failure benchmark, run on 24 September 2026.
| Metric | Result | Test conditions |
|---|---|---|
| Gateway overhead, p95 | 0.82 ms | Non-streaming chat completions ramped to 200 requests/s; 55,806 requests, 0 failures. How we measured — how we measured gateway overhead, p95 |
| Streaming time to first byte, p95 | 1.09 ms | Streaming chat completions ramped to 100 streams/s; 27,906 streams, 0 failures. How we measured — how we measured streaming time to first byte, p95 |
| Span ingestion on one replica | 2,000 spans/s | 360,000 spans in batches of 100; p95 request time 6.9 ms, 0 rejected spans. How we measured — how we measured span ingestion on one replica |
| Failure scenarios detected | 8 / 8 | Tool failure, agent loop, repeated tool call, timeout, provider outage, cost spike, stuck workflow, policy violation. How we measured — how we measured failure scenarios detected |
| False alarms | 0 in 6 healthy runs | Healthy runs executed in the same benchmark round raised no incident. How we measured — how we measured false alarms |
| Median time to detect | 1.1 s | From the failing call to an open incident; the stuck-workflow case waits for its 60 s threshold. How we measured — how we measured median time to detect |
Setup
Single-replica Docker Compose stack on a 12 vCPU / 16 GB Linux host (gateway limited to 1.5 CPU / 512 MiB), load generated with k6. The built‑in simulator provider answered model calls with a pinned 1 ms latency so the gateway’s own overhead could be isolated.
What the test did not cover
- Real provider latency and errors (simulator only)
- Multiple replicas
- Cloud networking, TLS termination and managed data stores
- Multi-hour soak tests
Start building in about ten minutes.
Follow the quickstart, or talk to us about your stack.