# GremlinGPT API — setup instructions for coding agents GremlinGPT is an uncensored LLM with an OpenAI- and Anthropic-compatible API. - Base URL (OpenAI format): https://api.gremlingpt.com/v1 - Base URL (Anthropic format, Claude Code): https://api.gremlingpt.com (requests go to /v1/messages) - Model id: gremlin-gpt - Context window: 1000000 tokens - API key: the user's key from https://gremlingpt.com/dashboard/keys, expected in the GREMLIN_API_KEY environment variable. Never print it or commit it. - Context: 1M tokens on every plan. Use a request timeout of at least 300 s for long answers. Pick the section for the tool you are configuring and apply it exactly. ## Claude Code Claude Code speaks the Anthropic format, and so does the gremlin (/v1/messages). Set these variables in your shell (or ~/.zshrc) and run claude. ```bash export ANTHROPIC_BASE_URL="https://api.gremlingpt.com" export ANTHROPIC_AUTH_TOKEN="$GREMLIN_API_KEY" export ANTHROPIC_MODEL="gremlin-gpt" export ANTHROPIC_DEFAULT_OPUS_MODEL="gremlin-gpt" export ANTHROPIC_DEFAULT_SONNET_MODEL="gremlin-gpt" export ANTHROPIC_DEFAULT_HAIKU_MODEL="gremlin-gpt" export CLAUDE_CODE_SUBAGENT_MODEL="gremlin-gpt" export API_TIMEOUT_MS=600000 export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 claude ``` Note: The gremlin's context is 1M tokens — five times Claude Code's usual 200K — so long sessions are fine. Your plan's usage windows still apply. ## Hermes Agent Hermes has a built-in "Custom endpoint" provider. Put this in ~/.hermes/config.yaml, or set the same values through the menu. 1. Run: hermes model 2. Choose "Custom endpoint (self-hosted / VLLM / etc.)". 3. Base URL: https://api.gremlingpt.com/v1 4. Model: gremlin-gpt, API key: your key (or key_env: GREMLIN_API_KEY). ```yaml # ~/.hermes/config.yaml model: provider: custom base_url: https://api.gremlingpt.com/v1 default: gremlin-gpt key_env: GREMLIN_API_KEY context_length: 1000000 ``` ## OpenCode Add the provider to opencode.json in your project (or ~/.config/opencode/opencode.json), then pick GremlinGPT with /models. ```json { "$schema": "https://opencode.ai/config.json", "model": "gremlin/gremlin-gpt", "provider": { "gremlin": { "npm": "@ai-sdk/openai-compatible", "name": "GremlinGPT", "options": { "baseURL": "https://api.gremlingpt.com/v1", "apiKey": "{env:GREMLIN_API_KEY}" }, "models": { "gremlin-gpt": { "name": "GremlinGPT", "limit": { "context": 1000000, "output": 8192 } } } } } } ``` ## Codex CLI Codex talks to custom providers through the Responses API, which the gremlin supports. Add this to ~/.codex/config.toml. ```toml # ~/.codex/config.toml model = "gremlin-gpt" model_provider = "gremlin" [model_providers.gremlin] name = "GremlinGPT" base_url = "https://api.gremlingpt.com/v1" env_key = "GREMLIN_API_KEY" wire_api = "responses" stream_idle_timeout_ms = 600000 ``` ## Aider The openai/ prefix tells Aider to use an OpenAI-compatible server. ```bash export OPENAI_API_BASE="https://api.gremlingpt.com/v1" export OPENAI_API_KEY="$GREMLIN_API_KEY" aider --model openai/gremlin-gpt ``` ## Cline · Roo Code · Kilo Code The three extensions are set up the same way. 1. Open the extension's settings → API Provider: "OpenAI Compatible". 2. Base URL: https://api.gremlingpt.com/v1 3. API Key: your key. 4. Model ID: gremlin-gpt 5. Model configuration → Context window: 1000000. ## Continue Add the model to ~/.continue/config.yaml (works in VS Code and JetBrains) and save the key as the GREMLIN_API_KEY secret. ```yaml # ~/.continue/config.yaml name: GremlinGPT version: 1.0.0 schema: v1 models: - name: GremlinGPT provider: openai model: gremlin-gpt apiBase: https://api.gremlingpt.com/v1 apiKey: ${{ secrets.GREMLIN_API_KEY }} roles: [chat, edit, apply] defaultCompletionOptions: contextLength: 1000000 ``` ## Cursor Cursor lets you swap the OpenAI base URL for your own. 1. Cursor Settings → Models → API Keys. 2. OpenAI API Key: your key. 3. Turn on "Override OpenAI Base URL" and enter https://api.gremlingpt.com/v1 4. Models → Add model: gremlin-gpt, then select it in the chat. Note: Cursor's own built-in models keep working; the gremlin is used when you pick gremlin-gpt. ## SillyTavern Use the Chat Completion API with a custom OpenAI-compatible source. 1. API Connections → API: Chat Completion. 2. Chat Completion Source: Custom (OpenAI-compatible). 3. Custom Endpoint (Base URL): https://api.gremlingpt.com/v1 4. Custom API Key: your key; Model ID: gremlin-gpt → Connect. ## Open WebUI Add the gremlin as an OpenAI connection. 1. Admin Panel → Settings → Connections → OpenAI API → +. 2. URL: https://api.gremlingpt.com/v1 3. Key: your key → Save. 4. Pick gremlin-gpt in the model list of a new chat. ## LibreChat · Chatbox · Jan These apps all have an "OpenAI-compatible" / "Custom provider" option. 1. Add a custom provider of type OpenAI-compatible. 2. API host / Base URL: https://api.gremlingpt.com/v1 3. API key: your key; model: gremlin-gpt. ## curl The API is OpenAI-compatible: anything that lets you set a custom OpenAI URL works with the gremlin. ```bash curl https://api.gremlingpt.com/v1/chat/completions \ -H "Authorization: Bearer $GREMLIN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gremlin-gpt","messages":[{"role":"user","content":"Hi"}],"stream":true}' ``` ## Python The official openai library, just with a different base_url. ```python import os from openai import OpenAI client = OpenAI(base_url="https://api.gremlingpt.com/v1", api_key=os.environ["GREMLIN_API_KEY"], timeout=600) r = client.chat.completions.create( model="gremlin-gpt", messages=[{"role": "user", "content": "Hi"}], ) print(r.choices[0].message.content) ``` ## Node.js The official openai package for Node.js, with a different baseURL. ```js import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.gremlingpt.com/v1", apiKey: process.env.GREMLIN_API_KEY, timeout: 600_000 }); const r = await client.chat.completions.create({ model: "gremlin-gpt", messages: [{ role: "user", content: "Hi" }], }); console.log(r.choices[0].message.content); ``` ## n8n Use n8n's OpenAI nodes with your own base URL. 1. Credentials → New → OpenAI. 2. API Key: your key; Base URL: https://api.gremlingpt.com/v1 → Save. 3. In an OpenAI / AI Agent node pick this credential and type the model: gremlin-gpt.