Public API: File Attachments
If you drive Nairi from code, your agents can now exchange files with you over the public API.
What's new
- Upload an attachment —
POST /api/public/v1/attachmentstakes a multipart file and returns anattachment_id. Up to 50 MB per file. - Reference it on a message — pass
attachment_ids: [...](max 10) toconversations/startorconversations/{job_id}/continue. The agent receives the files alongside your prompt. - Read back agent replies — when the agent produces files in its response, the assistant message comes back with
attachment_idson it. Fetch the bytes withGET /api/public/v1/attachments/{id}(base64-in-JSON). - Org-scoped — attachments can only be referenced or fetched by the org that uploaded them.
See the attachments docs for the end-to-end flow and code examples in 5 languages.