Skip to content

Get a file

GET
/api/v1/files/{fileId}
curl --request GET \
--url https://api.langparse.dev/api/v1/files/file_mrb1a2c3d4 \
--header 'X-Api-Key: <X-Api-Key>'

File metadata + a short-lived presigned S3 download URL (attachment, ~15 min). Request on demand; do not cache the URL.

fileId
required
string
Example
file_mrb1a2c3d4

File metadata + signed download URL.

Media typeapplication/json
object
data
required
object
id
string
fileName
string
byteSize
integer
nullable
pageCount
integer
nullable
contentType
string
nullable
url

Presigned S3 GET (attachment). Expires per expiresInSeconds. Request on demand.

string
expiresInSeconds
integer
Example
{
"data": {
"id": "file_mrb1a2c3d4",
"fileName": "invoice.pdf",
"byteSize": 48213,
"pageCount": 2,
"contentType": "application/pdf",
"url": "https://…s3…X-Amz-Signature=…",
"expiresInSeconds": 900
}
}

Missing or invalid API key.

Media typeapplication/json

Error response. statusCode mirrors the HTTP status; statusMessage is human-readable.

object
statusCode
integer
statusMessage
string
Example
{
"statusCode": 404,
"statusMessage": "Document not found"
}

File not found.

Media typeapplication/json

Error response. statusCode mirrors the HTTP status; statusMessage is human-readable.

object
statusCode
integer
statusMessage
string
Example
{
"statusCode": 404,
"statusMessage": "Document not found"
}