Skip to main content
GET
Read a file

Authorizations

Authorization
string
header
required

A Parley API key.

Path Parameters

id
string
required

The file or folder ID.

Minimum string length: 1

Query Parameters

offset
integer
default:0

Where to start reading, in characters. Pass the previous nextOffset to continue.

Required range: 0 <= x <= 9007199254740991
limit
integer
default:60000

Maximum number of characters to return, at about 4 characters per token.

Required range: 1000 <= x <= 100000
toEnd
boolean
default:false

Return everything from offset to the end in one response, ignoring limit. A long file's text can run to millions of characters, far more than fits in a model's context, so leave this false unless the result is written to a file rather than read.

Response

OK

id
string
required

The file or folder ID.

Minimum string length: 1
name
string
required

The file name.

offset
integer
required

Where this window starts, in characters.

Required range: -9007199254740991 <= x <= 9007199254740991
nextOffset
integer | null
required

Pass as offset to read the next window, or null when this window reaches the end.

Required range: -9007199254740991 <= x <= 9007199254740991
totalLength
integer
required

The length of the whole text, in characters.

Required range: -9007199254740991 <= x <= 9007199254740991
text
string
required

The text in this window.