---
title: "Patch Kg Extraction Settings"
method: PATCH
path: "/api/workspace/kg-extraction/settings"
tags: ["workspace-kg-extraction", "workspace-kg-extraction"]
---

# Patch Kg Extraction Settings

`PATCH /api/workspace/kg-extraction/settings`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/workspace/kg-extraction/settings`
- Auth: none declared

Update kg_extraction_model and/or kg_extraction_fallback_policy.

Both fields are optional in the PATCH — caller can update either or
both. workspaces has a BEFORE UPDATE trigger (trg_workspaces_updated_at)
that maintains updated_at automatically.

Model storage: workspaces.settings JSONB key, matches the
`generate_model` pattern from /ai/generate-action so the same UI
persistence story applies.

## Request body

- KGSettingsPatch
  - `kg_extraction_model` 'gpt-4o-mini' | 'gpt-4.1-mini' | 'claude-haiku-4-5-20251001' | 'deepseek-v4-flash-nothink' | 'deepseek-chat', nullable
  - `kg_extraction_fallback_policy` 'prefer_quality' | 'prefer_byok', nullable
  - `kg_extraction_enabled` boolean, nullable

## Response `200`

Successful Response

- KGSettingsOut
  - `kg_extraction_model` 'gpt-4o-mini' | 'gpt-4.1-mini' | 'claude-haiku-4-5-20251001' | 'deepseek-v4-flash-nothink' | 'deepseek-chat', required
  - `kg_extraction_fallback_policy` 'prefer_quality' | 'prefer_byok', required
  - `kg_extraction_enabled` boolean, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/77bef09a9209?raw)
