> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clevrscan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Detect Document

> Uploads a document for synchronous detection and classification. Returns detection results immediately (blocking request).

### Request Format

**Option 1:Multipart Form Data**

```http
POST /api/sync/detect_document
Content-Type: multipart/form-data
X-API-Key: <api_key>

file: <binary file>
```

### Parameters

| Parameter | Type   | Required | Location | Description                                |
| --------- | ------ | -------- | -------- | ------------------------------------------ |
| file      | File   | Yes      | Body     | Document file (PDF, image, etc.) to detect |
| api\_key  | String | Yes      | Header   | API key                                    |

<RequestExample>
  ```bash cURL
  curl -X POST "https://api.clevrscan.com/api/sync/detect_document" \
    -H "X-API-Key: <api_key>" \
    -F "file=@invoice.pdf"
  ```
</RequestExample>

<ResponseExample>
  ````json Sample Response
  {
      "result": "```json\n{\n  \"type\": \"Invoice\",\n  \"fields\": [\n    \"Company Name\",\n    \"Company Address\",\n    \"Bill To\",\n    \"Ship To\",\n    \"Invoice Number\",\n    \"Invoice Date\",\n    \"P.O. Number\",\n    \"Due Date\",\n    \"Invoice Total\",\n    \"Quantity\",\n    \"Description\",\n    \"Unit Price\",\n    \"Amount\",\n    \"Subtotal\",\n    \"GST\",\n    \"Terms & Conditions\",\n    \"Payment Due Date\",\n    \"Bank Name\",\n    \"Account Number\",\n    \"Routing Number\"\n  ]\n}\n```"
  }
  ````
</ResponseExample>
