Integrations
CLI Tools
Terminal-based coding agents and command-line LLM tools can be governed with a base URL and a key: usually just two environment variables.
Prerequisite: add your provider key to the Spineforge Dashboard Vault and create a gateway key (
sfgw-...) in the API Keys tab.OpenCode
- Run
opencode auth login. - Select Other Custom provider.
- Provide your Gateway Key and the Base URL (
https://spineforge-backend.onrender.com/gateway/v1) when prompted. - Run with a gateway model, for example:
opencode -m spineforge/gemini-3.5-flashAntigravity CLI
Export the gateway URL as the Gemini base URL and set your Gateway Key in the CLI's config:
export GOOGLE_GEMINI_BASE_URL=https://spineforge-backend.onrender.com/gateway/v1Any OpenAI-compatible CLI
Most OpenAI-compatible command-line tools read the same two settings the official OpenAI SDKs do. Set them in your shell profile, a .env file, or your CI secrets:
export OPENAI_BASE_URL="https://spineforge-backend.onrender.com/gateway/v1"
export OPENAI_API_KEY="sfgw-xxxx-xxxx"Some older tools use OPENAI_API_BASE instead of OPENAI_BASE_URL, and some expose flags such as --base-url / --api-key. Check your tool's documentation for the exact names: the values are always the same.
Quick test with cURL
curl https://spineforge-backend.onrender.com/gateway/v1/chat/completions \
-H "Authorization: Bearer sfgw-xxxx-xxxx" \
-H "Content-Type: application/json" \
-d '{"model": "openai/gpt-4o", "messages": [{"role": "user", "content": "Hello"}]}'Tips
- One key per developer or per agent. That gives you per-person attribution and lets you revoke a single laptop or pipeline without touching the others.
- Use model names with a provider prefix (for example
groq/llama-3.1-8b-instant). See Model Naming. - Keep the key out of source control. Use env vars or your secret manager; a leaked gateway key can be revoked instantly, and it never exposes your provider key.
- Streaming works. Streamed responses are piped straight through the gateway.