---
title: "Cline Integration"
description: "Integrate 1折AI in the Cline extension for VS Code: either via Anthropic custom Base URL or OpenAI Compatible."
headingIds: {"Method 1: Anthropic (Recommended)":"section-1","Method 2: OpenAI Compatible":"section-2","FAQ":"section-3"}
---

<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>
Cline is a coding Agent extension for VS Code. Both methods can connect to 1折AI; the Anthropic method is recommended, as Claude's native capabilities (including caching) are more complete.

## Method 1: Anthropic (Recommended)

<Steps>
<Step title="Select Provider">

Open Cline settings and select **Anthropic** for **API Provider**.

</Step>
<Step title="Enter API key and address">

- **Anthropic API Key** (enter your API key): `sk-你的Key`
- Check **Use custom base URL** and enter `https://1zheai.com` (do not add `/v1`)

</Step>
<Step title="Select model">

Select a model supported by 1折AI from the model dropdown [supported models ](/en/docs/models/), for example `claude-sonnet-5-5`.

</Step>
</Steps>

## Method 2: OpenAI Compatible

<Steps>
<Step title="Select Provider">

Select **OpenAI Compatible** for **API Provider**.

</Step>
<Step title="Fill in">

| Field | Value |
|---|---|
| Base URL | `https://1zheai.com/v1` |
| API Key | `sk-你的Key` |
| Model ID | `claude-sonnet-5-5` |

</Step>
<Step title="Verify">

Click **Verify** to confirm the connection, then send a small task in Cline.

</Step>
</Steps>

In Model Configuration you can fill in the context window and maximum output length; enter the values for the corresponding model according to the [Anthropic official model documentation ](https://platform.claude.com/docs/en/about-claude/models/overview).

## FAQ

<AccordionGroup>
<Accordion title="What's the difference between the two methods?">

The Anthropic method uses the native `/v1/messages`, so capabilities such as caching and thinking are the most complete; OpenAI Compatible uses `/v1/chat/completions` and is more universal. When using Claude models, prefer Anthropic.

</Accordion>
<Accordion title="Returns 404?">

The address for the Anthropic method must not include `/v1`; the address for the OpenAI Compatible method must include `/v1`. The two are exactly opposite.

</Accordion>
</AccordionGroup>
