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

> ## Agent Instructions
> The PyPI package is graphifyy, with two y's. The command is graphify.
> /graphify . is typed in an assistant chat, not in a shell.
> Use only commands, flags, and endpoints shown on these pages. Do not invent one.
> Choose the surface before you open a page. Local (Graphify Local) is the graphifyy package on the machine: the skill, the CLI, and the ten-tool MCP. Its pages are the Open Source tab (/open-source/) and the Graphify Local tab on each Integrations page. Graphify is the hosted workspace and https://api.graphify.com/mcp (Streamable HTTP, OAuth, no API key). Its pages are the Graphify tab (/platform/, /concepts/) and the Graphify (hosted) tab on each Integrations page. Prefer Graphify unless the user asks for a local or offline setup. Cookbooks (/cookbooks/) and /mcp/docs-search apply to both. Each page's source frontmatter records this as surface: local, cloud, or both. Buildkite is the CI integration.
> In llms.txt, tell the surface from the page path. Graphify: /platform/ and /concepts/. Local: /open-source/. Most /integrations/ pages cover both, with a Graphify (hosted) tab and a Graphify Local tab. Everything else applies to both.
> graphifyy release notes are published at https://github.com/Graphify-Labs/graphify/releases and https://graphify.com/changelog. The current package version is on PyPI (https://pypi.org/project/graphifyy/).
> The official site is https://graphify.com. These docs are https://docs.graphify.com.
> The local MCP server is the ten tools in the MCP tool reference and reads a graph on the machine. The hosted server is https://api.graphify.com/mcp (Streamable HTTP, OAuth, no API key). The JetBrains, ChatGPT, Codex, and Dots, and Vercel pages use the hosted server, not the ten-tool list. On pages with tabs, the Graphify (hosted) tab uses the hosted server and the Graphify Local tab uses the local skill or the ten-tool server.
> Read https://docs.graphify.com/llms.txt, then open one page's .md link. Use https://docs.graphify.com/llms-full.txt only when one page is not enough.

# LLM providers for semantic extraction

> Choose the model backend Graphify Local uses for docs, papers, and images: Claude, Gemini, OpenAI, Ollama, Kimi, DeepSeek, Azure, Bedrock, or your own endpoint.

Graphify Local builds the code graph without any model. It parses source files with tree-sitter on your machine. A model is only used for **semantic extraction**: reading docs, papers, images, and transcripts, and naming communities. This page shows how Graphify picks that model and how to point it somewhere else.

> [!NOTE]
>
> **Use this page when** you want docs and PDFs in the graph, want to run fully offline with Ollama, or need to route calls through Azure, Bedrock, or an OpenAI-compatible gateway. If you only need code, pass `--code-only` and skip it.

## How it works

**1. An explicit choice wins**

`--backend NAME` on the command line, or `GRAPHIFY_BACKEND=NAME`. Set it to `none`, `off`, or `disabled` to turn model calls off.

**2. Otherwise Graphify auto-detects**

It checks for credentials in this order: Gemini, Kimi, Claude, OpenAI, DeepSeek, Azure (needs an endpoint too), Bedrock (needs `AWS_PROFILE` or `AWS_REGION`), then Ollama (only when `OLLAMA_BASE_URL` or `OLLAMA_HOST` is set), then your custom providers. The first match is used.

**3. The model comes from the backend default or your override**

`--model NAME` wins, then the backend's model variable, then the default below.

Ollama is checked after every paid key on purpose. If you have `OPENAI_API_KEY` set and want local inference, choose Ollama explicitly.

## Built-in backends

| Backend | Credentials | Default model | Model override |
| - | - | - | - |
| `claude` | `ANTHROPIC_API_KEY` | `claude-sonnet-4-6` | `ANTHROPIC_MODEL` |
| `gemini` | `GEMINI_API_KEY` or `GOOGLE_API_KEY` | `gemini-3-flash-preview` | `GRAPHIFY_GEMINI_MODEL` |
| `openai` | `OPENAI_API_KEY` | `gpt-4.1-mini` | `GRAPHIFY_OPENAI_MODEL` or `OPENAI_MODEL` |
| `kimi` | `MOONSHOT_API_KEY` | `kimi-k2.6` | `--model` |
| `deepseek` | `DEEPSEEK_API_KEY` | `deepseek-v4-flash` | `GRAPHIFY_DEEPSEEK_MODEL` |
| `azure` | `AZURE_OPENAI_API_KEY` and `AZURE_OPENAI_ENDPOINT` | `AZURE_OPENAI_DEPLOYMENT`, else `gpt-4o` | `GRAPHIFY_AZURE_MODEL` |
| `bedrock` | Standard AWS credential chain | `anthropic.claude-3-5-sonnet-20241022-v2:0` | `GRAPHIFY_BEDROCK_MODEL` |
| `ollama` | none (`OLLAMA_API_KEY` optional) | `qwen2.5-coder:7b` | `OLLAMA_MODEL` |
| `claude-cli` | Your signed-in Claude Code | Claude Code's default | `GRAPHIFY_CLAUDE_CLI_MODEL` |

