Skip to main content
GET
Read a bounded chunk of existing extracted text

Authorizations

Authorization
string
header
required

Effective API key. Send Authorization: Bearer sk-eai-...

Path Parameters

fileId
string<uuid>
required

Query Parameters

maxBytes
integer
default:16384

Maximum UTF-8 bytes of text per response, 4–65536 (default 16384). Character boundaries may shorten a chunk. Repeat unchanged with cursor.

Required range: 4 <= x <= 65536
pages
string

Read only these 1-based PDF pages, as "121" or "121-124", instead of reading from the start. A response holds whole pages up to maxBytes; continue with nextCursor and the same pages and maxBytes. Pages past the end are left out. 409 pages_unavailable when the text has no page boundaries.

Pattern: ^[1-9]\d{0,5}(?:-[1-9]\d{0,5})?$
cursor
string

Opaque nextCursor, bound to caller scope, file, maxBytes, pages and text revision; it does not expire.

Required string length: 1 - 8192

Response

A revision-bound text chunk with byte location and continuation.

fileId
string<uuid>
required
textRevision
string
required

Identifies this version of the extracted text (not the source file version). If it changes, earlier cursors stop working.

Maximum string length: 68
versionId
string | null
required

Version of the source file this text was extracted from, or null when unknown. Currently always null.

text
string
required

Existing UTF-8 extracted text, at most maxBytes UTF-8 bytes. Empty available text is a successful terminal response. Page markers, if present, remain in text.

Maximum string length: 65536
location
object
required
pages
object[]
required

Pages in text, by offset in this text revision. A page read lists every returned page. A read without pages lists only pages whose --- Page N --- marker is in this chunk. Empty when the text has no page boundaries.

totalPages
integer | null
required

Number of the last page in the text on page reads; null otherwise.

Required range: x > 0
nextCursor
string | null
required

Continue with the same file, maxBytes and pages, or null at the end of the text or requested pages. Retry the same request safely; deduplicate by revision and start offset.