Skip to content
RunAPI Developer Docs
Developer Resources
Developer Resources

Claude Code in VS Code & Cursor

Install the Claude Code extension in VS Code or Cursor and connect its shared settings to RunAPI.

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.
  • Create a standard API key in the Authentication Guide. Do not put it in workspace settings or source control.
  • Copy a model identifier that supports Anthropic Messages from the Model Catalog.

Install

Install the official anthropic.claude-code extension:

  • VS Code: open the VS Code Marketplace listing or search Extensions for Claude Code.
  • Cursor: open cursor:extension/anthropic.claude-code or search Extensions for 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. 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.
  • 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 and copy the exact identifier from the Model Catalog.

Next steps

Use the LLM API quickstart for protocol behavior and the Anthropic Messages API Reference for request fields. To add RunAPI tools inside the editor, continue with the MCP Overview.