Skip to main content
You can use the editor without an AI account. Connect one provider when you want the agent to read files, answer questions, or propose edits. A successful test on this page confirms that DocWriter can reach a model with your account before you ask it to change a draft. DocWriter supports Claude, OpenAI, Codex, Cursor, and Pi. You choose the provider and model from pills in the page header. For Claude, DocWriter can reuse your existing Claude Code terminal login (claude, then /login) so agent calls use your Claude.ai / Claude Code subscription. An Anthropic API key is optional and bills API usage instead.

Choose a provider

Click the provider pill in the header and choose one provider where you already have an account or API key. Click the model pill beside it to search the available models or add a custom model identifier.
The provider menu open in the DocWriter header

The provider pill is beside Settings in the top-left corner.

The model menu open in the DocWriter header

The model pill opens a searchable list beside the provider.

When you change providers, your conversation with the agent starts fresh. Your workspace files, rules, references, hooks, and comments remain in place. When you switch to an earlier session through Settings, then Sessions, you return to its saved provider and model when the provider session is still valid. Read Sessions when an old provider session cannot resume.

Add credentials

Open Settings, then API keys. You can see whether each provider uses a saved key, an existing login, or no credential. Paste a key in the matching field and choose Save. Choose Remove stored key when you no longer want DocWriter to use the saved key.
The API keys panel open from Settings

Open Settings, then API keys, to see and change provider credentials.

Saved keys live in ~/.docwriter/keys.env. A process environment variable or project .env value takes precedence over that file.

Claude

Prefer your Claude Code / Claude.ai subscription when you already use Claude Code on this computer. DocWriter reuses that login. You do not paste anything in the DocWriter UI for this path.
  1. Open a terminal on the same computer that runs DocWriter.
  2. Run claude to open Claude Code.
  3. Type /login (a Claude Code slash command — not a DocWriter menu) and finish the browser sign-in.
  4. In DocWriter, open Settings, then API keys. Claude should show Using login.
Leave the Anthropic API key field empty. Pasting an ANTHROPIC_API_KEY works, but agent calls then bill Anthropic API usage instead of your Claude Code subscription. If the agent toast says authentication failed and mentions /login, it means those terminal steps above — refresh the Claude Code login, then retry in DocWriter. See Provider errors. To use an API key instead:
Or paste the key under Settings → API keys. Remove the stored key (and clear any shell ANTHROPIC_API_KEY) when you want to return to Claude Code login.

OpenAI and Codex

OpenAI uses OPENAI_API_KEY. Codex can use an existing Codex login. Choose a model that is available to the account.

Cursor

Cursor uses the signed in Cursor environment. Session recovery differs from provider to provider, so start a new session when a saved provider session can no longer resume.

Pi

Pi can use provider keys such as TOGETHER_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, or ANTHROPIC_API_KEY, depending on the selected model.

Choose a model the account can use

The model list can include models that are not enabled for every account. If a request returns a model error, choose another model from the same provider and send the test request below again. Provider features differ. For example, some providers have their own sessions, skills, or subagents. The main writing and review workflow stays the same across providers.

Test the connection

Open a small text file, click Chat in the agent dock, and send:
The Chat panel with a request ready to send

Open Chat from the agent dock and enter the test request.

If the request fails, open Provider errors. The test asks the agent to read without editing, so the file should remain unchanged. When you see the summary in the agent dock, continue to Your first writing workflow.