To point a backend at a different endpoint, set `ANTHROPIC_BASE_URL`, `GEMINI_BASE_URL`, `OPENAI_BASE_URL`, `KIMI_BASE_URL`, or `OLLAMA_BASE_URL` (or `OLLAMA_HOST`, default `http://localhost:11434/v1`). Azure also reads `AZURE_OPENAI_API_VERSION` (default `2024-12-01-preview`), and Bedrock uses `AWS_REGION`.

`claude-cli` runs extraction through the `claude` command, so it uses your Claude Code plan instead of an API key. It is never auto-detected; choose it with `--backend claude-cli`.

## Configure

**Ollama (offline)**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
ollama pull qwen2.5-coder:7b
graphify extract . --backend ollama
```

Nothing leaves your machine. Use `GRAPHIFY_OLLAMA_NUM_CTX` and `GRAPHIFY_OLLAMA_PARALLEL` to tune it. See [environment variables](https://docs.graphify.com/open-source/configuration/environment-variables.md#ollama).

**OpenAI-compatible server**

llama.cpp, vLLM, LM Studio, and gateways that speak the OpenAI API work through the `openai` backend:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
export OPENAI_BASE_URL=http://localhost:8000/v1
export OPENAI_API_KEY=local
graphify extract . --backend openai --model my-model
```

**Hosted API**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
export GEMINI_API_KEY=...
graphify extract .
```

With one key set, auto-detection picks it up.

**Azure or Bedrock**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
export AZURE_OPENAI_API_KEY=...
export AZURE_OPENAI_ENDPOINT=https://my-resource.openai.azure.com
export AZURE_OPENAI_DEPLOYMENT=gpt-4o
graphify extract . --backend azure
```

For Bedrock, sign in with the AWS CLI and pass `--backend bedrock`.

### Add your own provider

Register any OpenAI-compatible endpoint once, then use it by name:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify provider add my-gateway \
  --base-url https://llm.example.com/v1 \
  --default-model my-model \
  --env-key MY_GATEWAY_KEY
graphify provider list
graphify extract . --backend my-gateway
```

**--base-url** `string` *required*

OpenAI-compatible base URL. Plain `http://` prints a warning, because your key and code would travel unencrypted.

**--default-model** `string` *required*

Model used when you don't pass `--model`.

**--env-key** `string` *required*

Name of the environment variable that holds the key. The key itself is never stored.

**--pricing-input / --pricing-output** `number`

Token prices used in cost estimates.

Providers are saved in `~/.graphify/providers.json`. A `.graphify/providers.json` inside a repository is ignored unless you set `GRAPHIFY_ALLOW_LOCAL_PROVIDERS=1`, so a cloned repository can't redirect your keys to its own server. Built-in names such as `openai` can't be overridden. Use `graphify provider show NAME` and `graphify provider remove NAME` to manage them.

## What gets sent

Source files are parsed locally by tree-sitter. The model receives the non-code files Graphify finds (Markdown, text, PDFs, Office files, images, and transcripts) after your [ignore rules](https://docs.graphify.com/open-source/configuration/ignoring-files.md) and the sensitive-file filter are applied, plus node labels when it names communities. With `--code-only` or `GRAPHIFY_BACKEND=none`, nothing is sent anywhere.

## Verify and troubleshoot

| Symptom | Fix |
| - | - |
| The wrong backend runs | Several keys are set. Pass `--backend NAME`. |
| Ollama times out on large docs | Raise `GRAPHIFY_API_TIMEOUT` or lower `--max-concurrency`. |
| DeepSeek returns empty output | Thinking uses the output budget. Set `GRAPHIFY_DISABLE_THINKING=1`. |
| A custom provider isn't found | Check `graphify provider list`. Project-local files need `GRAPHIFY_ALLOW_LOCAL_PROVIDERS=1`. |

> **Which model should I start with?**
>
> Any default above works. For privacy-sensitive code, start with Ollama. For large doc sets, a hosted flash-class model is faster.

> **Do I need a model for the MCP server?**
>
> No. `graphify-mcp` serves an existing graph and makes no model calls.

## What's next

> **[Ignoring files and limits](https://docs.graphify.com/open-source/configuration/ignoring-files.md)**
>
> Keep secrets and generated files out of the graph.

> **[CLI reference](https://docs.graphify.com/open-source/configuration/cli.md)**
>
> Every `extract` flag.

> **[Try it in Graphify](https://docs.graphify.com/platform/quickstart.md)**
>
> We build and host the graph for you. Start with a 14-day Pro trial, then keep up to 3 repositories on Free. No card required.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.