Skip to main content
The product UI uploads through Transloadit with a signed-in session. The public API accepts the same files with your API key. You can upload and send in one request, or upload first and pass attachmentIds.

Upload and send

POST /api/v1/completions accepts text + file in one multipart/form-data request. Omit chatId for a new chat, or pass it to continue one.

Upload only

POST /api/v1/uploads stores the file and returns an attachment id. It does not create a chat. Pass chatId only if you want the file attached to an existing chat.
Then send with { "text": "…", "attachmentIds": ["that-id"] }.

Limits

  • Images, video, and audio (same types as the product uploader)
  • 20 MB per file, 8 files
  • Server needs S3 or Transloadit. Otherwise 503 UPLOADS_UNAVAILABLE
image_urls still works when the file is already on the public web. You do not have to use a URL if you have the file.