> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://stelltec.com/rhebok/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://stelltec.com/rhebok/docs/_mcp/server.

# Read the config

GET http://127.0.0.1:7331/api/config

Returns `config.toml` three ways (what the file sets, what rhebok runs
with, and the defaults), its etag, its problems, whether each secret is
set, which environment variables override the remote embedding
endpoint, and the embedding models the dashboard offers. Secret values
are never returned.


Reference: https://stelltec.com/rhebok/docs/api/config/get-config

## Response

### 200

The config state. The example trims `effective` and `defaults` to a few keys; the real objects hold the whole config.

- `path` (string, required) — The path of `config.toml`.
- `exists` (boolean, required)
- `etag` (string, required) — sha256 of the file's bytes as hex, or `""` when there is no file. Send it back on save.
- `effective` (map from string to any, required) — The whole config rhebok runs with, every default filled in. Keys that look like secrets are removed. Dotted paths into this object are the keys of a save's `set`.
- `surface_weights` (ConfigViewSurfaceWeights, required) — The ranking weights the hook and MCP each use after per-surface overrides.
- `file` (map from string to any, required, nullable) — Only what `config.toml` itself sets. `{}` when there is no file, null when it does not parse.
- `defaults` (map from string to any, required) — The config with nothing set, in the same shape as `effective`.
- `errors` (list of FieldError, required) — Every problem in the file as it is now.
- `secrets` (ConfigViewSecrets, required) — Whether each secret is set. The values are never returned.
- `env_overrides` (list of EnvOverride, required) — Endpoint settings that come from the process environment, which the dashboard cannot change.
- `embed_models` (list of EmbedModelChoice, required)
- `endpoint` (EmbedEndpointState, required)

## Errors

### 421 Misdirected Request Error

The `Host` header does not name this dashboard (see the rules at the top of this page).

- `error` (string, required) — What went wrong, in plain words.

### 500 Internal Server Error

lbug's `vector` extension could not be loaded. This is a stable state, so `stable` is true and a retry will not help.

- `error` (string, required) — The message, which names the extension directory.
- `stable` (true, required) — Always true. The state will not clear on retry.

### 503 Service Unavailable Error

The config file could not be read.

- `error` (string, required) — What went wrong, in plain words.

## Types

### ConfigViewSurfaceWeights

The ranking weights the hook and MCP each use after per-surface overrides.

- `hook` (map from string to any, required)
- `mcp` (map from string to any, required)

### FieldError

One problem with `config.toml` or with a requested change.

- `path` (string, required) — The dotted key (`hook.threshold`), or `""` for a syntax error.
- `message` (string, required)
- `line` (integer, required, nullable) — The 1-based line in `config.toml`, or null when the problem has no single line.

### ConfigViewSecrets

Whether each secret is set. The values are never returned.

- `embed.token` (enum, required)
  - Allowed values: `set`, `unset`
- `pdf.ocr_token` (enum, required)
  - Allowed values: `set`, `unset`
- `backup.key` (enum, required)
  - Allowed values: `set`, `unset`
- `backup.drive_token` (enum, required)
  - Allowed values: `set`, `unset`

### EnvOverride

- `variable` (enum, required)
  - Allowed values: `RHEBOK_EMBED_URL`, `RHEBOK_EMBED_MODEL`, `RHEBOK_EMBED_TOKEN`
- `setting` (enum, required)
  - Allowed values: `endpoint.url`, `endpoint.model`, `embed.token`

### EmbedModelChoice

- `id` (string, required)
- `label` (string, required)
- `model` (string, required)
- `dimensions` (integer, required)
- `hook_threshold` (double, required)
- `mcp_threshold` (double, required)
- `size` (string, required)
- `min_ollama` (string, required, nullable)
- `summary` (string, required)

### EmbedEndpointState

- `backend` (enum, required)
  - Allowed values: `ollama`, `remote`
- `url` (string, required, nullable)
- `model` (string, required, nullable)
- `error` (string, required, nullable) — Why the remote endpoint settings could not be used, or null.

## Examples

**Response**

```json
{
  "path": "/Users/me/Library/Application Support/rhebok/config.toml",
  "exists": true,
  "etag": "9b1d2c3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c",
  "effective": {
    "embed": {
      "dimensions": 512,
      "model": "qwen3-embedding:0.6b",
      "ollama_url": "http://localhost:11434"
    },
    "hook": {
      "max_tokens": 1500,
      "quality": null,
      "threshold": 0.66
    },
    "index_transcripts": true,
    "sources": [
      "/Users/me/vault"
    ]
  },
  "surface_weights": {
    "hook": {
      "authority": 0,
      "current": 1,
      "decay": {
        "enabled": false,
        "floor": 0.1,
        "grace_days": 90,
        "half_life_days": 100
      },
      "investigating": 1,
      "markdown": 1,
      "memory": 1,
      "pdf": 1,
      "proposed": 1,
      "superseded": 0.88,
      "transcript": 0.45,
      "web": 1
    },
    "mcp": {
      "authority": 0,
      "current": 1,
      "decay": {
        "enabled": false,
        "floor": 0.1,
        "grace_days": 90,
        "half_life_days": 100
      },
      "investigating": 1,
      "markdown": 1,
      "memory": 1,
      "pdf": 1,
      "proposed": 1,
      "superseded": 0.88,
      "transcript": 0.85,
      "web": 1
    }
  },
  "file": {
    "sources": [
      "/Users/me/vault"
    ]
  },
  "defaults": {
    "index_transcripts": true,
    "sources": []
  },
  "errors": [],
  "secrets": {
    "embed.token": "unset",
    "pdf.ocr_token": "unset",
    "backup.key": "unset",
    "backup.drive_token": "unset"
  },
  "env_overrides": [],
  "embed_models": [
    {
      "id": "qwen3",
      "label": "Qwen3-Embedding 0.6B",
      "model": "qwen3-embedding:0.6b",
      "dimensions": 512,
      "hook_threshold": 0.66,
      "mcp_threshold": 0.55,
      "size": "about 640 MB",
      "min_ollama": null,
      "summary": "the default; runs on any recent Ollama"
    },
    {
      "id": "gemma",
      "label": "EmbeddingGemma 2 (270M, bf16)",
      "model": "embeddinggemma-2:270m-bf16-text",
      "dimensions": 512,
      "hook_threshold": 0.82,
      "mcp_threshold": 0.68,
      "size": "about 575 MB",
      "min_ollama": "0.40.0",
      "summary": "about 10% faster per query, same recall; needs Ollama 0.40 or newer"
    }
  ],
  "endpoint": {
    "backend": "ollama",
    "url": null,
    "model": null,
    "error": null
  }
}
```

**SDK Code**

```python Config_getConfig_example
import requests

url = "http://127.0.0.1:7331/api/config"

response = requests.get(url)

print(response.json())
```

```javascript Config_getConfig_example
const url = 'http://127.0.0.1:7331/api/config';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Config_getConfig_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://127.0.0.1:7331/api/config"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Config_getConfig_example
require 'uri'
require 'net/http'

url = URI("http://127.0.0.1:7331/api/config")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java Config_getConfig_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://127.0.0.1:7331/api/config")
  .asString();
```

```php Config_getConfig_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://127.0.0.1:7331/api/config');

echo $response->getBody();
```

```csharp Config_getConfig_example
using RestSharp;

var client = new RestClient("http://127.0.0.1:7331/api/config");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Config_getConfig_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "http://127.0.0.1:7331/api/config")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```