Connect other OpenAI-compatible clients
Reuse the same project endpoint with clients that expose a custom OpenAI-compatible provider, while keeping each client’s credential store separate.
Product decision: what belongs in this guide
| Client | Recommended setup | Verification |
|---|---|---|
| AionUI | Custom OpenAI platform | Start a new chat |
| OpenCode | Custom provider or CC-Switch OpenCode tab | /models |
| Grok Build | Custom OpenAI-compatible provider | Small generation task |
| WorkBuddy | Custom OpenAI-compatible provider | New session |
| OpenClaw | CC-Switch OpenClaw tab or custom provider | Restart gateway, then TUI |
| Hermes | hermes model custom endpoint | /model inside chat |
These clients share a protocol pattern, so six near-identical pages would age poorly. This matrix keeps client-specific verification while maintaining one source of truth for endpoint and key handling.
Common values
- Provider type: OpenAI compatible
- Base URL:
D1V_PAI_BASE_URL(https://pai.d1v.ai/v1) - API Key:
D1V_PAI_API_KEY - Model: an exact ID returned by
GET /models
Do not copy the key from one client configuration file into Git. Enter it through the client credential store or environment variables.
OpenCode
OpenCode stores credentials under ~/.local/share/opencode/auth.json and provider configuration in opencode.json. Use /connect for the key, then set a provider Base URL:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"openai": {
"options": { "baseURL": "https://pai.d1v.ai/v1" }
}
}
}Run /models and choose an ID exposed by D1V PAI. See the official OpenCode provider guide.
Hermes Agent
Run hermes model, choose Custom endpoint, and enter the D1V PAI Base URL, key, and model. Hermes also supports the OpenAI provider path with OPENAI_API_KEY and optional OPENAI_BASE_URL in ~/.hermes/.env.
Use hermes model outside a session to add the provider; use /model inside a session only to switch among already-configured providers.
Reference: Hermes official provider guide.
AionUI, Grok Build, WorkBuddy, and OpenClaw
- AionUI: Settings → LLM configuration → Add model → Custom platform. Enter the four common values, save, and start a new chat.
- Grok Build / WorkBuddy: choose a custom OpenAI-compatible provider. If the UI asks for an endpoint rather than a Base URL, confirm whether it appends
/v1before saving. - OpenClaw: configure through the dedicated CC-Switch tab when available, restart the OpenClaw gateway, then test in the TUI. Do not reuse configurator scripts built for another API provider.
Why there is no cache-proxy page
The Claude cache optimization proxy in the reference catalog is an optional, provider-specific performance layer. It is not required to obtain a D1V PAI key, discover models, validate Responses, or route Claude clients. Adding it to the primary setup would increase failure modes without improving first-run success, so it remains intentionally out of scope.