OpenClaw सेटअप: API Key, Base URL और custom मॉडल
OpenClaw के models.providers में BetterToken API Key, Base URL और Responses या Chat Completions मॉडल सेट करें। Gateway जांचें।
openai-responses: /v1/responses; openai-completions: /v1/chat/completions. Base URL: https://bettertoken.ai/v1.
मुख्य सेटिंग
| Field | मान |
|---|---|
| API Key | BetterToken API Key |
| Base URL | https://bettertoken.ai/v1 |
| Model | YOUR_MODEL_ID |
आवश्यकताएं
- नवीनतम OpenClaw इंस्टॉल करें
- BetterToken API Key बनाएं
- मॉडल प्लाज़ा या Key Setup dialog से Model ID कॉपी करें
पहले से खाता है? साइन इन करें, रिचार्ज करें, फिर कंसोल में कुंजी बनाएँ।
इंस्टॉल करें
macOS / Linux
curl -fsSL https://openclaw.ai/install.sh | bashWindows
iwr -useb https://openclaw.ai/install.ps1 | iexCommand-line सेटअप
BetterToken automatic setup script OpenClaw configuration लिखता है। इसके लिए Node.js आवश्यक है। API Key या Model ID argument में न देने पर script उन्हें दर्ज करने को कहता है।
macOS / Linux
curl -fsSL "https://bettertoken.ai/install-openclaw-provider.sh" | bashWindows
iwr "https://bettertoken.ai/install-openclaw-provider.ps1" -OutFile "$env:TEMP\install-openclaw-provider.ps1"; powershell -ExecutionPolicy Bypass -File "$env:TEMP\install-openclaw-provider.ps1"पुष्टि करें कि agents.defaults.model.primary में Setup का YOUR_MODEL_ID उपयोग हुआ है, फिर नीचे validation और Gateway restart command चलाएं।
मैन्युअल सेटअप
OpenClaw सेट करें
model plaza से सही Model ID कॉपी करें।
स्पष्टता के लिए उदाहरणों में API Key placeholder है। सहेजे जाने वाले configuration में models.providers.bettertoken.apiKey के लिए OpenClaw SecretRef या environment variable substitution की अनुशंसा करता है; साझा फ़ाइल में असली Key रखने के बजाय आधिकारिक credential निर्देश अपनाएँ।
Responses API
{ "models": { "mode": "merge", "providers": { "bettertoken": { "baseUrl": "https://bettertoken.ai/v1", "apiKey": "YOUR_API_KEY", "api": "openai-responses", "models": [ { "id": "YOUR_MODEL_ID", "name": "YOUR_MODEL_ID" } ] } } }, "agents": { "defaults": { "model": { "primary": "bettertoken/YOUR_MODEL_ID" } } }}Chat Completions
{ "models": { "mode": "merge", "providers": { "bettertoken": { "baseUrl": "https://bettertoken.ai/v1", "apiKey": "YOUR_API_KEY", "api": "openai-completions", "models": [ { "id": "YOUR_MODEL_ID", "name": "YOUR_MODEL_ID" } ] } } }, "agents": { "defaults": { "model": { "primary": "bettertoken/YOUR_MODEL_ID" } } }}openai-responses: /v1/responses; openai-completions: /v1/chat/completions. Base URL: https://bettertoken.ai/v1.
कनेक्शन सत्यापित करें
चलाएं:
openclaw config validateopenclaw gateway restartopenclaw models listopenclaw models statusValidation pass हो, Gateway restart हो और मॉडल सूची तथा status में bettertoken/YOUR_MODEL_ID दिखे तो सेटअप सक्रिय है। मौजूदा session पुराने मॉडल का उपयोग करे तो नया session शुरू करके फिर जांचें।
मॉडल बदलें
नया मॉडल models.providers.bettertoken.models में जोड़ें, फिर agents.defaults.model.primary को bettertoken/YOUR_MODEL_ID पर बदलें। Save और validate करके Gateway restart करें।
सामान्य त्रुटियां
| त्रुटि | समाधान |
|---|---|
config validate विफल | JSON comma, quote और bracket जांचें। |
401 | apiKey फिर कॉपी करें और space हटाएं। |
404 | openai-responses: /v1/responses; openai-completions: /v1/chat/completions. Base URL: https://bettertoken.ai/v1. |
| मॉडल नहीं दिखता | पुष्टि करें कि वह प्रदाता मॉडल सूची और agents.defaults.model.primary दोनों में है। |
| मौजूदा session पुराना मॉडल उपयोग करता है | openclaw gateway restart चलाएं और नया session बनाएं। |
उन्नत सेटअप
संबंधित FAQ
वैकल्पिक: CC Switch से प्रदाता प्रबंधित करें
कई टूल के प्रदाता एक जगह प्रबंधित करने के लिए CC Switch में OpenClaw सेटअप देखें।
तकनीकी विवरण
Responses और Chat Completions
openai-responses: /v1/responses; openai-completions: /v1/chat/completions. Base URL: https://bettertoken.ai/v1.

