← Back to Support Overview

NETVARA KNOWLEDGE BASE

How to Use Netvara Client with OpenClaw

How to Use Netvara Client with OpenClaw

Overview

OpenClaw can route model completions through Netvara Client by using its local OpenAI-compatible endpoint. This lets your OpenClaw agent use the models currently advertised by Netvara Client.

The local endpoint is:

http://127.0.0.1:8091/v1

Prerequisites

  • Netvara Client is installed and running.
  • OpenClaw is installed and configured on your computer.
  • At least one model is visible through Netvara Client.
  • The local authentication token is available at ~/.netvara-client/local_api_key.

Step-by-Step Instructions

1. Choose a model

List the models available from Netvara Client:

curl -sS \
  -H "Authorization: Bearer $(cat ~/.netvara-client/local_api_key)" \
  http://127.0.0.1:8091/v1/models

Copy the model ID you want to use.

2. Configure OpenClaw

Open your OpenClaw agent configuration and set the OpenAI-compatible provider’s base URL, token, model, and context length. A typical configuration looks like this:

model:
  provider: openai-compatible
  base_url: http://127.0.0.1:8091/v1
  api_key: ${NETVARA_LOCAL_TOKEN}
  name: your-local-model
  context_length: 32768

If your OpenClaw version uses JSON, the equivalent settings are:

{
  "model": {
    "provider": "openai-compatible",
    "base_url": "http://127.0.0.1:8091/v1",
    "api_key": "${NETVARA_LOCAL_TOKEN}",
    "name": "your-local-model",
    "context_length": 32768
  }
}

Use the configuration keys provided by your installed OpenClaw version if their names differ. The important values are the base URL, bearer token, model ID, and context length.

Set the token in the environment used to launch OpenClaw rather than placing the literal token in a shared configuration file:

export NETVARA_LOCAL_TOKEN="$(cat ~/.netvara-client/local_api_key)"

Restart OpenClaw after saving the configuration.

3. Test the provider directly

Before testing agent actions, verify the endpoint and authentication:

curl -sS \
  -H "Authorization: Bearer $(cat ~/.netvara-client/local_api_key)" \
  -H "Content-Type: application/json" \
  http://127.0.0.1:8091/v1/chat/completions \
  -d '{
    "model": "your-local-model",
    "messages": [{"role": "user", "content": "Reply with: OpenClaw connection confirmed."}],
    "max_tokens": 32
  }'

4. Run an OpenClaw agent action

Start OpenClaw using the updated configuration and ask it to perform a small, reversible action, such as explaining the current project structure or listing a permitted directory. Avoid destructive actions during the first test.

Verification

  • The /v1/models request returns the selected model ID.
  • The direct chat completion returns a response.
  • OpenClaw starts without a provider or authentication error.
  • A small OpenClaw agent action completes and produces a response.
  • The OpenClaw status or configuration view shows the Netvara-compatible provider and selected model.

Troubleshooting & Common Questions

OpenClaw reports an authentication error

Confirm that NETVARA_LOCAL_TOKEN is set in the same shell or service environment that launches OpenClaw:

test -n "$NETVARA_LOCAL_TOKEN" && echo "Token is set"

If the token changed, reload it from ~/.netvara-client/local_api_key and restart OpenClaw.

OpenClaw reports that the model does not exist

Query /v1/models and compare the returned IDs exactly with the configured model name. Model IDs are case-sensitive.

Requests time out or are refused

Confirm that Netvara Client is running and that the configured base URL is http://127.0.0.1:8091/v1. The /v1/models check distinguishes a connectivity problem from a model configuration problem.

What context length should I use?

Set the context length to a value supported by the selected model and your available system resources. If you are unsure, start with the value shown by your model or client configuration and reduce it if requests fail due to context limits.

Can I use a different model later?

Yes. Select another model ID returned by /v1/models, update the OpenClaw model setting, and restart the agent.

← Back to Support Overview