Connect PrivatAI to OpenClaw

OpenClaw is a popular open-source framework for AI agents. By default, it sends every request your agent makes to whichever model provider you configure — often servers in the US. For sensitive data or GDPR requirements, that's a problem.

The good news: PrivatAI is OpenAI-compatible. You don't have to change your agent logic — just swap the endpoint. After that, every prompt stays within EU infrastructure.

flowchart LR
    A[Your Agent] -->|default| B[US Provider]
    A -->|with PrivatAI| C[PrivatAI EU]
    C --> D[Private EU Model]

Prerequisites

  • A PrivatAI account with an active plan (sign up here)
  • An API key from your dashboard (starts with privat_)
  • A running OpenClaw installation

Step 1: Create an API key

Sign in, open the dashboard, and create an API key. Copy it immediately — it's shown only once.

Step 2: Point the endpoint at PrivatAI

OpenClaw uses an OpenAI-compatible interface. Set the base URL and key to PrivatAI — as environment variables:

export OPENAI_API_BASE="https://privatai.com/api/v1"
export OPENAI_API_KEY="privat_your_key"

…or directly in the config. Choose gpt-oss-120b as the model (on any plan) or glm-5.2 (Professional):

# openclaw config
provider: openai
base_url: https://privatai.com/api/v1
api_key: privat_your_key
model: gpt-oss-120b

Step 3: Test it

A quick test confirms everything works:

curl -X POST https://privatai.com/api/v1/chat/completions \
  -H "Authorization: Bearer privat_your_key" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-oss-120b", "messages": [{"role": "user", "content": "Hello!"}]}'

If you get a reply, the integration is done.

That's it

Your agent runs exactly as before — but every request to the model now goes to a private EU model instead of US servers. No storage, no training on your data, no US CLOUD Act.

One risk vector removed: the model provider.