Skip to content
WORKSI AI Control

Keep your code. Change two values.

Point any OpenAI client at your gateway and use a Worksi API key. Every model call is then checked, priced and traced, in any language that speaks HTTP.

AIW is the prefix for Worksi keys, headers and packages.

Before → after
2 lines added, 2 removed
import osfrom openai import OpenAI client = OpenAI(    base_url="https://api.openai.com/v1",    base_url="https://gateway.worksi.ai/v1",    api_key=os.environ["OPENAI_API_KEY"],    api_key=os.environ["AIW_API_KEY"],)

The endpoints your code already calls.

Requests and responses keep their OpenAI or Anthropic shape, so the official SDKs and the tools built on them work unchanged.

Supported endpoints
EndpointSupports
POST /v1/chat/completionsStreaming and non‑streaming, with tool calling and structured outputs where the provider supports them
POST /v1/responsesThe Responses API, streaming and non‑streaming, where the provider serves it
POST /v1/embeddingsEmbedding models from your model registry, where the provider serves them
POST /v1/messagesAnthropic’s Messages API, native, for Claude
GET /v1/modelsThe models this key may use
  • Claude answers Chat Completions too: the gateway translates each call to Anthropic’s Messages API and back.
  • Code written for the Anthropic SDK keeps working: set the SDK’s base URL to the gateway root, without /v1.

Attribute every call.

Optional headers name the agent, the workflow and your end user behind a request. Reports, policies and quotas use them.

Attribution headers
HeaderPurpose
X-AIW-AgentThe agent making the call, for per‑agent policies and reports
X-AIW-WorkflowThe business workflow the call belongs to
X-AIW-Run-IdThe workflow run the call belongs to; it defaults to the trace id
X-AIW-End-UserA pseudonymous id of your end user, never an email address
X-AIW-End-User-PlanThat user’s plan in your app, for per‑user quotas
X-AIW-CaptureMakes capture stricter for this call, never looser

Route to the provider you choose.

Add each provider once in the console. deepseek/deepseek-flash sends a call to your DeepSeek credential, and your applications only ever hold a Worksi key.

24 presets from the provider catalog, 23 of them with list prices per 1M tokens from the vendor’s own pages, checked 29 September 2026. Costs are always in USD: CNY prices are converted at 0.1375 USD per yuan by default, an approximate rate.

Providers and routing docs

Global9 presets

Global provider presets
ProviderRoute prefixCatalog
OpenAIChat Completions, Responses, Embeddingsopenai/7 models, USD
Anthropic ClaudeChat Completions, Messagesanthropic/8 models, USD
Google Gemini APIChat Completions, Embeddingsgemini/10 models, USD
Mistral AIChat Completions, Embeddingsmistral/8 models, USD
xAI GrokChat Completions, Responsesxai/6 models, USD
GroqChat Completions, Responsesgroq/4 models, USD
Together AIChat Completionstogether/8 models, USD
OpenRouterChat Completions, Embeddingsopenrouter/8 models, USD
Azure OpenAI (Microsoft Foundry)Chat Completions, Responses, Embeddingsazure-openai/6 models, USD

China13 presets

China provider presets
ProviderRoute prefixCatalog
DeepSeekChat Completions, Responsesdeepseek/2 models, USD or CNY
Qwen (Alibaba Cloud Model Studio, China)Chat Completions, Responses, Embeddingsqwen/7 models, CNY
Qwen (Alibaba Cloud Model Studio, International)Chat Completions, Responses, Embeddingsqwen-intl/7 models, USD
Moonshot AI Kimi (China)Chat Completions, Responseskimi/4 models, CNY
Moonshot AI Kimi (International)Chat Completions, Responseskimi-intl/4 models, USD
Zhipu GLM (BigModel, China)Chat Completions, Embeddingszhipu/7 models, CNY
Z.ai GLM (International)Chat Completionszai/7 models, USD
MiniMaxChat Completions, Responsesminimax/5 models, USD or CNY
Baidu Qianfan (ERNIE)Chat Completions, Responses, Embeddingsqianfan/8 models, CNY
Tencent Hunyuan (TokenHub)Chat Completions, Responses, Embeddingshunyuan/8 models, USD or CNY
ByteDance Doubao (Volcengine Ark)Chat Completions, Responsesdoubao/7 models, CNY
BytePlus ModelArk (Seed, International)Chat Completions, Responsesbyteplus/5 models, USD
StepFunChat Completions, Responsesstepfun/4 models, USD or CNY

Local and self‑hosted2 presets

Local and self‑hosted provider presets
ProviderRoute prefixCatalog
OllamaChat Completions, Responses, Embeddingsollama/24 models, USD
vLLMChat Completions, Responses, Embeddingsvllm/Models you serve
  • Any other server that speaks the OpenAI API, at the base URL you register, with prices you set.
  • The built‑in simulator: offline, free and deterministic, with failures on request through X-AIW-Simulate.

What you get without touching anything else.

The requests your code already sends, now through the gateway.

  • A trace for every call, with latency, tokens and cost.
  • Model allow and deny lists, budgets, token and rate limits.
  • Pause and stop controls that take effect within seconds.
  • Redaction of sensitive values before anything is stored.
  • Incidents for provider outages, timeouts, cost spikes and policy violations.
  • Errors in the OpenAI shape, with codes such as model_not_allowed or agent_paused that your code can handle.
Through the gateway
curl -sN https://gateway.worksi.ai/v1/chat/completions \  -H "Authorization: Bearer $AIW_API_KEY" \  -H "Content-Type: application/json" \  -d '{"model": "gpt-5-mini", "stream": true, "messages":       [{"role": "user", "content": "Count to five"}]}'

Change two values and ship.

Set the base URL and the key. Your prompts, models and response handling stay exactly as they are.

  • 3‑day trial with Pro features, no card.

Keep readingSDKsAI gatewayB2C apps

app.ts
import OpenAI from "openai" const client = new OpenAI({  baseURL: "https://gateway.worksi.ai/v1",  apiKey: process.env.AIW_API_KEY,})