POST
/
v1
/
documents
/
analyze
curl --request POST \
  --url https://api.traddocs.com/v1/documents/analyze \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: <api-key>' \
  --form file=@your/path/sample.pdf \
  --form url=https://url_to_your_document.pdf
[
  {
    "split": {
      "document_type": "<string>",
      "pages": [
        123
      ]
    },
    "extracted": {}
  }
]

Analyze Document Endpoint

The Analyze Document endpoint processes and analyzes multiple documents to extract important information. Here’s a detailed breakdown of its functionality:
  1. Document Splitting: The endpoint splits the provided documents into the appropriate types using a document splitter.
  2. Information Extraction: The endpoint extracts key-value pairs of important information from each split document.

Supported document types

curl --request POST \
  --url https://api.traddocs.com/v1/documents/analyze \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: <api-key>' \
  --form file=@your/path/sample.pdf \
  --form url=https://url_to_your_document.pdf

Authorizations

x-api-key
string
header
required

Body

multipart/form-data

Represents a request for document analysis. The object can contain either a file or a URL pointing to the document to be analyzed. The properties are mutually exclusive, meaning you should provide either a file or a URL, but not both.

Response

200
application/json

Successful Response

The JSON response format for each document type can be referenced here. By using this endpoint, you can efficiently manage and process multiple documents, obtaining structured and relevant information from them.