Point the OpenAI SDK at Werker Health
Werker Health mirrors the OpenAI API signature. Redirecting an existing OpenAI integration takes two changes:
- Set the base URL to
https://api.werker.health/v1. - Swap your API key to the Werker-issued
WERKER_HEALTH_API_KEY.
No other code changes are required. The SDK methods, request/response structures, and streaming behavior remain identical.
Retrieve Your Werker Health API Key
- Request early access at werker.health.
- Log into the Werker Health admin dashboard.
- Sign the Business Associate Agreement (BAA) presented in the dashboard.
- Generate a
WERKER_HEALTH_API_KEYfor your environment.
SDK Examples
python
from openai import OpenAI
client = OpenAI(
base_url="https://api.werker.health/v1",
api_key="WERKER_HEALTH_API_KEY",
)
response = client.responses.create(
model="gpt-5",
input=[
{"role": "system", "content": "You are a compliance-aware care assistant."},
{"role": "user", "content": "Summarize this visit note for the patient."},
],
metadata={"request_id": "demo-visit-001"},
)
print(response.output_text)ts
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.werker.health/v1",
apiKey: "WERKER_HEALTH_API_KEY",
});
const response = await client.responses.create({
model: "gpt-5",
input: [
{ role: "system", content: "You are a compliance-aware care assistant." },
{ role: "user", content: "Summarize this visit note for the patient." },
],
metadata: { request_id: "demo-visit-001" },
});
console.log(response.output_text);cURL
bash
curl https://api.werker.health/v1/chat/completions \
-H "Authorization: Bearer WERKER_HEALTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5",
"messages": [{"role": "user", "content": "Hello from Werker Health!"}]
}'Replace Secrets Safely
- Store
WERKER_HEALTH_API_KEYin the same secret store you use for other production credentials. - Rotate keys directly from the Werker Health console; no application redeploy is required.
- Configure per-environment base URLs and keys to prevent accidental calls to non-compliant providers.
Next Steps
- Review the
create-model-responseendpoint for model-agnostic structured outputs. - Explore
create-chat-completionto power conversational agents with Werker Health’s compliance guarantees.