GreenTokens

Search

Search models, guides, docs and the FAQ.

Clients

OpenClaw

Add GreenTokens as a custom model provider in OpenClaw.

Add GreenTokens as a provider

OpenClaw connects to any OpenAI-compatible API as a custom provider. Add GreenTokens to the models section of your OpenClaw config and make one of its models the default:

OpenClaw config
{
  models: {
    providers: {
      greentokens: {
        baseUrl: "https://api.greentokens.io/v1",
        apiKey: "${GREENTOKENS_API_KEY}",
        api: "openai-completions",
        models: [
          { id: "claude-sonnet-5", name: "Claude Sonnet 5" },
          { id: "claude-opus-5-5", name: "Claude Opus 5.5" },
          { id: "gpt-6-sol", name: "GPT-6 Sol" },
          { id: "glm-5.3", name: "GLM-5.3" }
        ]
      }
    }
  },
  agents: {
    defaults: {
      model: { primary: "greentokens/claude-sonnet-5" }
    }
  }
}
  • baseUrl includes /v1, and api: "openai-completions" uses the Chat Completions API.
  • ${GREENTOKENS_API_KEY} reads your key from the environment, so it never sits in the file.
  • Each id is a GreenTokens model ID from the models page. Reference them as greentokens/model-id.

Or add it from the command line

To merge the provider into your existing config without editing the file by hand:

Shell
openclaw config set models.providers.greentokens '{
  "baseUrl": "https://api.greentokens.io/v1",
  "apiKey": "${GREENTOKENS_API_KEY}",
  "api": "openai-completions",
  "models": [{ "id": "claude-sonnet-5", "name": "Claude Sonnet 5" }]
}' --strict-json --merge

Set your key

export GREENTOKENS_API_KEY="sk-gt-…"
Agents can run for a long time unattended. Give OpenClaw its own API key with a daily spend limit on the API Keys page.