WorkBuddy Custom Models: Claude & GPT
This guide needs an API key
Create an account and generate one in about a minute, then use it wherever the steps below expect a key.
No card required to sign up · API usage requires a top-up
WorkBuddy is Tencent Cloud's desktop AI agent; point its custom model endpoint at Code By AI to run Claude and GPT models on one key.
WorkBuddy ships with several built-in models and also accepts a custom OpenAI-compatible endpoint. The custom entry is a full Chat Completions URL, which makes the Code By AI gateway a direct fit. Configuration and the API key stay on the local machine.
One command (macOS / Linux)
Quit WorkBuddy first, then run:
1 curl -fsSL https://www.codebyai.net/setup.sh | sh -s -- --workbuddy
It asks for your API key (hidden input), adds gpt-5.6-terra and claude-sonnet-5 to ~/.workbuddy/models.json, backs up the file, and leaves it owner-only. Re-running rotates the key; | sh -s -- --uninstall restores the file. Restart WorkBuddy afterwards, then pick a custom model. The manual steps below do the same by hand.
1. Create a Code By AI API key
Sign in to Code By AI, open API Keys, and create a key. It looks like sk-proj-....
2. Open the custom model settings
Use either entry:
- Settings → Model → Custom models
- The model switcher at the bottom of the conversation → + Configure Custom Model
3. Add the GPT model
On the Add Model page, choose Custom / 自定义, then fill in:
- Endpoint / 接口地址:
https://www.codebyai.net/api/agent/v1/chat/completions - API Key: the Code By AI key
- Model name / 模型名称:
gpt-5.6-terra - Capabilities: enable tool calling, image input or reasoning only if the chosen model supports them. A custom model used for agent tasks needs tool calling.
Save the entry and wait for it to take effect. WorkBuddy stores each model as its own record, so Claude is a second entry rather than a second model ID in the same form.
4. Add the Claude model
Add another custom model with the same endpoint and key, and set the model name to claude-sonnet-5. Code By AI's Chat Completions endpoint accepts both families: GPT IDs go to the Codex channel, and claude-* IDs are forwarded to the Claude channel and billed at Claude prices.
5. Select the model
Return to the conversation, open the model picker, and select the custom model. A short request confirms the endpoint, key and model ID. Switch between the GPT and Claude entries from the same picker.
Endpoint details
WorkBuddy expects the full Chat Completions URL, not a base URL: keep /api/agent/v1/chat/completions. With the default protocol setting, WorkBuddy validates the address and completes a standard /chat/completions path when it is missing. If the address is rejected or a second /chat/completions is appended, open the advanced settings and turn on Custom Protocol / 自定义协议. That switch makes WorkBuddy use the URL exactly as typed and skips path validation and completion.
Billing and privacy
Custom-model usage is billed by Code By AI; WorkBuddy credits are not consumed. The endpoint, key and model list are saved locally in WorkBuddy's models.json and are not uploaded. WorkBuddy forwards the conversation to the endpoint you configured, so the Code By AI terms and privacy policy apply to that traffic.
Troubleshooting
404— the endpoint is missing/v1/chat/completions, has a typo, or WorkBuddy appended a second path. Copy the URL from this page, and enable Custom Protocol if the path is still modified.401/ invalid key — the key has stray spaces, was deleted, or expired. Create a new key on the API Keys page.- Insufficient balance — top up on the Wallet page.
- The agent cannot edit files or run commands — tool calling is disabled for that custom model. Re-open the entry and enable it.
- The model answers but ignores the agent loop — the model ID may not match the family. Check the exact ID on the Model Plaza.
Get started
Four steps to your first request
- 01
Create a free account
Sign up with Google, GitHub or email and set a password. No card is required.
- 02
Generate an API key
Create a key in one click from the dashboard. It lets your CLI authenticate with Code By AI.
- 03
Top up your balance
Add credit before your first request; usage is charged per token from your balance.
- 04
Point your CLI at Code By AI
Export one base-URL variable, or add a model provider block to config.toml. The setup guides list the exact lines for each agent.
No card required to sign up · API usage requires a top-up