Skip to main content
GET
Read a file attached to an AI Assistant message

Authorizations

X-API-Key
string
header
required

Path Parameters

attachment_id
string<uuid>
required

Response

Successful Response

One file attached to a chat message, as the card above the message draws it.

The bytes are never returned; the shape is. columns and row_count are what a card and a model's first look need, and a page of rows is a separate read.

column_count
integer
required
columns
string[]
required

The header row's names, in order; empty for a PDF.

created_at
string<date-time>
required
filename
string
required
id
string<uuid>
required
kind
enum<string>
required

What the file is: spreadsheet for a CSV or an Excel sheet, pdf for a PDF.

Available options:
spreadsheet,
pdf
page_count
integer | null
required

A PDF's pages; null for a spreadsheet.

row_count
integer
required

Data rows under the header row; 0 for a PDF, whose table is read into rows only when its rows are first read.

sent
boolean
required

Whether the file has been sent with a message. A file added and never sent can be removed; one already sent stays with its message.

sheet
string | null
required

The workbook sheet the rows were read from; null for a CSV or a PDF.

size_bytes
integer
required