Skip to main content
GET
/
v1
/
files
/
{file_id}
from retab import Retab

client = Retab()

file = client.files.get("file_a1b2c3d4e5f6")

print(f"Filename: {file.filename}")
print(f"Pages: {file.page_count}")
print(f"Created: {file.created_at}")
{
  "id": "file_a1b2c3d4e5f6",
  "object": "file",
  "filename": "invoice.pdf",
  "page_count": 3,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}
Retrieve metadata for a single file by ID.
from retab import Retab

client = Retab()

file = client.files.get("file_a1b2c3d4e5f6")

print(f"Filename: {file.filename}")
print(f"Pages: {file.page_count}")
print(f"Created: {file.created_at}")
{
  "id": "file_a1b2c3d4e5f6",
  "object": "file",
  "filename": "invoice.pdf",
  "page_count": 3,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Authorizations

Api-Key
string
header
required

Path Parameters

file_id
string
required

Response

Successful Response

An uploaded file: its id, filename, MIME type, page count, and timestamps.

id
string
required

The unique identifier of the file

filename
string
required

The name of the file

object
string
default:file
Allowed value: "file"
mime_type
string | null

The MIME type of the file

created_at
string<date-time> | null

When the file was created

updated_at
string<date-time> | null

When the file was last updated

page_count
integer | null

Number of pages in the file