How to Use the PDF.ai Split API

Publish date
Sep 22, 2026
AI summary
The Split API lets you send a PDF (or a cached docId) with a list of named sections to get JSON page‑range results and confidence scores, costing 2 credits per page plus any parse credits if the document isn’t cached; it’s ideal for automating section routing, while separate tools handle simple file splitting, full‑text parsing, field extraction, or free‑form questions.
Language
People look up a Split API when a long PDF has known section names, but the page ranges are not fixed. They need those ranges in JSON, with a confidence signal, so the next step can extract, ask, or store only the pages that matter.
This page is the PDF → named sections / page ranges path on the PDF.ai API v2 Split endpoint. It does not replace the API Hub (keys and plan live there). It does not re-rank the head term pdf api. It is also not the free browser Split PDF tool (that path cuts files into smaller PDFs). For the first-request path (key + first call), see How to Get Started with the PDF.ai API. For turning the file into reusable text first, see How to Use the PDF.ai Parse API.

What Split is for

After a clean Split call on PDF.ai API v2, three things should be true:
  • You sent a split_description JSON array (each item has a name, optional description) plus a file, a url, or a reusable docId
  • The response includes result.splits (each with name, pages, and conf) and a docId
  • You know the credit mix: Split is always 2 credits × page count, and Parse credits apply only when you did not pass a cached docId
Docs: Split.
Practical rule: Split answers "which pages belong to these named sections?" Parse answers "turn this PDF into text I can reuse." Extract answers "give me these fields." Ask answers a free-form question. Use Split when the next step needs section boundaries, not a full-file answer.

Browser split tool vs Split API

Path
Best when
What you get
Web Split PDF tool
One file, no code, cut into smaller PDFs
Downloadable split files in the browser
API POST /v2/split
Automation, your product, section routing
JSON (result.splits · docId) with an X-API-Key

Credits before you scale page count

From the live Split and credit usage docs:
  • Split credits: always 2 credits × page count
  • Parse credits: charged when you send a file or url (see Parse); 0 parse credits when you pass a cached docId
  • Optional parse quality when you upload: standard (default) or advanced; lang_list defaults to ["en"]
  • Total: Parse credits + Split credits
Examples from the Split docs:
  • 10-page PDF, cached docId → parse 0 + split 20 = 20 credits
  • 5-page PDF, not cached, advanced quality → parse 10 + split 10 = 20 credits
API plan examples on credit usage:
  • Free: $0/month for 200 credits/month, no credit card required
  • Paid examples: $49 / 3,000, $99 / 10,000, $249 / 30,000, $599 / 100,000 credits per month
Generate the key and manage the plan on https://pdf.ai/developer. The docs say the key is shown only once when generated.
Practical rule: Parse once, keep the docId, then Split (and Extract / Ask) against that cache so you are not paying parse credits on every section probe.

How to call Split

1. Have an API key

Open https://pdf.ai/developer, generate a key, store it as a secret. Send it as the X-API-Key header on every call.

2. Prefer a cached docId

If you already ran Parse (or a prior Split/Extract that returned a docId), pass that docId. The Split docs say a docId skips parse credits on this call; a file or url still incurs parse credits during the Split request.

3. POST with split_description

Endpoint from the docs: POST https://pdf.ai/api/v2/split
Content type: multipart/form-data.
Required:
  • split_description — JSON array; each object needs a name, and may include a description
Provide one of:
  • docId — reuse a previously parsed document
  • url — public URL of the PDF
  • file — upload the PDF
Optional (from Split):
  • quality: standard (default) or advanced (applies when parsing is part of this call)
  • lang_list: languages for standard OCR (default ["en"])
Example shape (Python), matching the docs sample:
import requests
import json

url = "https://pdf.ai/api/v2/split"
headers = {"X-API-Key": "YOUR_API_KEY"}

split_description = [
    {"name": "Introduction", "description": "Opening section"},
    {"name": "Conclusion", "description": "Summary section"}
]

data = {
    "docId": "your-document-id",
    "split_description": json.dumps(split_description)
}

response = requests.post(url, headers=headers, data=data)
print(response.json())
A successful response includes success, result.splits (each item can include name, pages, and conf such as high / medium), and docId.

4. Check the output before you trust it

  • Confirm success, a non-empty result.splits array, and a docId
  • Spot-check one section's pages against the source PDF
  • Treat conf as a routing signal: low-confidence ranges need a human look or a clearer description
  • If you get Invalid API key / No API key present, fix the header before you rewrite section names
  • If a section returns empty pages, tighten the description or confirm the section exists in that file
Practical rule: page ranges are not extracted fields. If you need named JSON fields from those pages, call Extract next with the same docId and a schema.

When Split is the wrong tool

  • You only need to cut one PDF into smaller files in a browser. Use Split PDF. No API key required for that job.
  • You need a free-form answer in code. Use POST https://pdf.ai/api/v2/ask (How to Use the PDF.ai Ask API). Ask is 3 credits × total page count across the docIds you query, and the document must be parsed first.
  • You wanted a generic “pdf api” category hub. Stay on https://pdf.ai/developer. This page is the Split how-to, not a replacement hub.

A short action plan

  1. Open https://pdf.ai/developer, create a key, store it once.
  1. Check credit usage against page count (2 × pages for Split, plus Parse if uncached).
  1. Prefer POST https://pdf.ai/api/v2/parse on a short PDF, save the docId, then POST https://pdf.ai/api/v2/split with a clear split_description.
  1. Spot-check result.splits[].pages and conf against the source PDF, then call Extract or Ask with that docId if the next step needs fields or answers.
If you want the rest of the PDF workflow after section ranges are clear, start at PDF.ai. Use the Split API when the next step is your pipeline, not a single upload box.