> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ruapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Continue

> How to connect the Continue coding assistant (VS Code, JetBrains) to RuAPI via the OpenAI-compatible provider

[Continue](https://continue.dev) is an open-source coding assistant for VS Code and JetBrains: chat, autocomplete, edits over a selection. Models are set in a config file, and RuAPI plugs in as an `openai` provider with a changed `apiBase` — one address opens Claude, GPT, Gemini and the rest.

## Prerequisites

<Steps>
  <Step title="RuAPI account and API key">
    Console → **Tokens** → create an `sk-...` key. The balance tops up in USDT — see [Top-up](/en/topup).
  </Step>

  <Step title="The Continue extension">
    Install Continue from the VS Code Marketplace or the JetBrains plugins.
  </Step>
</Steps>

## Setup

Open the Continue config (`~/.continue/config.yaml`) and add a model with the `openai` provider:

```yaml theme={null}
models:
  - name: Claude via RuAPI
    provider: openai
    model: claude-opus-4-8        # exact names on the pricing page
    apiBase: https://www.ruapi.ai/v1   # with /v1
    apiKey: sk-YOUR_KEY
```

<Note>
  In the older `config.json` format the fields are the same, inside the `models` array: `"provider": "openai"`, `"apiBase": "https://www.ruapi.ai/v1"`, `"apiKey"`, `"model"`, plus `"title"` for the display name.
</Note>

To add more models (say Haiku for autocomplete), copy the block and change `model`.

## Verify

Open Continue chat (`Cmd/Ctrl + L`), pick "Claude via RuAPI" and send a request. A reply plus an entry in RuAPI Console → **Logs** means it's working.

## Troubleshooting

<AccordionGroup>
  <Accordion title="401 / Unauthorized">
    * `apiKey` must be a RuAPI token (`sk-...`).
    * Check that `apiBase` is `https://www.ruapi.ai/v1` with `/v1`, and `provider` is exactly `openai`.
  </Accordion>

  <Accordion title="Model not found">
    `model` must match the RuAPI ID verbatim — see the [pricing page](https://www.ruapi.ai/pricing).
  </Accordion>

  <Accordion title="Autocomplete is slow / pricey">
    For tab autocomplete, set a separate cheap, fast model (the Haiku family) and keep a strong one for chat.
  </Accordion>
</AccordionGroup>
