Read a file's details
GET
/files/{file_id}
const url = 'https://api.katara.com/v1/files/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.katara.com/v1/files/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”file_id
required
string
Responses
Section titled “Responses”The file.
Media typeapplication/json
object
id
required
string
object
required
string
bytes
required
integer
created_at
Unix seconds.
integer
filename
required
string
mime_type
required
string
sha256
string
purpose
string
extracted_text
Whether the file has text for models that cannot read it.
boolean
Example
{ "id": "file_3f9a1c0b7d2e5a6b8c9d0e1f", "object": "file", "mime_type": "application/pdf", "purpose": "user_data"}file_not_found, also for a file another account uploaded.