Examples
Short examples with input and output.
Example 1: Small text
Input
curl -X POST https://docflow.p.rapidapi.com/process \
-H "x-rapidapi-key: YOUR_RAPIDAPI_KEY" \
-H "x-rapidapi-host: docflow.p.rapidapi.com" \
-F "text=Clause one. Clause two. Clause three." \
-F "chunk_size=40"
Output
{
"chunks": [
{"index": 0, "text": "Clause one. Clause two."},
{"index": 1, "text": "Clause three."}
],
"metadata": {"length": 38, "chunks": 2}
}
Example 2: PDF file
Input
curl -X POST https://docflow.p.rapidapi.com/process \
-H "x-rapidapi-key: YOUR_RAPIDAPI_KEY" \
-H "x-rapidapi-host: docflow.p.rapidapi.com" \
-F "file=@sample.pdf" \
-F "mode=semantic-lite"
Output
{
"chunks": [
{"index": 0, "text": "Abstract..."},
{"index": 1, "text": "Introduction..."}
],
"metadata": {"length": 8421, "chunks": 12}
}
Example 3: Large document
Input
curl -X POST https://docflow.p.rapidapi.com/process \
-H "x-rapidapi-key: YOUR_RAPIDAPI_KEY" \
-H "x-rapidapi-host: docflow.p.rapidapi.com" \
-F "file=@large.docx" \
-F "chunk_size=1500"
Output
{
"chunks": [
{"index": 0, "text": "..."},
{"index": 1, "text": "..."},
{"index": 2, "text": "..."}
],
"metadata": {"length": 52120, "chunks": 36}
}