---
title: "Connecting WorkBuddy to the Claude API"
description: "A tutorial on configuring the address, key, and model for the 1折AI Claude API relay in WorkBuddy, including protocol selection, configuration examples, verification steps, and common errors."
headingIds: {"Verifying the Connection and Troubleshooting":"section-1","Costs and Other Connection Methods":"section-2"}
---

<aside className="docs-publication" data-pagefind-ignore>

Documentation maintained by [1ZheAI](https://1zheai.com/en/editorial/#publisher). [Sources and corrections](https://1zheai.com/en/editorial/).

Found an error? [Contact support](mailto:support@1zheai.com) with the page address and a description. Do not send API keys or account credentials.

</aside>
Use WorkBuddy's custom provider feature to connect to 1折AI. First, [create an API key](/en/docs/api-keys/), and confirm the [currently available models](/en/docs/models/); the model IDs below are examples, so adjust them according to your key's permissions.

<Note>
Official configuration verification date: 2026-10-15. The following configuration is compiled based on official documentation; end-to-end verification on this site has not yet been completed. Please first complete a brief Q&A and tool-call verification before using it for long tasks. OpenAI / GPT models are now live; see [the model description](/en/docs/models/) for the model list and pricing.
</Note>

Based on [the official model configuration](https://www.workbuddy.cn/docs/workbuddy/From-Beginner-to-Expert-Guide/Function-Description/Model): Settings → Models → Add Model → Custom. Fill in this site's key and the model `claude-sonnet-4-6`.

Use the full request URL configuration: enable "Custom Protocol" in Advanced Configuration, enter `https://1zheai.com/v1/chat/completions` as the URL, and after saving, select that model in the conversation model selector. The official documentation states that enabling this switch will use the entered URL directly, without path validation or automatic completion; when disabled, it will complete according to the standard `/chat/completions`. Therefore, the full URL and the switch must be described together.

Here, "Custom Protocol" does not mean that OpenAI requests can be automatically converted into Anthropic requests. You cannot enter `/v1/messages` and then claim that the native Claude protocol is connected. Prefer the UI; do not provide unverified manual formats like `models.json`. The official page simultaneously shows the current local configuration path and old `~/.codebuddy/models.json` migration notes; avoid writing the old path as a universal current path based on this. The tool capability markers on the interface also cannot replace end-to-end verification on this site.

## Verifying the Connection and Troubleshooting

1. Save and reload the configuration, and confirm that the currently selected item is the `onezhe` provider or the custom model you added.
2. Send a short question to confirm that a response can be returned; then try a small, reversible task to separately verify tool calls and multi-turn conversation.
3. Open the [call log](/en/docs/usage-logs/) and check the request time, model, status, and usage. A single successful text response does not mean that all Agent capabilities are compatible.
4. If you encounter a 404, check whether the address and protocol in this article match; if you encounter a 401, check the key source and whether the process read the environment variables; if you encounter a 429, check the rate-limiting information before retrying. See [error codes and troubleshooting](/en/docs/troubleshooting/) for more situations.

Keys should only be stored in the local environment or the tool's credential store; do not commit them to code repositories, screenshots, or public logs. Background services may not inherit terminal environment variables; auxiliary models, search, and other tools may also have independent provider settings that need to be checked separately.

## Costs and Other Connection Methods

Check [Claude API real-time pricing](https://1zheai.com/en/pricing/) and [billing rules](/en/docs/pricing-explained/). If you need other clients, return to the [tool connection directory](/en/docs/integrations/); if you are writing your own program, use the [SDK and development guide](/en/docs/guides/).
