1.5 KiB
1.5 KiB
| summary | read_when | ||
|---|---|---|---|
| Use NanoGPT's OpenAI-compatible API in Clawdbot |
|
NanoGPT
NanoGPT exposes OpenAI-compatible endpoints. Clawdbot registers it as the
nanogpt provider.
Quick setup
- Set
NANOGPT_API_KEY(or run the wizard below). - Run onboarding:
clawdbot onboard --auth-choice nanogpt-api-key
The default model is set to:
nanogpt/zai-org/glm-4.7
Config example
{
env: { NANOGPT_API_KEY: "sk-..." },
agents: {
defaults: {
model: { primary: "nanogpt/zai-org/glm-4.7" },
models: { "nanogpt/zai-org/glm-4.7": { alias: "GLM 4.7" } }
}
},
models: {
mode: "merge",
providers: {
nanogpt: {
baseUrl: "https://nano-gpt.com/api/v1",
apiKey: "${NANOGPT_API_KEY}",
api: "openai-completions",
models: [
{
id: "zai-org/glm-4.7",
name: "GLM 4.7",
reasoning: true,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 200000,
maxTokens: 65535
}
]
}
}
}
}
Notes
- Model refs use
nanogpt/<modelId>. - If you enable a model allowlist (
agents.defaults.models), add every model you plan to use. - For the full provider catalog and configuration rules, see Model providers.