Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Cloud AI Providers

DocGraph’s AI runs on a local model by default. If you want a hosted model for harder questions, you can bring your own key for OpenAI, Anthropic, OpenRouter, or any OpenAI-compatible endpoint (for example LM Studio or llama.cpp on your own computer).

A cloud model is the one AI feature that sends your note content to another company. It is built so that happens only when you choose it, and you can always see when it does:

  • Off by default. Nothing is sent to any provider until you save a key, allow the provider, and pick one of its models.
  • Local stays the default. A cloud model is used only by a conversation whose model picker names one, or by a document action whose Run on choice names one. A cloud model can’t become your default chat model, and background jobs — tag suggestions, inline suggestions, the small helper steps behind chat — always use your local model.
  • Every call is visible. The title-bar badge, a strip above the chat box, and the Activity log all say when content goes to a provider.
  • Secrets are blocked by default. A prompt that contains what looks like an API key or token is not sent to a cloud provider.

When you use a cloud model, DocGraph sends that provider:

  • your message and the conversation so far,
  • excerpts of the notes it retrieved to answer,
  • in Agent Mode, the contents of files the model chooses to read,
  • for a document action, the document you ran it on.

The provider may keep or train on what it receives under its own policy. OpenRouter forwards each request to the company that runs the model you picked, so two companies receive it. DocGraph cannot see or control what a provider does after the request arrives.

Search stays on your machine either way: the index and embeddings that find the relevant notes are always local. Only the generation step goes to the provider.

  1. Open Settings → AI → Models & providers and scroll to AI Providers.
  2. Paste your API key for the provider and click Save. No key yet? Get your {provider} API key under the field opens the provider’s key page. The key is stored in your operating system’s keychain — never in DocGraph’s files, logs or the Activity log. DocGraph fetches the provider’s model list when you save, and again whenever you click Test & refresh models, which also checks the key works and reports Connected · {n} models. Remove deletes the saved key from the keychain. Each card’s status line says what is still missing: No key, Key saved · no model list yet, {n} models · not allowed yet, or Ready · {n} models in the chat picker.
  3. Click Allow {provider}… and confirm in the system dialog. This is a one-time permission per provider; Revoke permission removes it.
  4. In the chat panel, open the model picker. The provider’s models appear in their own section, after the local ones, with a cloud icon; the Cloud filter chip (or typing @cloud or @openrouter) shows only those.

For a Custom endpoint, enter its URL and click Save (the key is optional there). An endpoint on your own computer (127.0.0.1 or localhost) counts as local: it needs no permission and the badge stays green. A remote endpoint must use https:// and needs permission like any other provider. Changing the endpoint’s host removes its permission, because permission was given for a destination.

Calls are billed to your account by the provider. Set a spending limit on your API key in the provider’s dashboard — it is the only cap DocGraph cannot bypass.

DocGraph also helps you keep an eye on cost:

  • Each answer shows its tokens and cost underneath, and the chat keeps a running total above the composer.
  • An Agent Mode turn on a cloud model stops after 6 model calls, and a single turn stops sending once it reaches 250,000 prompt tokens (changeable only in the settings file). Each call re-sends the assistant’s tools and instructions, so an agent turn costs several times a plain question.
  • Anthropic models reuse cached instructions between calls, which makes the later calls in a turn much cheaper.

Costs marked ≈ are estimates from the token counts and a price list; a cost without ≈ was reported by the provider. Your provider’s bill is always the authority.

  • Badge — while a cloud model is selected, the title-bar pill reads Cloud AI · {provider} (or Remote AI · {provider} for a model on another machine on your network), and it pulses while a request is in flight. It never reads 100% local while an off-machine model is selected. See The privacy badge.
  • Composer strip — Sent to {provider} · off this machine sits above the chat box.
  • Tool steps — in Agent Mode, a step that read a file says → sent to {provider}.
  • Chat history — a cloud icon marks any chat that had a turn on a cloud model.
  • Activity log — Settings → Privacy → Activity & audit records every call: provider, model, tokens, cost, and which notes were in context. Not a transcript.

/write, Ask AI and Beautify show a Run on choice in their dialogs; it starts on your local model. Summarize and Proofread always run locally first, and their result panels offer Run on for Regenerate and Recheck. Picking a cloud model there says, right under the choice, that the document will be sent to the provider.

The choice only appears once you have a provider set up.

Block secrets from being sent to cloud providers is on by default (top of AI Providers). When a prompt bound for a cloud model contains something that looks like an API key, token or credential, it is not sent and the chat tells you why.

This is a pattern check: it catches common secret formats, not every private detail in a note. A vault where secret checks are turned off in the Security Audit section of Settings → Privacy → Activity & audit is not checked.

  • It does not make cloud AI private. The provider receives your content.
  • It does not stop Agent Mode from reading more than you named: with a cloud model, the files the agent chooses to read are sent too.