---
title: "提取文本关系"
method: POST
path: "/initialization/extract/relations"
tags: ["初始化"]
---

# 提取文本关系

`POST /initialization/extract/relations`

从文本中提取实体和关系

## Request body

- InternalHandlerTextRelationExtractionRequest
  - `llm_config` InternalHandlerLLMConfig
    - `api_key` string
    - `base_url` string
    - `model_name` string
    - `source` string
  - `tags` string[], required
  - `text` string, required

## Response `200`

提取结果

- object

## Other responses

- `400` — 请求参数错误

## Changes

- **2025-12-22** `e625bcd5b8b9` — 1 info
  - the endpoint scheme security `ApiKeyAuth` was added to the API
- **2025-12-16** `edf61e68559d` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/tencentblueking/apis/weknora-api/changes/initialization/extract/relations/post.md)

---

[API](https://skmtc.dev/tencentblueking/apis/weknora-api.md) · [All operations](https://skmtc.dev/tencentblueking/apis/weknora-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tencentblueking/weknora-api/revisions/a7ea016b0504/schema)
