Skip to main content
The Nexus File Chat feature lets you have a conversation with the content of a document. You first upload your file to receive a file_id, then send natural-language questions referencing that file_id. Nexus AI reads the document, finds the relevant sections, and returns a direct answer along with source excerpts so you can trace where each answer came from. Working with File Chat is a two-step process: upload the file, then chat with it.
Supported formats: PDF, .docx, and .csv. Maximum file size: 20 MB.

Step 1 — Upload a file

Before you can ask questions, you must upload your document to receive a file_id. Endpoint
The upload request uses multipart/form-data rather than JSON. Include your file in the file field.

Example upload request

upload-file.sh

Example upload response

upload-response.json
Copy the file_id from this response — you will need it for the chat request in Step 2.

Upload response fields

string
A unique identifier for the uploaded file. Pass this value as file_id in your chat request to query the document.
string
The original filename of the uploaded document, as provided in the request.
integer
The size of the uploaded file in bytes.
string
An ISO 8601 timestamp indicating when the file was uploaded and processed.

Step 2 — Chat with the file

Once you have a file_id, send messages to query the document content. Endpoint

Request parameters

string
required
The unique identifier returned when you uploaded the file in Step 1. This tells the API which document to query.
string
required
Your natural-language question or instruction about the document content — for example, "What are the key findings in this report?".

Example chat request

chat-with-file.sh

Example response

response.json

Response fields

string
A unique identifier for this chat interaction.
string
The AI-generated answer to your question, derived from the content of the uploaded document.
array
An array of source objects referencing the specific sections of the document the answer was drawn from.
string
An ISO 8601 timestamp indicating when the chat response was generated.

Error responses

Returned when file_id or message is absent from the request body.
400-response.json
Returned when the file_id does not correspond to a file associated with your account.
404-response.json
Returned when you exceed your plan’s rate limit. Check the Retry-After response header and wait before retrying.
429-response.json