Compatible now

1. Create an identity

Create a SafetyRouter API key for this agent or employee. Use tags such as FinanceProjectOne to connect its audit activity to a project.

2. Protect the key

export SAFETYROUTER_API_KEY='sr_live_...'

3. Add a custom provider

Add this fragment to your OpenClaw configuration. Use the exact upstream model name allowed by your SafetyRouter tenant.

{
  models: {
    mode: "merge",
    providers: {
      safetyrouter: {
        baseUrl: "https://your-company.safetyrouter.io/v1",
        apiKey: "${SAFETYROUTER_API_KEY}",
        api: "openai-completions",
        models: [{
          id: "provider/model-name",
          name: "Model via SafetyRouter",
          reasoning: false,
          input: ["text"],
          contextWindow: 128000,
          maxTokens: 8192
        }]
      }
    }
  },
  agents: {
    defaults: {
      model: { primary: "safetyrouter/provider/model-name" }
    }
  }
}
Running on your LAN?

Replace the hosted URL with http://192.168.166.105:8000/v1. Only expose that port to trusted network segments and keep a real SafetyRouter key configured.

Use the tested OpenClaw path

Select openai-completions. SafetyRouter's Responses endpoint is designed and tested for Codex; OpenClaw's documented Chat Completions adapter remains its supported route here.

Configuration fields verified against the official OpenClaw custom-provider documentation.

Buffered-safety timeout

Allow up to 15 minutes

SafetyRouter intentionally waits for input review, model generation, and output review before releasing model content. Where your client exposes request, response-header, socket-read, or stream-idle timeouts, set them to at least 900000 ms or 900 seconds. Keep streaming enabled. A longer timeout preserves the safety boundary; it does not bypass inspection.