---
title: "Fill Fields"
method: POST
path: "/api/kb/fill-fields"
tags: ["Knowledge Base"]
---

# Fill Fields

`POST /api/kb/fill-fields`

Find values to fill PDF/Excel fields using semantic search.

For each field in the request, searches for the best matching
value from the user's indexed documents. Returns alternatives
so user can choose if the first match isn't correct.

Args:
    request: Fields to fill with optional batch filter

Returns:
    List of field matches with best match and alternatives

## Request body

- FillFieldsRequest — Request to find values for filling fields
  - `fields` object[], required
  - `batch_id` string, nullable
  - `num_alternatives` integer

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/qomplement/apis/fastapi.md) · [All operations](https://skmtc.net/qomplement/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qomplement/fastapi/revisions/718de1c0d866/schema)
