Attach an input file

Changed on

Attaches one file to the agent's input files — the same files the app's agent form manages under "Files". Every run lists the agent's input files in its prompt and can download them, so this is how to hand an agent a mapping table, a prior statement, or any reference material. Send multipart/form-data with a single file part; call once per file. Limits match the app: 50 MB per file, 20 files per agent, any content type (JSON is fine as an input). A file whose name matches an existing input file is added as a second file, not a replacement — delete the old one first to replace it.

post/agents/{id}/files

Request

  • Base URL
    https://api.endclose.com/v1
  • Auth
    API key in header X-API-KEY

Path parameters

idstring required

The unique identifier of the agent

Request body multipart/form-data

filestring binary required

The file to attach (at most 50 MB)

Response

File attached

idstring uuid
filenamestring
byte_sizeinteger
content_typestring
created_atstring date-time
urlstring

Absolute signed download URL on the API host (e.g. https://api.endclose.com/rails/active_storage/blobs/redirect/...). Fetching it needs no credentials; it 302s to a short-lived object-storage URL.

Changes