Autonomous agents
Long-running assistant agents that route every model call through a gateway process. Both read the SayGM key from the environment:
export GM_API_KEY="gm_live_…"Before starting a long-running agent, verify that the key has spendable credit:
curl -fsS "https://api.saygm.com/v1/credits" \ -H "Authorization: Bearer $GM_API_KEY"This returns the key’s current spendable balance. See
check balance and current spend
for the response fields. A 401 means the
key is missing or invalid; a 402 from an inference call means the account
cannot cover that request.
Hermes Agent
Section titled “Hermes Agent”Add SayGM as a named provider in ~/.hermes/config.yaml:
providers: saygm: api: https://api.saygm.com/v1 key_env: GM_API_KEY transport: chat_completions default_model: gpt-5.5
model: default: gpt-5.5 provider: custom:saygmHermes reads the key from the environment variable named by key_env, so the
export GM_API_KEY above covers it. To persist the key instead, put
GM_API_KEY=gm_live_… in ~/.hermes/.env — Hermes keeps secrets there, never
in config.yaml.
For a Claude model, use the Anthropic-compatible endpoint:
providers: saygm-claude: api: https://api.saygm.com key_env: GM_API_KEY transport: anthropic_messages default_model: claude-opus-4-8Run hermes model to switch models interactively, or use the triple syntax
mid-session: /model custom:saygm:gpt-5.5.
OpenClaw
Section titled “OpenClaw”Add SayGM as a custom provider in ~/.openclaw/openclaw.json:
{ agents: { defaults: { model: { primary: "saygm/gpt-5.5" }, }, }, models: { mode: "merge", providers: { saygm: { baseUrl: "https://api.saygm.com/v1", apiKey: "${GM_API_KEY}", api: "openai-completions", models: [ { id: "gpt-5.5", name: "GPT-5.5 via SayGM", contextWindow: 272000, maxTokens: 128000, }, ], }, }, },}OpenClaw expands ${GM_API_KEY} from the environment. For a Claude model, set
api: "anthropic-messages", baseUrl: "https://api.saygm.com", and an
available messages model ID. openclaw onboard walks through the same setup
interactively — pick Custom provider when it asks for a model provider.
Check the selected model’s actual context and output limits in the
model catalog rather than copying the example
contextWindow and maxTokens values.