Skip to main content
POST
/
split
Split Document
curl --request POST \
  --url https://platform.aifano.com/split \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": "<string>",
  "split_description": [
    {
      "title": "<string>",
      "description": "<string>"
    }
  ],
  "split_rules": "Split the document into the applicable sections. Sections may only overlap at their first and last page if at all.",
  "parsing": {
    "enhance": {
      "agentic": [],
      "summarize_figures": true
    },
    "retrieval": {
      "chunking": {
        "chunk_mode": "disabled",
        "chunk_size": 123
      },
      "filter_blocks": [],
      "embedding_optimized": false
    },
    "formatting": {
      "add_page_markers": false,
      "table_output_format": "dynamic",
      "merge_tables": false,
      "include": []
    },
    "spreadsheet": {
      "split_large_tables": {
        "enabled": true,
        "size": 50
      },
      "clustering": "accurate"
    },
    "settings": {
      "ocr_system": "standard",
      "extraction_mode": "hybrid",
      "force_url_result": false,
      "return_ocr_data": false,
      "return_images": [],
      "page_range": {
        "start": 123,
        "end": 123
      },
      "timeout": 123,
      "document_password": "<string>"
    }
  },
  "settings": {
    "table_cutoff": "truncate"
  }
}
'
{
  "job_id": "<string>",
  "result": [
    {
      "category": "<string>",
      "page_range": {
        "start": 123,
        "end": 123
      },
      "content": "<string>"
    }
  ],
  "duration": 123,
  "usage": {
    "num_pages": 123,
    "credits": 123
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Use your Aifano API key (starts with ak_live_) as the Bearer token.

Body

application/json
input
required

The document to process. Accepts: (1) a public URL, (2) a presigned S3 URL, (3) an aifano://file_id from /upload, or (4) a jobid://job_id from a previous /parse call.

split_description
object[]
required

Categories to split the document into.

split_rules
string
default:Split the document into the applicable sections. Sections may only overlap at their first and last page if at all.

Rules for how to split the document.

parsing
object

Configuration for the parsing step. Ignored when using jobid:// input.

settings
object

Response

Successful split

job_id
string
required
result
object[]
required
duration
number
usage
object