---
title: Claude Code in VS Code & Cursor | RunAPI
description: Install the Claude Code extension in VS Code or Cursor and connect its
  shared settings to RunAPI.
url: https://runapi.ai/docs/resources/tool-integrations/claude-code-vscode-cursor.md
canonical: https://runapi.ai/docs/resources/tool-integrations/claude-code-vscode-cursor
locale: en
---

> HTML version: https://runapi.ai/docs/resources/tool-integrations/claude-code-vscode-cursor
> Site index for agents: https://runapi.ai/llms.txt

# Claude Code in VS Code & Cursor

## Overview

The official Claude Code extension runs in both VS Code and Cursor. Both
editors use the same Claude Code user settings, so this guide installs
the matching extension and configures RunAPI once in
`~/.claude/settings.json`.

## Before you begin

* Install a supported version of VS Code or Cursor. The current VS Code
  minimum is listed in the [official extension guide][1].
* Create a standard API key in the [Authentication
  Guide](https://runapi.ai/docs/guides/authentication.md). Do not put it in workspace
  settings or source control.
* Copy a model identifier that supports Anthropic Messages from the
  [Model Catalog](https://runapi.ai/models).



[1]: https://code.claude.com/docs/en/vs-code

## Install

Install the official `anthropic.claude-code` extension:

* **VS Code:** open [the VS Code Marketplace listing][1] or search
  Extensions for `Claude Code`.
* **Cursor:** open `cursor:extension/anthropic.claude-code` or search
  Extensions for `Claude Code`.



[1]: https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code

The extension includes the runtime needed for its chat panel. Install
the standalone CLI only if you also want to run `claude` in the
integrated terminal.

## Configure RunAPI

Open `~/.claude/settings.json` and add the shared user-level environment
settings:

```json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://runapi.ai",
    "ANTHROPIC_API_KEY": "YOUR_RUNAPI_API_KEY",
    "ANTHROPIC_MODEL": "YOUR_RUNAPI_MODEL_ID"
  }
}
```

In VS Code or Cursor settings, search for `Claude Code login` and enable
**Disable Login Prompt** for this custom endpoint. User settings are
shared with the CLI; VS Code extension settings only control extension
behavior.

Keep the real key out of `.claude/settings.json` and editor workspace
settings because those files may be committed.

## Choose a model

Replace `YOUR_RUNAPI_MODEL_ID` with an exact identifier from the [Model
Catalog](https://runapi.ai/models). In the Claude Code panel, `/model` changes the
current selection and `/status` shows the active model.

## Verify

1.  Reload the editor window after changing the extension or settings.
2.  Open the Claude Code Spark panel.
3.  Run `/status` and confirm the user settings and model.
4.  Send `Describe this repository in one sentence.` and confirm a
    normal response.

## Troubleshoot

* **The extension will not install:** confirm the editor version meets
  the [official requirements][1].
* **The Spark icon is missing:** reload the editor window, then restart
  the editor.
* **A login prompt still appears:** enable **Disable Login Prompt** in
  the Claude Code extension settings.
* **The panel does not inherit shell variables:** use
  `~/.claude/settings.json`, or launch the editor from the configured
  terminal. GUI applications often start without the terminal
  environment.
* **The CLI works but the panel does not:** reload the window and use
  the standalone CLI to reproduce the request with more detailed
  diagnostics.
* **Authentication or model selection fails:** verify the key in the
  [Authentication Guide](https://runapi.ai/docs/guides/authentication.md) and copy the exact
  identifier from the [Model Catalog](https://runapi.ai/models).



[1]: https://code.claude.com/docs/en/vs-code#fix-common-issues

## Next steps

Use the [LLM API quickstart](https://runapi.ai/docs/guides/llm-api/quickstart.md) for
protocol behavior and the [Anthropic Messages API
Reference](https://runapi.ai/docs/api/anthropic/messages.md) for request fields. To add
RunAPI tools inside the editor, continue with the [MCP
Overview](https://runapi.ai/docs/resources/mcp.md).

---

## More from RunAPI

- [Home](https://runapi.ai/.md)
- [Models](https://runapi.ai/models.md)
- [AI Video API Comparison](https://runapi.ai/ai-video-api-comparison.md)
- [OpenClaw Integration](https://runapi.ai/openclaw.md)
- [Best API for OpenClaw](https://runapi.ai/best-api-for-openclaw.md)
- [OpenClaw Image Generation](https://runapi.ai/openclaw-image-generation.md)
- [Hermes Agent Integration](https://runapi.ai/hermes-agent.md)
- [Pricing](https://runapi.ai/pricing.md)
- [Claude API Pricing](https://runapi.ai/claude-api-pricing.md)
- [ChatGPT API Pricing](https://runapi.ai/chatgpt-api-pricing.md)
- [OpenAI API Pricing](https://runapi.ai/openai-api-pricing.md)
- [Gemini API Pricing](https://runapi.ai/gemini-api-pricing.md)
- [Claude Code Pricing](https://runapi.ai/claude-code-pricing.md)
- [Claude Code API](https://runapi.ai/claude-code-api.md)
- [Claude Code vs Cursor](https://runapi.ai/claude-code-vs-cursor.md)
- [Claude Max vs API](https://runapi.ai/claude-max-vs-api.md)
- [Requesty Alternative](https://runapi.ai/requesty-alternative.md)
- [Docs](https://runapi.ai/docs/guides)
- [SDK](https://runapi.ai/sdk.md)
- [Skills](https://runapi.ai/skills.md)
- [MCP Server](https://runapi.ai/mcp.md)
- [CLI](https://runapi.ai/cli.md)
- [Feedback](https://runapi.ai/)
- [Contact](mailto:support@runapi.ai)
- [Terms](https://runapi.ai/terms.md)
- [Privacy](https://runapi.ai/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/icon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "TechArticle",
    "headline": "Claude Code in VS Code & Cursor",
    "description": "Install the Claude Code extension in VS Code or Cursor and connect its shared settings to RunAPI.",
    "url": "https://runapi.ai/docs/resources/tool-integrations/claude-code-vscode-cursor",
    "mainEntityOfPage": "https://runapi.ai/docs/resources/tool-integrations/claude-code-vscode-cursor"
  }
]
```
