Skip to main content
Use multipart/form-data on POST /api/developers/v1/runs when StefanBrain must read files with the message.
  • Put the JSON request body in a payload field.
  • Add each upload as a files field.
  • The maximum is 10 files for each run. Each file can be up to 100 MB.
  • Supported uploads include images, PDFs, common Office documents, spreadsheets, and text files.
  • Audio and video files are rejected. Host the media and put its public URL in the run’s message instead.
Use uploaded files only. Internal attachment ids and referenced document ids are not part of the public API.

Handle upload errors

  • 400 too_many_attachments: send 10 files or fewer.
  • 400 unsupported_attachment: the file type is not supported, or the file is audio or video.
  • 400 invalid_multipart or invalid_json: rebuild the multipart body with a valid JSON payload field.
  • 413 attachment_too_large: a file is over 100 MB, or the whole request is too large.