TL;DR
Send an array of descriptions for what you want (e.g., “invoices”, “contracts”, “account number xyz”). Cardinal returns which pages match each description.Endpoint
POSThttps://api.trycardinal.ai/split
Content-Type:
multipart/form-data
Auth:
Authorization: Bearer <API_KEY>
You may provide eitherfile
orfileUrl
.
Required parameters
queries
(string) — JSON-encoded array of query objects (see format below)file
(file upload) ORfileUrl
(string)
Query object format
Each query is:name
(string) — label you’ll see in the response (e.g.,"invoices"
)description
(string) — natural-language hint used to find relevant pages
queries
value
Example requests
Example Response
Response Format
The response includes:success
- Boolean indicating if partitioning completed successfullypages
- Array of page objects with content and metadatapartitions
- Array of partition results, each containing:name
- The partition name from your querydescription
- The partition description from your querypages
- Array of page numbers that match this partition (sorted)
Supported File Types
This endpoint supports:- PDF files (.pdf)
- Images (.jpg, .jpeg, .png)
Writing Effective Queries
Good query descriptions:- Be specific about content type: “Financial tables with revenue data”
- Include context clues: “Pages with signatures or sign-off sections”
- Mention visual indicators: “Charts, graphs, or data visualizations”
- Too vague: “Important pages”
- Overly restrictive: “Page 5 specifically about Q3 sales in the northeast region”