Skip to content
Get started

Read File Content

files.get(strfile_id, FileGetParams**kwargs) -> PresignedURL
GET/api/v1/beta/files/{file_id}/content

Returns a presigned url to read the file content.

ParametersExpand Collapse
file_id: str
expires_at_seconds: Optional[int]
organization_id: Optional[str]
project_id: Optional[str]
ReturnsExpand Collapse
class PresignedURL:

Schema for a presigned URL.

expires_at: datetime

The time at which the presigned URL expires

formatdate-time
url: str

A presigned URL for IO operations against a private file

minLength1
formaturi
form_fields: Optional[Dict[str, str]]

Form fields for a presigned POST request

Read File Content

import os
from llama_cloud import LlamaCloud

client = LlamaCloud(
    api_key=os.environ.get("LLAMA_CLOUD_API_KEY"),  # This is the default and can be omitted
)
presigned_url = client.files.get(
    file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(presigned_url.expires_at)
{
  "expires_at": "2019-12-27T18:11:19.117Z",
  "url": "https://example.com",
  "form_fields": {
    "foo": "string"
  }
}
Returns Examples
{
  "expires_at": "2019-12-27T18:11:19.117Z",
  "url": "https://example.com",
  "form_fields": {
    "foo": "string"
  }
}