Use with coding tools & SDKs

Because the API is OpenAI-compatible, almost any tool that lets you set a custom OpenAI base URL and key will work with Phoenix Grove. There are only ever three things to supply:

Base URL:  https://api.pgsgrove.com/v1
API key:   pgsk_your_key_here
Model:     any id from the Models page (e.g. kimi-k2.7)

The base URL ends at /v1. Don't append /chat/completions — the tool adds the path itself. This is the single most common setup mistake.


Install the OpenAI SDK (optional)

There's no Phoenix Grove SDK to install — the official OpenAI SDKs are the SDK. If you're writing code rather than wiring up a ready-made tool, install whichever one you need:

# Python
pip install openai

# JavaScript / TypeScript
npm install openai

Then point it at the base URL and key from above (full examples in the Quickstart). Ready-made coding agents like the ones below have their own installers and don't need this step.


Smoke test first

Before configuring any tool, confirm your key and a model id work with one curl. If this returns a completion, every OpenAI-compatible tool will too:

curl https://api.pgsgrove.com/v1/chat/completions \
  -H "Authorization: Bearer $PGS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.2",
    "messages": [{ "role": "user", "content": "Say hello in five words." }]
  }'

opencode

Add a custom provider in your project's opencode.json (or the global config). opencode uses the OpenAI-compatible adapter, so you only set a base URL, a key, and the model ids you want to see in the picker:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "phoenix-grove": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Phoenix Grove",
      "options": {
        "baseURL": "https://api.pgsgrove.com/v1",
        "apiKey": "{env:PGS_API_KEY}"
      },
      "models": {
        "kimi-k2.7":       { "name": "Kimi K2.7" },
        "deepseek-v4-pro": { "name": "DeepSeek V4 Pro" },
        "glm-5.2":         { "name": "GLM 5.2" }
      }
    }
  }
}

Run /models inside opencode to pick a Phoenix Grove model. The {env:PGS_API_KEY} syntax reads the key from your environment so it never sits in the file.


OpenClaw

Add a provider under models.providers in ~/.openclaw/openclaw.json and allowlist the models you'll use. Use "api": "openai-completions" for the OpenAI-compatible endpoint:

{
  "agents": {
    "defaults": {
      "model": { "primary": "phoenix-grove/kimi-k2.7" },
      "models": {
        "phoenix-grove/kimi-k2.7":       { "alias": "Kimi K2.7" },
        "phoenix-grove/deepseek-v4-pro": { "alias": "DeepSeek V4 Pro" }
      }
    }
  },
  "models": {
    "providers": {
      "phoenix-grove": {
        "baseUrl": "https://api.pgsgrove.com/v1",
        "apiKey": "${PGS_API_KEY}",
        "api": "openai-completions",
        "models": [
          { "id": "kimi-k2.7",       "name": "Kimi K2.7",       "input": ["text", "image"], "contextWindow": 262144, "maxTokens": 32768 },
          { "id": "deepseek-v4-pro", "name": "DeepSeek V4 Pro", "input": ["text"],          "contextWindow": 1048576, "maxTokens": 32768 }
        ]
      }
    }
  }
}

Models are referenced as phoenix-grove/<id>. Keep maxTokens at or below 32,768 — that's the output ceiling on this API.


Hermes Agent

Hermes has an interactive setup — no file editing needed. Run:

hermes model

Then:

  1. Pick Custom endpoint.
  2. Base URL: https://api.pgsgrove.com/v1 (ends at /v1 — Hermes appends the rest).
  3. API key: your pgsk_... key.
  4. Model id: any id from the Models page, e.g. kimi-k2.7.

Hermes saves the selection and reuses it on every subsequent run.


Any other OpenAI-compatible tool

The same three values wire up Cursor, Cline, Continue, aider, the Vercel AI SDK, LangChain, LlamaIndex, and most other clients — look for an "OpenAI-compatible provider," "custom base URL," or "OpenAI API base" field:

  • Base URL / API base: https://api.pgsgrove.com/v1
  • API key: your pgsk_... key
  • Model: an id from the Models page

Two things worth knowing:

  • List ids programmatically with GET /v1/models (no auth needed) so a tool's model dropdown stays current — see Models.
  • Cursor caveat: a custom OpenAI base URL is honored in Cursor's chat/ask modes, but its Composer/apply and autocomplete features route through Cursor's own backend and won't use a custom endpoint. That's a Cursor limitation, not ours.

If a tool expects the OpenAI protocol and lets you change the base URL, it works here. When something misbehaves, run the smoke test first to confirm the key and model, then check the tool's base-URL field for a stray /chat/completions.