Use Free NVIDIA NIM API in OpenClaw Setup Guide

First things first,
If you're seriously using OpenClaw, please use a paid API, or go to a relay/forwarding site or other token provider.
I write this kind of article for readers who have never used OpenClaw before and want to try it out but are worried about the cost of getting started.

Preface

Now if you want to use a free token, Qwen basically won't work anymore — after just a few rounds of conversation it throws a rate-limit error.
Qwen API rate limit error while installing skills in OpenClaw

And Google's OAuth or reverse-proxy routes for Antigravity have been explicitly stated by Google to violate the TOS, and newer versions of OpenClaw have also removed that support.

I remembered the previous post about using the free NVIDIA NIM API to play with SillyTavern, and I wanted to use this free token in OpenClaw as well.

Walkthrough

Get an API Key from NVIDIA NIM

https://build.nvidia.com/
There's a login button in the top right corner.

I used a gmail address.

If you don't have an account, it will prompt you to create one.
Detailed steps are omitted.
I was lazy and just logged in directly with a Google account.

It will ask you to verify your email. You will receive a verification email in your inbox.

After creating the account and logging in, click the icon in the top right corner, then API Keys.

You can't create an API Key right after registering the account.
Note the banner at the top of the page asking you to verify your account.

Click it, and you'll need to verify your phone number.
I tried Google Voice but it didn't work.
giffgaff works.

After verifying the phone number, you can see the Generate API Keys button.

Save your API Key 
It will only be shown once

Get the base_url and model for NVIDIA NIM

Find the page corresponding to the glm4.7 model
Find the glm4.7 model page on build.nvidia.com/models
https://build.nvidia.com/z-ai/glm4_7

Click the View Code button in the top right corner, and you will know from the popup
base_url and model
Click View Code to get base_url and model

Set API Key  base_url  model during the OpenClaw onboard process

* I will only highlight the different operations. 

Selecting Custom Provider as model provider in OpenClaw

base_url 
base_url copied verbatim from the address given by NVIDIA

Select paste API key now

API Key
Go back to the NVIDIA page and copy the nvapi key string

Select OpenAI compatible as endpoint compatibility

model
model field set to z-ai/glm4.7

Endpoint ID can be any value, just press Enter

Model alias can be left blank, just press Enter

There is one last place that needs to be modified manually.
Open the /root/.openclaw/openclaw.json file, modify the model's "contextWindow" to a larger value; I changed it to 128000 as shown in the image below
Change contextWindow in openclaw.json to 128000

Anyway, the default value in the configuration file is too small and will cause problems when used.

After modifying openclaw.json, the gateway needs to be restarted
openclaw gateway restart

========

End


========

Postscript

The same principle applies, you can also try other models
https://build.nvidia.com/z-ai/glm5
https://build.nvidia.com/moonshotai/kimi-k2.5
https://build.nvidia.com/moonshotai/kimi-k2-thinking
https://build.nvidia.com/minimaxai/minimax-m2.5

========

Related Recommendations



Comments