Skip to content

Getting Started4 min read

Connecting an AI Provider

Add your API key and pick your first model

Nexgile Code is bring-your-own-provider: you connect it to the AI service of your choice with your own API key, and your requests go directly from your machine to that provider. There is no middleman, no markup, and no lock-in — you can switch providers at any time, or configure several and flip between them per task or per mode.

Open the Nexgile Code panel and click the Settings (gear) icon in its toolbar. The first section, Providers, is where all of this happens. The section header reads “Save different API configurations to quickly switch between providers and settings” — which is exactly what it does.

Provider settings are organized into configuration profiles. A profile is a named bundle of provider + credentials + model + tuning options (temperature, reasoning effort, and so on). You start with one default profile; you can create as many as you like.

Why bother with more than one?

  • Different jobs, different models. A high-reasoning model for planning, a fast cheap model for routine edits, a local model for sensitive code.
  • Instant switching. The chat input has a profile selector next to the mode selector — switch the active profile mid-conversation without touching Settings.
  • Per-mode assignment. In Settings → Modes, each mode has a “Select which API configuration to use for this mode” option. Assign your reasoning-heavy profile to Architect and your fast profile to Code, and the right model is used automatically whenever you switch modes. (A lock toggle in the chat profile selector forces one profile across all modes in the workspace if you prefer.)

Manage profiles from the Configuration Profile control at the top of the Providers section: Add Profile, Rename Profile, Delete Profile. Deleting is blocked when it’s the only profile.

Anthropic’s Claude models are a strong default for agentic coding, so let’s use them as the worked example. The same steps apply to any provider — only the credential fields differ.

  1. Get an API key from the Anthropic Console (console.anthropic.com). If the key field is empty, the Providers section shows a Get Anthropic API Key link that takes you to the right place.
  2. In Settings → Providers, make sure your target profile is selected under Configuration Profile.
  3. In the API Provider dropdown, choose Anthropic.
  4. Paste your key into Anthropic API Key.
  5. Pick a model from the Model list — a current Claude Sonnet model (claude-sonnet-4-5) is preselected, which is a good starting point.
  6. Click Save.

That’s it — the chat input is now live. Model-level options you’ll meet later (temperature, reasoning effort, prompt caching) are covered in Model Behavior & Costs.

Anthropic is one of 21 providers in the dropdown — hosted services including OpenAI, Google Gemini, AWS Bedrock, GCP Vertex AI, Mistral, OpenRouter, xAI (Grok), and LiteLLM, plus local options and a generic OpenAI-compatible endpoint for anything that speaks that API shape. Each provider has its own setup notes; start at the Providers Overview and drill into Anthropic, OpenAI, Google Gemini, AWS Bedrock, OpenRouter, or the rest.

Nothing requires a hosted provider. Two local options run models entirely on your own hardware:

  • Ollama — run open models locally (for example llama3.1); Nexgile Code talks to the local Ollama server.
  • LM Studio — a desktop app that serves local models (for example meta-llama-3.1-8b-instruct) over an OpenAI-compatible server.

Select the provider in the same dropdown, point it at your local server, and pick the model you’ve pulled. Expect smaller models to be noticeably weaker at multi-step agentic work than frontier hosted models — but your code never leaves your machine.

A setup many users settle into after a week:

Profile name Provider + model Assigned to
deep-reasoning Your provider’s strongest reasoning model Architect, Debug, Reviewer
daily-driver A strong, fast coding model Code, Ask, and most modes
local-private Ollama or LM Studio Work on codebases that must stay on-machine

Create the profiles in Settings → Providers, then wire each mode to its profile in Settings → Modes. From then on, switching modes switches models automatically — no manual toggling mid-task.

A 30-second smoke test:

  1. Click the mode selector in the chat input and switch to Ask mode (read-only — it can’t edit files or run commands, so nothing needs approval).
  2. Type a trivial request:
Reply with the single word OK.
  1. You should see the response stream in within a few seconds, and the task header will show live Tokens and API Cost figures for the exchange.

If instead you get an error: a 401 (“Couldn’t authenticate with provider. Please check your API key configuration.”) means the key is wrong or inactive; a 402 means your provider account is out of credit; a 429 means you’re being rate-limited. Fix the account issue, then just click Retry. More cases are covered in Troubleshooting.