---
title: "Detect Mappings Stream"
method: POST
path: "/api/pdf/detect-mappings-stream"
tags: ["PDF Form Processing"]
---

# Detect Mappings Stream

`POST /api/pdf/detect-mappings-stream`

Stream field mappings in real-time using Server-Sent Events.

As each field is filled by the parallel agents, events are sent to the client.
This provides real-time UI updates during the form filling process.

## Request body

- PdfRoutesDetectMappingsRequest — Request model for mapping detection - supports multiple documents
  - `pdf_content` string, required
  - `document_data` object, nullable
  - `documents` PdfRoutesDocumentData[], nullable
    - `id` string, required
    - `name` string, required
    - `extracted_data` object, nullable
  - `field_schema` SchemaField[], nullable
    - `name` string, required
    - `type` string
    - `description` string
  - `schema` SchemaField[], nullable
    - `name` string, required
    - `type` string
    - `description` string
  - `high_precision` boolean
  - `field_descriptions` object, nullable
  - `custom_fields` object[], nullable
  - `agent_rules` string, nullable

## 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)
