Anthropic
Base URL
https://desktop-api.wbench.io/v1/proxy/anthropic/
Use https://desktop-api.wbench.io/v1/proxy/anthropic/ where Anthropic's documentation uses https://api.anthropic.com/.
It's Anthropic's own API
Everything after the base URL is Anthropic's Messages API, exactly as Anthropic 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 Anthropic key on the server. You never see that key.
Notes
- Model calls go through Workbench's AI relay:
POST v1/messagesonly, 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 Anthropic key under Company keys.
Examples
Set WB_TOKEN first: export WB_TOKEN=$(wb token).
wb
wb call anthropic v1/messages --data '{"model": "claude-sonnet-5-5", "max_tokens": 512, "messages": [{"role": "user", "content": "Hello"}]}'
curl
curl "https://desktop-api.wbench.io/v1/proxy/anthropic/v1/messages" \
-H "Authorization: Bearer $(wb token)" \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-5-5", "max_tokens": 512, "messages": [{"role": "user", "content": "Hello"}]}'
Python
Install: pip install anthropic.
import os
from anthropic import Anthropic
client = Anthropic(
base_url="https://desktop-api.wbench.io/v1/proxy/anthropic",
auth_token=os.environ["WB_TOKEN"], # your Workbench token, sent as Authorization: Bearer
api_key=None,
)
message = client.messages.create(
model="claude-sonnet-5-5",
max_tokens=512,
messages=[{"role": "user", "content": "Hello"}],
)
print(message.content[0].text)
TypeScript
Install: npm install @anthropic-ai/sdk.
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://desktop-api.wbench.io/v1/proxy/anthropic",
authToken: process.env.WB_TOKEN, // your Workbench token, sent as Authorization: Bearer
apiKey: null,
});
const message = await client.messages.create({
model: "claude-sonnet-5-5",
max_tokens: 512,
messages: [{ role: "user", content: "Hello" }],
});
console.log(message.content);
See Limits and errors for what a refusal looks like.