You can use files as sources for any of your corpora. Files can be added via the Web App or via the Create Corpus File Upload API.

Upload Files via Web App

1

Create New Source

  • Go to RAG in the Ultravox web application.
  • Click New Source in the top right corner.
2

Add Details and Files

  • Select the Collection to which you want to add the content.
  • (Optionally) Add a Name and Description for the new source.
  • Select Document and add files.
3

Save

  • Click Save and wait a few moments for your content to be uploaded and ingested.

Upload Files via API

To upload files using the API, follow these steps:
1

Step 1: Request Upload URL

  • Use the Create Corpus File Upload API
  • Include the MIME type string in the request body
  • This returns the URL to use for upload and the unique ID for the document
  • URLs expire after 5 minutes. Request a new one if it expires before using it
The URL that is returned is tied to the provided MIME type. The same MIME type must be used during upload.
2

Step 2: Upload File

  • Use the presignedUrl from Step 1 to upload the document
  • Ensure the MIME type in the upload matches what was specified in Step 1
For example, if we requested an upload URL for a text file (MIME type text/plain):
FILE_PATH="/path/to/your/file"
UPLOAD_URL="https://storage.googleapis.com/fixie-ultravox-prod/..."

curl -X PUT \
  -H "Content-Type: text/plain" \
  --data-binary @"$FILE_PATH" \
  "$UPLOAD_URL"
3

Step 3: Create New Source with Uploaded Document

You can provide an array of Document IDs to bulk create a source.

Supported File Types

The following types of static files are currently supported:
File ExtensionType of FileMIME Type
docMicrosoft Word Documentapplication/msword
docxMicrosoft Word Open XML Documentapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
txtPlain Text Documenttext/plain
mdMarkdown Documenttext/markdown
pptMicrosoft PowerPoint Presentationapplication/vnd.ms-powerpoint
pptxMicrosoft PowerPoint Open XML Presentationapplication/vnd.openxmlformats-officedocument.presentationml.presentation
pdfPortable Document Formatapplication/pdf