AI Code With LogoAI Code With

VS Code × AI Code With

Use AI Code With in VS Code: third-party API / relay setup

To use the AI Code With Anthropic-compatible API inside VS Code, the recommended path is the Cline plugin. Install the extension, enter your API key and a custom Base URL, and you can use AI Code With models directly in VS Code — no config file to edit. This page covers the setup steps, common errors, and FAQ.

Download VS Code from the official page and install the Cline extension; the API key is only entered in the Cline settings panel, never on this page.

Cline quick reference3 settings
API Provider
Anthropic
Base URL
https://api.aicodewith.ai
API Key
你的 AI Code With API Key
Model
claude-sonnet-4-6(示例)

Quick setup

Install the Cline plugin, enter your API key and custom Base URL in its settings panel, and use AI Code With models inside VS Code in about 3 minutes.

Cline is the recommended plugin for using a third-party API in VS Code, with native Anthropic custom Base URL support. After installing, complete the whole setup inside the Cline settings panel — no config file to edit.

  1. Install the Cline extension

    Search for Cline in the VS Code Marketplace (extension ID saoudrizwan.claude-dev), verify the publisher, and click Install. A Cline icon appears in the activity bar when the install finishes; reloading the window once is recommended to make sure the extension loads completely.

    Search for Cline in the Marketplace, open its details page, and click Install. A Cline icon then appears in the activity bar.
  2. Configure the connection in Cline settings

    Click the Cline icon in the activity bar, then the gear icon at the top right to open settings. Complete three fields: ① select Anthropic in the API Provider dropdown (Cline uses the official Anthropic SDK, so protocol compatibility is guaranteed); ② paste your AI Code With API key into the Anthropic API Key field (the key stays in local secure storage, never in a plaintext config file — never share your real key in screenshots or chats); ③ check Use custom base URL and enter https://api.aicodewith.ai (no /v1 suffix needed — Cline appends /v1/messages automatically).

    Quick copy

    Base URL

    https://api.aicodewith.ai

    Model ID

    claude-sonnet-4-6

    In the settings panel: pick Anthropic as the API Provider, paste your AI Code With API key, check Use custom base URL, and enter https://api.aicodewith.ai.
  3. Choose a model and verify

    Pick a model in the Model dropdown (e.g. claude-sonnet-4-6) and send a test message in the Cline panel. A normal reply means the setup works. Finally, open the AI Code With usage records and match the request by time and model name to confirm it actually went through the AI Code With endpoint.

    Pick a model and send a test message. A normal reply confirms the connection; match the call by time and model in AI Code With usage records.

How does Cline connect to AI Code With?

Cline is a popular third-party agentic plugin in the VS Code ecosystem with support for custom Anthropic-compatible endpoints. Connecting to AI Code With only needs 3 settings in its panel:

API Provider
Choose Anthropic in the API Provider dropdown in Cline settings; Cline uses the official Anthropic SDK to talk to the custom endpoint.
API Key
Paste your AI Code With API key into the Anthropic API Key field. The key stays in Cline's secure local storage and is never written to a config file.
Base URL
Check Use custom base URL and enter https://api.aicodewith.ai (no /v1 suffix needed — Cline appends /v1/messages automatically).

Flow: VS Code + Cline plugin → Anthropic Provider + custom Base URL → AI Code With compatible API. Everything is configured in the Cline settings panel, no files to edit.

Frequently asked questions

Which plugin do I need to use AI Code With in VS Code?

Use the Cline plugin (extension ID saoudrizwan.claude-dev) — it is the only supported way to reach the AI Code With third-party API inside VS Code. In Cline settings, choose Anthropic and set the custom Base URL to connect to the AI Code With compatible API.

Where does the AI Code With API key go?

Paste it into the Anthropic API Key field in Cline settings. Cline stores the key in VS Code's secure storage; it is not written to settings.json or any other plaintext config file.

What should I enter as the Base URL?

Enter https://api.aicodewith.ai without the /v1 suffix. Cline's Anthropic Provider appends /v1/messages automatically; entering /v1 makes Cline build a duplicated /v1/v1/messages path that fails to hit the correct endpoint.

Why am I getting 401?

Usually the API key is invalid, mistyped, or copied with extra spaces. Re-paste the key in Cline settings and try again.

How do I confirm the setup works?

Pick the configured model in the Cline panel and send a message. A normal reply confirms the connection; match the request by time and model in AI Code With usage records.

Don't have VS Code installed?

Download and install VS Code from the official page, then install the Cline extension to start configuring.

VS Code official download

Download the installer for your platform from code.visualstudio.com, install, and open the editor.

Download from the official page

Full install guidance follows the official VS Code docs; this site does not host or modify installers.

Common error troubleshooting

The most frequent problems fall into 4 categories.

401 / Invalid API Key

Symptom: The request returns 401, Unauthorized, or Invalid API Key.

Cause: Usually the API key is invalid, mistyped, or copied with extra characters.

  • Re-paste the API key in Cline settings (no extra spaces)
  • Confirm the key is a valid AI Code With API key
  • Retry sending a message
Read full guide →

Model Not Found / Wrong Model ID

Symptom: The request reports Model Not Found or an unknown model.

Cause: The Model ID does not match the channel, or the model is unavailable.

  • Pick a model offered by AI Code With in the Cline Model dropdown
  • Confirm the key can access that model
  • Confirm the model in AI Code With usage records
Read full guide →

Base URL path error

Symptom: The request fails after sending a message, or reports a wrong endpoint path.

Cause: The Base URL was entered with a /v1 suffix, making Cline build a duplicated /v1/v1/messages path that never hits the correct endpoint.

  • Confirm the value is https://api.aicodewith.ai (no /v1)
  • Remove any trailing /v1, /v1/messages, or guessed path
  • Save the settings and retry
Read full guide →

Config not applied / still hitting the official API

Symptom: Messages do not go through AI Code With, or Cline reports the official endpoint failing.

Cause: Use custom base URL is not checked, or the Base URL is in the wrong place.

  • Confirm Use custom base URL is checked
  • Confirm the address starts with https://api.aicodewith.ai
  • Save and retry sending a message
Read full guide →

Need the full guide?

Every config parameter, the complete model list, and more troubleshooting live in the AI Code With docs.

Open the AI Code With docs

Sources

Related links