OpenClaw
Configure OpenClaw to use naxxen as a proxy for all LLM providers.
OpenClaw supports custom provider base URLs. You can create naxxen-proxied providers alongside your direct ones.
How it works
- OpenClaw sends requests to
https://api.naxxen.ai/nxn-sk-YOUR_KEY/v1/chat/completions(or/v1/responses,/v1/messages, etc.) - naxxen strips the key from the path, compresses the prompt, and forwards to the real provider
- The response streams back through naxxen to OpenClaw
Both OpenAI endpoints (/v1/chat/completions and /v1/responses) are fully supported.
Configuration
Edit your OpenClaw config file (usually ~/.openclaw/openclaw.json). Add providers under models.providers — each provider is a keyed object (not an array entry).
The URL path prefix method embeds your naxxen key in the base URL. OpenClaw sends the provider API key in headers as usual.
Important notes
- Provider entries go under
models.providersas named keys (e.g."naxxen-openai": { ... }) - Each model needs
id,name,contextWindow, andmaxTokens - Set
costto0for all fields — naxxen tracks usage in its own dashboard - GPT-5.4 models need
"compat": { "maxTokensField": "max_completion_tokens" } - The
apifield must match the provider type exactly
Full examples
Replace nxn-sk-YOUR_NAXXEN_KEY with your actual naxxen API key. Replace the provider API keys with your own.
OpenAI via naxxen
"naxxen-openai": {
"baseUrl": "https://api.naxxen.ai/nxn-sk-YOUR_NAXXEN_KEY",
"apiKey": "sk-proj-YOUR_OPENAI_KEY",
"api": "openai-completions",
"models": [
{
"id": "gpt-4o",
"name": "GPT-4o (naxxen)",
"api": "openai-completions",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 128000,
"maxTokens": 16384
},
{
"id": "gpt-4o-mini",
"name": "GPT-4o Mini (naxxen)",
"api": "openai-completions",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 128000,
"maxTokens": 16384
},
{
"id": "gpt-5.4",
"name": "GPT-5.4 (naxxen)",
"api": "openai-completions",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 1048576,
"maxTokens": 32768,
"compat": { "maxTokensField": "max_completion_tokens" }
},
{
"id": "gpt-5.4-mini",
"name": "GPT-5.4 Mini (naxxen)",
"api": "openai-completions",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 1048576,
"maxTokens": 32768,
"compat": { "maxTokensField": "max_completion_tokens" }
}
]
}Anthropic via naxxen
"naxxen-anthropic": {
"baseUrl": "https://api.naxxen.ai/nxn-sk-YOUR_NAXXEN_KEY",
"apiKey": "sk-ant-YOUR_ANTHROPIC_KEY",
"api": "anthropic-messages",
"models": [
{
"id": "claude-opus-4-6",
"name": "Claude Opus 4.6 (naxxen)",
"api": "anthropic-messages",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 1000000,
"maxTokens": 32768
},
{
"id": "claude-sonnet-4-6",
"name": "Claude Sonnet 4.6 (naxxen)",
"api": "anthropic-messages",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 200000,
"maxTokens": 8192
},
{
"id": "claude-haiku-4-5-20251001",
"name": "Claude Haiku 4.5 (naxxen)",
"api": "anthropic-messages",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 200000,
"maxTokens": 8192
}
]
}Google via naxxen
"naxxen-google": {
"baseUrl": "https://api.naxxen.ai/nxn-sk-YOUR_NAXXEN_KEY",
"apiKey": "YOUR_GOOGLE_API_KEY",
"api": "google-generative-ai",
"models": [
{
"id": "gemini-2.5-pro",
"name": "Gemini 2.5 Pro (naxxen)",
"api": "google-generative-ai",
"reasoning": false,
"input": ["text"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 1048576,
"maxTokens": 8192
},
{
"id": "gemini-2.5-flash",
"name": "Gemini 2.5 Flash (naxxen)",
"api": "google-generative-ai",
"reasoning": false,
"input": ["text"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 1048576,
"maxTokens": 8192
},
{
"id": "gemini-2.5-flash-lite",
"name": "Gemini 2.5 Flash Lite (naxxen)",
"api": "google-generative-ai",
"reasoning": false,
"input": ["text"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 1048576,
"maxTokens": 8192
}
]
}Where to put it
These provider blocks go inside models.providers in your ~/.openclaw/openclaw.json:
{
"models": {
"providers": {
"naxxen-openai": { ... },
"naxxen-anthropic": { ... },
"naxxen-google": { ... }
}
}
}You can add naxxen providers alongside your existing direct providers. They don't replace anything — OpenClaw lets you pick which provider/model to use per request.
Allow the models
After adding providers, you must allow the naxxen models in your agent config. Under agents.defaults.models, add each model you want to use:
{
"agents": {
"defaults": {
"models": {
"naxxen-openai/gpt-5.4": {},
"naxxen-openai/gpt-4o": {},
"naxxen-anthropic/claude-sonnet-4-6": {},
"naxxen-google/gemini-2.5-flash": {},
}
}
}
}Without this step, OpenClaw will reject the model with "Model is not allowed".
Using a naxxen model
Once configured and allowed, reference naxxen models with the provider prefix:
naxxen-openai/gpt-5.4
naxxen-anthropic/claude-sonnet-4-6
naxxen-google/gemini-2.5-flashOr set one as your default model:
{
"agents": {
"defaults": {
"model": {
"primary": "naxxen-openai/gpt-5.4"
}
}
}
}Verify
After configuring, restart OpenClaw (openclaw gateway restart) and make a request using one of your naxxen providers. Then check your dashboard — you should see the request with compression stats.
Using OpenAI Responses API instead of Chat Completions?
If you're using OpenAI with the newer Responses API (/v1/responses), use "api": "openai-responses" instead of "openai-completions":
"naxxen-openai": {
"baseUrl": "https://api.naxxen.ai/nxn-sk-YOUR_NAXXEN_KEY",
"apiKey": "sk-proj-YOUR_OPENAI_KEY",
"api": "openai-responses",
"models": [
{
"id": "gpt-5.4",
"name": "GPT-5.4 (naxxen)",
"api": "openai-responses",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 1048576,
"maxTokens": 32768,
"compat": { "maxTokensField": "max_completion_tokens" }
}
]
}Most users should stick with "openai-completions" — it works with both API keys and the Chat Completions endpoint. Use "openai-responses" only if your setup specifically requires the Responses API.
Note: OpenAI Codex OAuth (ChatGPT subscription) uses a proprietary endpoint (chatgpt.com/backend-api) that cannot be proxied through naxxen. Codex OAuth is only supported as a direct connection via OpenClaw's built-in openai-codex provider.
Common mistakes
| Mistake | Fix |
|---|---|
| Provider as array entry | Providers are keyed objects under models.providers, not array items |
Missing contextWindow | Every model needs contextWindow (in tokens) |
Missing maxTokens | Every model needs maxTokens (max output tokens) |
Wrong api value | Must be exactly openai-completions, anthropic-messages, or google-generative-ai |
GPT-5.4 without compat | GPT-5.4/5.4-mini need "compat": { "maxTokensField": "max_completion_tokens" } |
Using name at provider level | Provider name is the key (e.g. "naxxen-openai"), not a field inside the object |
Set up with an AI agent
Copy this prompt and give it to your AI coding agent:
Read https://docs.naxxen.ai/docs/integrations/openclaw and configure naxxen
as a proxy for my OpenAI, Anthropic, and Google API calls in OpenClaw.
My naxxen key is nxn-sk-YOUR_KEY.
Add the naxxen-openai, naxxen-anthropic, and naxxen-google providers
to my ~/.openclaw/openclaw.json config under models.providers.
Use the exact JSON examples from the docs — do not simplify or omit fields.