Generate File Upload URL
API Documentation
Generate File Upload URL
Generate a presigned URL for uploading files to be used with the assistant
POST
Generate File Upload URL
Generates a presigned URL that can be used to upload files directly to Wordsmith’s storage. This is the first step when you want to include file attachments with your assistant questions.Documentation Index
Fetch the complete documentation index at: https://wordsmithai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
This endpoint requires a valid API key in the Authorization header.Request Body
The name of the file to be uploaded, including the file extension
The MIME type of the file (e.g., “application/pdf”, “text/plain”,
“application/vnd.openxmlformats-officedocument.wordprocessingml.document”,
“image/png”, “audio/mp3”)
Supported File Types
Wordsmith supports a wide variety of file formats including:- Documents: PDF, DOC, DOCX, TXT, MD, HTML
- Spreadsheets: XLS, XLSX, CSV, TSV
- Presentations: PPT, PPTX
- Images: PNG, JPEG, WebP, TIFF
- Audio: MP3, MP4, M4A, MPEG, WAV, WebM
- Archives: ZIP
Response
The presigned URL where you can upload your file using a PUT request.
The unique identifier for this upload job. Use this as the
upload_job_id when creating assistant
questions with file attachments.The MIME type that was specified in the request.
Complete Upload Flow
After receiving the upload URL, you need to upload your file:Error Responses
See the Errors page for the full error format reference.File Size Limits
- Maximum file size: 50 MB per file
- Maximum total attachments per question: 10 files
- Files are automatically deleted after 30 days for security
Notes
- Upload URLs expire after 1 hour
- Files must be uploaded using a PUT request with the exact content type specified
- The
job_idfrom the response should be passed asupload_job_idwhen creating assistant questions