Skip to main content
GET
/
api
/
v3
/
files
/
{id}
/
download
Download a document file
curl --request GET \
  --url https://api.lighton.ai/api/v3/files/{id}/download \
  --header 'Authorization: Bearer <token>'
{
  "id": null,
  "code": 422,
  "error": "validation_error",
  "detail": "One or more fields failed validation.",
  "doc_url": "https://developers.lighton.ai/errors#validation_error",
  "fields": {
    "<field_name>": [
      {
        "error": "required",
        "detail": "This field is required."
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer
required

A unique integer value identifying this Document.

Query Parameters

purpose
enum<string>

Which file version to serve. Defaults to 'original'. Falls back to 'original' if the requested purpose has no associated file.

Available options:
original,
rendered_pdf,
transcript

Response

Binary file content or sanitized markdown text