Skip to content

Point the OpenAI SDK at Werker Health

Werker Health mirrors the OpenAI API signature. Redirecting an existing OpenAI integration takes two changes:

  1. Set the base URL to https://api.werker.health/v1.
  2. 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

  1. Request early access at werker.health.
  2. Log into the Werker Health admin dashboard.
  3. Sign the Business Associate Agreement (BAA) presented in the dashboard.
  4. Generate a WERKER_HEALTH_API_KEY for 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_KEY in 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