Get a file
This endpoint allows you to retrieve the content of a file by its ID. You must provide the file ID in the path and the user ID in the headers.
This endpoint returns the content of the specified file in LLM format. Use offset and max_characters together to paginate through files larger than max_characters. Set max_characters to -1 to retrieve the full file content without truncation.
Authorization
ApiTokenAuth PRODUCT, GEN_AIAPI Key with role based permission
In: header
Scope: PRODUCT, GEN_AI
Path Parameters
The ID of the file to retrieve
Query Parameters
Maximum number of characters of the file content to return. Use -1 to retrieve the full file content.
Number of characters to skip from the start of the file content before applying max_characters, allowing pagination through large files
Header Parameters
The ID of the user requesting the file
Response Body
text/plain; charset=utf-8
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "x-user-id: string""This is the content of the file in LLM format."{
"message": "Invalid file ID format"
}{
"message": "Invalid API Key"
}{
"message": "File not found"
}{
"message": "File is still being processed"
}{
"message": "Internal Server Error"
}