OpenAI
Base URL
https://desktop-api.wbench.io/v1/proxy/openai/
Use https://desktop-api.wbench.io/v1/proxy/openai/ where OpenAI's documentation uses https://api.openai.com/.
It's OpenAI's own API
Everything after the base URL is OpenAI's Responses API, exactly as OpenAI documents it: the same paths, methods, query parameters and JSON bodies. Only the address and the credential change: you send your Workbench token, and Workbench adds your company's OpenAI key on the server. You never see that key.
Notes
- Model calls go through Workbench's AI relay:
POST v1/responsesonly (not Chat Completions), metered against your company's and your own monthly AI budget, with the models your company allows. Other paths, such asGET v1/models, take GET only.stream: truestreams the answer, metered the same way. - The connection works once a company admin has added your company's OpenAI key under Company keys.
Examples
Set WB_TOKEN first: export WB_TOKEN=$(wb token).
wb
wb call openai v1/responses --data '{"model": "gpt-6.1-sol", "input": "Hello"}'
curl
curl "https://desktop-api.wbench.io/v1/proxy/openai/v1/responses" \
-H "Authorization: Bearer $(wb token)" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-6.1-sol", "input": "Hello"}'
Python
Install: pip install openai.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://desktop-api.wbench.io/v1/proxy/openai/v1",
api_key=os.environ["WB_TOKEN"], # your Workbench token, sent as Authorization: Bearer
)
response = client.responses.create(model="gpt-6.1-sol", input="Hello")
print(response.output_text)
TypeScript
Install: npm install openai.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://desktop-api.wbench.io/v1/proxy/openai/v1",
apiKey: process.env.WB_TOKEN, // your Workbench token, sent as Authorization: Bearer
});
const response = await client.responses.create({ model: "gpt-6.1-sol", input: "Hello" });
console.log(response.output_text);
See Limits and errors for what a refusal looks like.