Claude and Copilot subscriptions
markitai can use a Claude Code or GitHub Copilot subscription instead of a per-token API key, through the vendor's official CLI on the machine where markitai (or markitai serve) runs.
| Claude | Copilot | |
|---|---|---|
| Model names | claude-agent/<model>, e.g. claude-agent/haiku | copilot/<model>, e.g. copilot/auto |
| CLI | Claude Code 2.1.284 or later | Copilot CLI 1.0.90-2 or later |
| Sign in | markitai auth claude login | markitai auth copilot login |
| Check | markitai auth claude status | markitai auth copilot status |
Install
Install the CLI yourself; markitai finds it on PATH (or at CLAUDE_CLI_PATH, COPILOT_CLI_PATH):
# Claude
npm install -g @anthropic-ai/[email protected] # or: curl -fsSL https://claude.ai/install.sh | bash
# Windows: irm https://claude.ai/install.ps1 | iex
# Copilot
npm install -g @github/[email protected] # or: curl -fsSL https://gh.io/copilot-install | bash
# Windows: winget install GitHub.CopilotThe CLIs update themselves: a newer release is used, with a one-time warning; an older one is refused.
Sign in
Sign in where markitai runs. markitai auth alone shows every subscription; status --json is for scripts. When the workbench says a subscription "is not installed" or "is not signed in", fix it on the server's machine and reload the model list. markitai never starts a sign-in during a conversion.
- Claude: only a subscription sign-in counts. markitai keeps
ANTHROPIC_API_KEYand other API settings away from Claude Code, so the key is never billed instead. - Copilot: a
COPILOT_GITHUB_TOKEN,GH_TOKENorGITHUB_TOKENwith the "Copilot Requests" permission replaces signing in.
With no llm.model_list and no MODEL, a signed-in subscription joins the automatic model pool (claude-agent/haiku, copilot/auto). Subscription models take no api_key, api_base, max_tokens or reasoning_effort, their cost shows as unknown, and a positive llm.max_cost_per_document_usd refuses them (Prices).
If it still fails
On the server's machine, markitai auth claude status (or copilot) shows the CLI release it found and whether it is signed in with a subscription. An older release than the one under Install is refused: update it. A CLI outside PATH needs CLAUDE_CLI_PATH or COPILOT_CLI_PATH. Then reload the model list.
ChatGPT
Through the Codex CLI: see ChatGPT subscription.