assistant

Add a file to send with an AI Assistant message

Upload a CSV, Excel or PDF file to send with your next message to the AI Assistant. The file is read once here: a spreadsheet's column names and row count, or a PDF's page count, come back for the card in the composer, and the assistant reads the file when the message is sent. Name the file's id in the message's attachment_ids; a file never sent can be removed again.

Files up to 10 MB, and PDFs up to 500 pages with text to read (a scan has none). The format is decided by the file's own bytes, not its name.

post/chat-attachments/

Request

  • Base URL: https://api.getoneprofile.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.getoneprofile.ai/chat-attachments/
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Response

Successful Response

column_countinteger required
columnsstring[] required

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

created_atstring date-time required
filenamestring required
idstring uuid required
kind'spreadsheet' | 'pdf' required

What kind of thing a file the person attached is, for the card that shows it.

Each kind is read by its own reader and drawn under its own icon: a CSV or an Excel file is a spreadsheet, rows under a header; a PDF is pages of text, and the rows of the table its pages hold when one is asked for.

page_countinteger nullable required

A PDF's pages; null for a spreadsheet.

row_countinteger required

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

sentboolean 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.

sheetstring nullable required

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

size_bytesinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.